Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Please HELP : 500 status code received on POST method for API: /api/v1/clusters/Analytics_Hadoop/request

Solved Go to solution

Please HELP : 500 status code received on POST method for API: /api/v1/clusters/Analytics_Hadoop/request

Explorer

Hello

 

I get this error when restarting components :

 

500 status code received on POST method for API: /api/v1/clusters/Analytics_Hadoop/requests

 

I deleted oozie service 

 

I am using postegres database

Thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Please HELP : 500 status code received on POST method for API: /api/v1/clusters/Analytics_Hadoop/request

Mentor

@asmarz 

The error is below in bold I

 

/usr/bin/hdp-select set oozie-client 3.1.4.0-315' returned 1. symlink target /usr/hdp/current/oozie-client for oozie already exists and it is not a symlink.

 

Possible cause the symlink is broken or exists and is pointing to different location or version  so removing symlink and reinstalling the client should resolve the issue

Validate

 

Can you validate that the link exists?

001.PNG

 

Move the symlink

mv /usr/hdp/current/oozie-client /usr/hdp/current/oozie-client_back

 

Recreate the symlink
ln -s  /usr/hdp/3.1.0.0-78/oozie /usr/hdp/current/oozie-client

 

My version above is 2.1.0.0.x this should match your exact version

 

View solution in original post

3 REPLIES 3
Highlighted

Re: Please HELP : 500 status code received on POST method for API: /api/v1/clusters/Analytics_Hadoop/request

Mentor

@asmarz 

When you delete components at times you leave the database in an inconsistent  status. you will need to log onto the Ambari Database to do some manual cleaning.

There are 3 important tables that hold the component status

  • hostcomponentstate
  • hostcomponentdesiredstate
  • servicecomponentdesiredstate

A  targeted select on the component name to show , run the below  to check if your oozie components are still

[root@nakuru ~]# psql ambari ambari
Password for user ambari: #default password is "bigdata"
psql (8.4.20)
Type
"help" for help.
ambari=> select distinct component_name from hostcomponentstate;

If you see the oozie components in the databases then you will have to delete those entries, I have  used 'OOZIE_SERVER','OOZIE_CLIENT' in the below example 

oozie.PNG

 

 

 

 

 

 

 

 

 

 

Delete the orphaned  Oozie entries

 

[root@nakuru ~]# psql ambari ambari
Password for user ambari: #default password is "bigdata"
psql (8.4.20)
Type
"help" for help.
ambari=> delete from hostcomponentstate where component_name='OOZIE_CLIENT';
DELETE 1
ambari=> delete from hostcomponentstate where component_name='OOZIE_SERVER';
DELETE 1
ambari=> delete from hostcomponentdesiredstate where component_name='OOZIE_CLIENT';
DELETE 1
ambari=> delete from hostcomponentdesiredstate where component_name='OOZIE_SERVER';
DELETE 1
ambari=> delete from servicecomponentdesiredstate where component_name='OOZIE_CLIENT';
DELETE 1
ambari=> delete from servicecomponentdesiredstate where component_name='OOZIE_SERVER';
DELETE 1
ambari=> commit;
WARNING: there is no transaction in progress
COMMIT
ambari=> \q
[root@nakuru ~]#

 

You can then stop all the components in the  cluster and restart the database, you might need to restart some stale configurations  that might have been orphaned  due to the removal of the oozie components 

 

HTH

 

Highlighted

Re: Please HELP : 500 status code received on POST method for API: /api/v1/clusters/Analytics_Hadoop/request

Explorer

Thank you for your reply

 

I tried to reinstall the oozie client and server ( I have one server and 4 clients machines)

It has been installed on the server and one of client but failed for the 3 other with :

 

Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stack-hooks/after-INSTALL/scripts/hook.py", line 39, in <module>
AfterInstallHook().execute()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute
method(env)
File "/var/lib/ambari-agent/cache/stack-hooks/after-INSTALL/scripts/hook.py", line 32, in hook
setup_stack_symlinks(self.stroutfile)
File "/var/lib/ambari-agent/cache/stack-hooks/after-INSTALL/scripts/shared_initialization.py", line 66, in setup_stack_symlinks
stack_select.select(package, json_version)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/stack_select.py", line 312, in select
Execute(command, sudo=True)
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
self.env.run()
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 263, in action_run
returns=self.resource.returns)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
result = function(command, **kwargs)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
result = _call(command, **kwargs_copy)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call
raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'ambari-python-wrap /usr/bin/hdp-select set oozie-client 3.1.4.0-315' returned 1. symlink target /usr/hdp/current/oozie-client for oozie already exists and it is not a symlink.

 

Any idea please?

 

Thanks and Regards

 

 

Highlighted

Re: Please HELP : 500 status code received on POST method for API: /api/v1/clusters/Analytics_Hadoop/request

Mentor

@asmarz 

The error is below in bold I

 

/usr/bin/hdp-select set oozie-client 3.1.4.0-315' returned 1. symlink target /usr/hdp/current/oozie-client for oozie already exists and it is not a symlink.

 

Possible cause the symlink is broken or exists and is pointing to different location or version  so removing symlink and reinstalling the client should resolve the issue

Validate

 

Can you validate that the link exists?

001.PNG

 

Move the symlink

mv /usr/hdp/current/oozie-client /usr/hdp/current/oozie-client_back

 

Recreate the symlink
ln -s  /usr/hdp/3.1.0.0-78/oozie /usr/hdp/current/oozie-client

 

My version above is 2.1.0.0.x this should match your exact version

 

View solution in original post

Don't have an account?
Coming from Hortonworks? Activate your account here