Created 09-25-2015 05:34 PM
I am trying to install a component on a host via API:
$ curl -u admin -i -H "X-Requested-By:ambari" -X PUT \ -d '{"HostRoles": {"state": "INSTALLED"}}' \ http://<ambari>:8080/api/v1/clusters/clustername/hosts/node1.hortonworks.com/host_components/ZOOKEEP...
... getting error:
Caused by: java.lang.NullPointerException at org.apache.ambari.server.state.ConfigHelper.getPropertyValuesWithPropertyType(ConfigHelper.java:489) at org.apache.ambari.server.controller.AmbariManagementControllerImpl.createHostAction(AmbariManagementControllerImpl.java:1934) at org.apache.ambari.server.controller.AmbariManagementControllerImpl.doStageCreation(AmbariManagementControllerImpl.java:2336) at org.apache.ambari.server.controller.AmbariManagementControllerImpl.addStages(AmbariManagementControllerImpl.java:2593) at org.apache.ambari.server.controller.internal.HostComponentResourceProvider.updateHostComponents(HostComponentResourceProvider.java:612) at org.apache.ambari.server.controller.internal.HostComponentResourceProvider$4.invoke(HostComponentResourceProvider.java:753)
The operation fails with "Server Error"
Any ideas?
Created 09-29-2015 01:56 AM
1. Why not use Blueprint? Or are you trying to add a service to an existing cluster?
2. Do you have cluster-env with smokeuser defined? It looks like ZooKeeper install fails without it.
curl -u admin:admin -i -H "X-Requested-By: ambari -X PUT -d '{"Clusters" : {"desired_configs": {"type": "cluster-env","tag": "20150924","properties": {"smokeuser":"ambari-qa"}}}}' http://127.0.0.1:8080/api/v1/clusters/Sandbox
should get you thru, but you might want to look at an existing working cluster and define all the standard properties that come in cluster-env.
Created 10-02-2015 05:52 PM
Did adding smokeuser work, @wgonzalez@hortonworks.com?
Created 10-22-2015 05:31 PM
Are you getting an error when trying to install a component or service?
$ curl -u admin -i -H "X-Requested-By:ambari"-X PUT -d '{"HostRoles": {"state": "INSTALLED"}}' http://<ambari>:8080/api/v1/clusters/clustername/hosts/node1.hortonworks.com/host_components/ZOOKEEP...
The above API will fail because ZOOKEEPER is not the name of a host component. It should either be ZOOKEEPER_CLIENT or ZOOKEEPEER_SERVER. On the trunk build I get a NoSuchResourceException when using ZOOKEEPER as the component name. With the correct component name, the API succeeded.
The API to install the ZOOKEEPER service was successful:
curl -u admin:admin -i -H "X-Requested-By: ambari"-X PUT -d '{"ServiceInfo": {"state" : "INSTALLED"}}' http://127.0.0.1:8080/api/v1/clusters/Sandbox/services/ZOOKEEPER