- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Uninstall Knox and installing again
- Labels:
-
Apache Knox
-
Cloudera DataFlow (CDF)
Created ‎02-06-2016 09:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
We setup a new HDP cluster with Ambari version 2.1, with HDP version 2.3.4 and Knox version 0.6, after successful installation of knox for the first time, we tried to configure it with LDAP and tried to restart the knox gateway service, which didn't work and it seemed to be a bug which will be resolved in the next version of Ambari, then we thought to Delete Knox service via REST API and install it once again with Ambari, which is not working now as at the end of setup from Ambari we only get and error message "server error" from Ambari. Any ideas or suggestions that what should be the next step? Thanks in advance.
Regards,
Hammad Ali
Created ‎02-07-2016 10:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can remove it from the PostgresDB by runnign below from Ambari node:
su postgres psql \c ambari DELETE FROM ambari.hostcomponentstate WHERE service_name IN ('KNOX'); DELETE FROM ambari.hostcomponentdesiredstate WHERE service_name IN ('KNOX'); DELETE FROM ambari.servicecomponentdesiredstate WHERE service_name IN ('KNOX'); DELETE FROM ambari.servicedesiredstate WHERE service_name IN ('KNOX'); DELETE FROM ambari.clusterservices WHERE service_name IN ('KNOX');
Created ‎02-06-2016 10:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can delete knox through rest api
Run this in Ambari host
curl --user admin:admin -i -H "X-Requested-By: ambari" -X DELETE http://`hostname -f`:8080/api/v1/clusters/clustername/services/KNOX
Restart ambari server and see whats in the logs.
Clear broweser cache and try to login
Created ‎02-07-2016 11:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Hammad Ali For future referece 🙂 You can replace zepplein with KNOX
Created ‎02-06-2016 12:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Hammad Ali Ambari 2.2 is out, why not go with that?
Created ‎02-07-2016 10:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Neeraj Sabharwal Thanks for your answer, I deleted the Knox service with the above mentioned command, which i tried many time before too, when i checked on ambari the service is gone, then I restarted the ambari server and I found the this exception in the logs:
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 "clusterservices_pkey" Detail: Key (service_name, cluster_id)=(KNOX, 2) already exists.
Moreover I can see the knox service with yellow sign once again in the ambari, my assumption is that the service is not being deleted from ambari database properly due to which I am also unable to install it once again.
Any feedback or advice, what is happening actually and how to proceed (we might need to delete it from database)?
Thanks in advance.
Hammad Ali
Created ‎02-07-2016 10:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can remove it from the PostgresDB by runnign below from Ambari node:
su postgres psql \c ambari DELETE FROM ambari.hostcomponentstate WHERE service_name IN ('KNOX'); DELETE FROM ambari.hostcomponentdesiredstate WHERE service_name IN ('KNOX'); DELETE FROM ambari.servicecomponentdesiredstate WHERE service_name IN ('KNOX'); DELETE FROM ambari.servicedesiredstate WHERE service_name IN ('KNOX'); DELETE FROM ambari.clusterservices WHERE service_name IN ('KNOX');
Created ‎02-14-2016 03:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding step for 1 for future users
Step 1) curl --user admin:admin -i -H "X-Requested-By: ambari" -X DELETE http://`hostname -f`:8080/api/v1/clusters/clustername/services/KNOX
Step 2) Ali's workaround
Created ‎08-03-2016 12:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works 100%
Thanks @Ali Bajwa and @Neeraj Sabharwal
Created ‎02-09-2016 04:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HDP 2.3.4 Needs Ambari 2.2. You cannot use Ambari 2.1
Created ‎02-09-2016 04:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ancil McBarnett See this http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_Installing_HDP_AMB/content/_determine_sta...
You can use HDP 2.3 with Ambari 2.1
