Solved: Getting "500 Status Code Received On POST Method F...

logo
  • Community
  • Training
  • Partners
  • Support
Support Questions Find answers, ask questions, and share your expertise All communityThis categoryThis boardCommunity ArticlesUsers cancel Turn on suggestions Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. Showing results for  Show  only  | Search instead for  Did you mean:  Advanced Search
  • Cloudera Community
  • Support
  • Support Questions
  • Getting "500 status code received on POST method f...
Options Options Solved Go to solution

Getting "500 status code received on POST method for API" in ambari while trying to install Kerberos

  • Apache Ambari
avatar author-rank ali_gouta Rising Star

Created ‎12-23-2015 09:30 PM

12-23-2015 09:30:32
  • OS: CentOS6.6 on all hosts
  • Ambari version 2.1 & HDP 2.3.0
  • Operation: Installing Kerberos With AD KDC
  • The error I get in Ambari, more precisely in step 3 and while performing Test Client:

500 status codereceived on POST method for API: /api/v1/clusters/HdpCluster/requests

Error message: Server Error
  • Ambari-server log:

23 Dec 2015 21:53:30,301 ERROR [pool-2-thread-1] AmbariJpaLocalTxnInterceptor:114 - [DETAILED ERROR] Rollback reason: Local Exception Stack:

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException:

ERROR: duplicate key value violates unique constraint "uni_alert_group_name"

Error Code: 0

Call: INSERT INTO alert_group (group_id, cluster_id, group_name, is_default, service_name) VALUES (?, ?, ?, ?, ?) bind =>

[5 parameters bound] at

org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1611)

Any clue on how to solve this issue ?

Reply 13,715 Views 2 Kudos 1 ACCEPTED SOLUTION avatar author-rank aervits Master Mentor

Created ‎12-24-2015 02:15 AM

12-24-2015 02:15:54

backup your Ambari database, go to your Ambari database, delete the old entry in the alert_group table that matches the error.

View solution in original post

Reply 6,510 Views 2 Kudos
  • All forum topics
  • Previous
  • Next
15 REPLIES 15 avatar author-rank aervits Master Mentor

Created ‎12-24-2015 02:15 AM

12-24-2015 02:15:54

backup your Ambari database, go to your Ambari database, delete the old entry in the alert_group table that matches the error.

Reply 6,511 Views 2 Kudos avatar author-rank ali_gouta Rising Star

Created ‎12-24-2015 12:20 PM

12-24-2015 12:20:02

@Artem Ervits Thank you, this solved part of the problem. However, now I am getting another error (the same 500 status code and still in the same step):

24 Dec 2015 12:58:35,191 INFO [qtp-client-52] AmbariManagementControllerImpl:3230 - Received action execution request, clusterName=HdpCluster, request=isCommand :true, action :null, command :KERBEROS_SERVICE_CHECK, inputs :{}, resourceFilters: [RequestResourceFilter{serviceName='KERBEROS', componentName='null', hostNames=[]}], exclusive: false, clusterName :HdpCluster 24 Dec 2015 12:58:35,934 ERROR [qtp-client-52] BaseManagementHandler:66 - Caught a runtime exception while attempting to create a resource java.lang.NullPointerException at org.apache.ambari.server.actionmanager.ActionDBAccessorImpl.persistActions(ActionDBAccessorImpl.java:265) at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:68)

I googled this error, and people propose to include the ambari server as a cluster member host (i.e. have an agent running side-by-side with the ambari server on the same machine). Is this really the unique solution ? I tried adding a new host in the ambari wizard (to add the ambari server itself to the list of hosts), then I got this error while registring the host ... :

INFO 2015-12-24 13:11:20,282 NetUtil.py:59 - Connecting to https://ambari-server.example.com:8440/ca ERROR 2015-12-24 13:11:20,379 NetUtil.py:77 - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) ERROR 2015-12-24 13:11:20,380 NetUtil.py:78 - SSLError: Failed to connect. Please check openssl library versions.

