You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Dai Xiang <xi...@sky-data.cn> on 2018/01/31 02:57:28 UTC

custom command failed since jdk error

Hi!

I follow docs to add a service to record hosts into a file, but it failed:

INFO 2018-01-31 02:49:07,731 ActionQueue.py:113 - Adding
EXECUTION_COMMAND for role write_ip for service null of cluster null to the queue.
INFO 2018-01-31 02:49:07,772 ActionQueue.py:238 - Executing command with id = 29-0, taskId = 257 for role = write_ip of cluster null.
INFO 2018-01-31 02:49:07,772 ActionQueue.py:279 - Command execution metadata - taskId = 257, retry enabled = False, max retry duration
(sec) = 0, log_output = True
ERROR 2018-01-31 02:49:07,772 CustomServiceOrchestrator.py:441 - Caught an exception while executing custom service command: <type
'exceptions.KeyError'>: 'jdk_location'; 'jdk_location'
Traceback (most recent call last):
  File
  "/usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py",
  line 324, in runCommand
      server_url_prefix = command['commandParams']['jdk_location']
      KeyError: 'jdk_location'

The call cmd is as below:

curl --user admin:admin -X POST -H 'X-Requested-By:ambari' -d '{"RequestInfo":{"context":"Write Ip Config","action":"write_ip","parameters":{"host_list":"2ceed4a520de"}},"Requests/resource_filters":[{"hosts":"2ceed4a520de"}]}' http://localhost:8080/api/v1/requests

Could someone help me?

-- 
Best Regards
Dai Xiang