Created 05-23-2016 03:35 PM
Removed all components related to Zeppelin from Ambari, and tried to reinstall again but everytime its failing with the error "Server error."
used this cmd to remove the service. is there something else that required cleaning up?
curl -u admin:admin -X DELETE -H 'X-Requested-By:1' http://10.228.210.175:80/api/v1/clusters/HDPPOC2/services/ZEPPELIN
Created 05-25-2016 04:42 PM
The final resolution was this:
Ambari was only showing a "SERVER ERROR" msg on final step with no stack trace. After reading the log I saw there was a primary key constraint on the table "clusterservices". remove this row from table. Then re-install via ambari and it was successful. My hunch is that we got into this state by first trying to remove or edit a service that was already running.
Created 05-23-2016 03:39 PM
Did you put the service into stopped state and stop any components? List all of the service components.
Created 05-23-2016 03:40 PM
Can you post the tail of ambari-server.log? Likely an exception in there
Created 05-23-2016 06:21 PM
Try this
#curl -u admin:$PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Stop $SERVICE via REST"}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' http://$AMBARI_HOST:8080/api/v1/clusters/$CLUSTER/services/$SERVICE
and then Delete using the Curl.
Created 05-25-2016 03:15 PM
@Artem Ervits looks like you were right, once I got a hold of the logs looks like they did not stop the service first.
20 May 2016 11:05:21,732 INFO [ambari-heartbeat-processor-0] HeartbeatProcessor:603 - State of service component NODEMANAGER of service YARN of cluster HDPPOC2 has changed from UNKNOWN to STARTED at host ip-10-228-210-131 according to STATUS_COMMAND report 20 May 2016 11:05:33,535 ERROR [qtp-ambari-client-41] AbstractResourceProvider:338 - Caught AmbariException when modifying a resource org.apache.ambari.server.AmbariException: Cannot remove ZEPPELIN. Desired state STARTED is not removable. Service must be stopped or disabled. at org.apache.ambari.server.controller.internal.ServiceResourceProvider.deleteServices(ServiceResourceProvider.java:869) at org.apache.ambari.server.controller.internal.ServiceResourceProvider$3.invoke(ServiceResourceProvider.java:247) at org.apache.ambari.server.controller.internal.ServiceResourceProvider$3.invoke(ServiceResourceProvider.java:244) at org.apache.ambari.server.controller.internal.AbstractResourceProvider.invokeWithRetry(AbstractResourceProvider.java:450)
20 May 2016 11:06:52,501 ERROR [qtp-ambari-client-42] AmbariJpaLocalTxnInterceptor:180 - [DETAILED ERROR] Rollback reason: Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: ERROR: update or delete on table "servicecomponentdesiredstate" violates foreign key constraint "hstcmpnntdesiredstatecmpnntnme" on table "hostcomponentdesiredstate" Detail: Key (component_name,cluster_id,service_name)=(ZEPPELIN_MASTER,2,ZEPPELIN) is still referenced from table "hostcomponentdesiredstate". Error Code: 0 Call: DELETE FROM servicecomponentdesiredstate WHERE (((cluster_id = ?) AND (component_name = ?)) AND (service_name = ?)) bind => [3 parameters bound] at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
Created 05-25-2016 04:42 PM
The final resolution was this:
Ambari was only showing a "SERVER ERROR" msg on final step with no stack trace. After reading the log I saw there was a primary key constraint on the table "clusterservices". remove this row from table. Then re-install via ambari and it was successful. My hunch is that we got into this state by first trying to remove or edit a service that was already running.