I am running Oracle JDK on the ambari server:

cat /etc/ambari-server/conf/ambari.properties java.home=/usr/jdk64/jdk1.7.0_67 server.jdbc.postgres.schema=ambari jdk.name=jdk-7u67-linux-x64.tar.gz

Your help is much appreciated !

Reply 5,797 Views 0 Kudos avatar author-rank aervits Master Mentor

Created ‎12-24-2015 01:48 PM

12-24-2015 01:48:58

also for the future, try to tag your posts with more general tags, so instead of ambari-2.1.0, tag with "Ambari" that way we have people following the Ambari topics notified of your questions.

Reply 5,797 Views 0 Kudos avatar author-rank ali_gouta Rising Star

Created ‎12-24-2015 02:27 PM

12-24-2015 02:27:16

Ok ! Thank you

Reply 5,797 Views 0 Kudos avatar author-rank aervits Master Mentor

Created ‎12-24-2015 01:46 PM

12-24-2015 01:46:28

is your server name really ambari-server.example.com? Confirm by going to /etc/ambari-agent/conf/ambari-agent.ini and check under ambari host property. Set it to whatever the node name is. You can get FQDN of the node by running "hostname -f".

Reply 5,797 Views 0 Kudos avatar author-rank ali_gouta Rising Star

Created ‎12-24-2015 02:33 PM

12-24-2015 02:33:05

Actually, I changed it. My real FQDN is manager.cluster.mediatvcom

My FQDN is correct, it figures out in [server] section of amabri-agent.ini. While registring I can see this message:

WARNING 2015-12-24 15:24:52,405 NetUtil.py:105 - Server at https://manager.cluster.mediatvcom:8440 is not reachable, sleeping for 10 seconds...

The port 8440 is open, The ambari-agent is collocated with the ambari server, but while registering, the Confirm Hosts step always fails in the Add Host Wizard... Do you think it is related to SSL ? 😞

Reply 5,797 Views 0 Kudos avatar author-rank aervits Master Mentor

Created ‎12-24-2015 02:39 PM

12-24-2015 02:39:29

try localhost instead? Also, check the version of openssl package on your OS and confirm with the Ambari version you're using in our guides. If other nodes connect successfully, confirm the openssl version on those hosts matches this host.

Reply 5,797 Views 0 Kudos avatar author-rank ali_gouta Rising Star

Created ‎12-24-2015 03:56 PM

12-24-2015 03:56:17 rpm -qa | grep openssl openssl-1.0.1e-42.el6.x86_64

I have this version running on all my hosts.

The documentation says: We should run OpenSSL (v1.01, build 16 or later). So it is fine since 42 > 16. So it should be fine 🙂

Yes all my nodes run successfully the ambari-agent.

I just upgraded the OpenSSL version running on the ambari server to openssl-1.0.1e-42.el6_7.1.x86_64, but still does not work...

I just figured out, in the last comment raised by @gaurav sharma

https://community.hortonworks.com/questions/145/op...

we are running into the same issue :(.

Reply 5,797 Views 0 Kudos avatar author-rank aervits Master Mentor

Created ‎12-24-2015 04:36 PM

12-24-2015 04:36:38

it does say in the post you reference that user enabled Oracle JDK 1.8, have you tried that? Here's documentation to change JDK http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_ambari_reference_guide/content/ch_changin...

Reply 5,797 Views 0 Kudos Load more replies Post Reply
  • Previous
    • 1
    • 2
  • Next
Announcements What's New @ Cloudera Cloudera Data Engineering 1.23: Access Spark from Your Favor... What's New @ Cloudera HBase REST server scaling support is Generally Available What's New @ Cloudera New CLI option in the update-database command What's New @ Cloudera New Action menu item in the Cloudera Operational Database UI What's New @ Cloudera Get the list of supported instance types in the Cloudera Ope... View More Announcements

Từ khóa » Xoxe 500/3+1