Support Questions
Find answers, ask questions, and share your expertise

Re: Enabling Kerberos in HDP 2.5: kerberos_client.py does not exist

New Contributor

I was able to figure out what caused the issue in my VmWare Sadnbox.

I did a chmod 1777 on the folder "/var/lib/ambari-agent/cache/common-services/KERBEROS/1.10.3-10/package/scripts/" to make it impossible to delete files, and then i re-ran the "Enable Kerberos" wizard.

Looking at the ambari-agent.log I could see that it was the file /usr/lib/python2.6/site-packages/ambari_agent/FileCache.py on line 252 that was trying to delete the files. So I opened the file and commented out line 252 "shutil.rmtree(directory)" and added a log row instead "logger.warn("rmtree directory GRETS {0}".format(directory))", - I added the "GRETS" word to have something easy to search for in the log file - restarted ambari-agent and re-ran the wizard and now it works, and the files are not deleted.

I do not know what other effects this change to the FileCache.py file has but now I can get Kerberos working.

Re: Enabling Kerberos in HDP 2.5: kerberos_client.py does not exist

New Contributor

I have the same problem and I'm not sure that the problem is in ambari or kerberos, if you try this command

rm -rf /var/lib/ambari-agent/cache/common-services/KERBEROS/1.10.3-10/package you will receive this error

11743-screen-shot-2017-01-25-at-193722.png

As Michael Young wrote in this post https://community.hortonworks.com/questions/64294/hortonworks-sandbox-vm-25-virtualbox-not-able-to-s.... Inside VM run docker container. I assume that those directories where created by docker. And according to this post https://github.com/docker/docker/issues/15314. Files or directories that were created by docker during image build process can't be deleted. I'm not sure that this is the issue but it looks like. I assume that the problem is in hdp 2.5 sandbox itself. Hope this would help smbd.

,

Re: Enabling Kerberos in HDP 2.5: kerberos_client.py does not exist

New Contributor

So, I had the same problem.

Turns out the required files are located in a different directory.

Error:

Caught an exception while executing custom service command: <class 'ambari_agent.AgentException.AgentException'>: 'Script /var/lib/ambari-agent/cache/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_client.py does not exist'; 'Script /var/lib/ambari-agent/cache/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_client.py does not exist'

Locate:

[root@sandbox scripts]# locate kerberos_client.py                                                                                              
/var/lib/ambari-server/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_client.py

What I did:

cp /var/lib/ambari-server/resources/common-services/KERBEROS/1.10.3-10/package/scripts/* /var/lib/ambari-agent/cache/common-services/KERBEROS/1.10.3-10/package/scripts/                                               

Which copies all required files to the expected directory. However, somehow they kept being deleted.

So I also did the following (ambari is run as user root by default, and I was using root as well):

chattr +i /var/lib/ambari-agent/cache/common-services/KERBEROS/1.10.3-10/package/scripts/*                                     

Which makes the files immutable, preventing them from being deleted.

After that it worked just fine =)

Re: Enabling Kerberos in HDP 2.5: kerberos_client.py does not exist

Guru

Hello @Lars de Bruijn , @Shashant Panwar, @Dan Zaratsian , @anand maurya and @slachterman

I have recently published an article which covers how to fix the HDP 2.5 Sandbox image from these kind of errors. Please check this out: https://community.hortonworks.com/articles/92386/fix-problems-with-hdp-25-sandbox-image.html

Hope this helps !

Re: Enabling Kerberos in HDP 2.5: kerberos_client.py does not exist

Great finding, Vipin.

Re: Enabling Kerberos in HDP 2.5: kerberos_client.py does not exist

New Contributor

Very nice Vipin. Fixed my HDP 2.5 VirtualBox kerberos_client.py does not exist issue. Thank you, dale