Skip to main content
asmarz
Silver ⭐️⭐️⭐️
Nov 12, 2019 4:01 PM UTC
Solved

/usr/bin/env: ambari-python-wrap: No such file or directory

Dear Community,

 

I am trying to install an ambari cluster using Use Public Repository.

I have already configured the Password Less on all the servers and I could connect from ambari node to the others using ssh root@node1,2...

I copied the right ssh private key however the confirmation of hosts failed with:

 

Error while bootstrapping:
/usr/bin/env: ambari-python-wrap: No such file or directory



 I could not find any ambari-agent folder , should I have? I did not install agent manually ..

 

Please help

Thanks and Regards

jsensharma
Platinum ⭐️⭐️
Nov 13, 2019 9:33 AM UTC

@asmarz 

Can you try this once.

Copy the "/var/lib/ambari-server/create-python-wrap.sh" file from Ambari Server node and then Place it on the problematic Agent node at "/var/lib/ambari-agent/tmp/create-python-wrap.sh" and then again try to run the same command again and then verify if it creates the link?

# sh -x /var/lib/ambari-agent/tmp/create-python-wrap.sh

.

Also pleas verify if you are using correct ambari agent binary on the host?

# rpm -qa | grep ambari
# grep ambari /var/log/yum.log

 

.

 

11 replies

jsensharma
Platinum ⭐️⭐️
Platinum ⭐️⭐️
Nov 13, 2019 5:15 AM UTC

@asmarz 
Try reinstalling Ambari Agent Binaries once.

 

Ideally there should be a Symlink created as following when you successfully install Ambari Agent Binary to a host. The symlink points to a Python binary installed on that host.

Example:

 

#  ls -lart /usr/bin/ambari-python-wrap
lrwxrwxrwx. 1 root root 15 Feb 15 2019 /usr/bin/ambari-python-wrap -> /usr/bin/python

 

.

Try reinstalling ambari agent.

 

# which python
# ls -l /usr/bin/python
# /usr/bin/python -V

# yum reinstall ambari-agent
# ls -lart /usr/bin/ambari-python-wrap

 

.

Translate
asmarz
asmarzAuthor
Silver ⭐️⭐️⭐️
Nov 13, 2019 9:06 AM UTC

[root@luapp698 bin]# ls -l /usr/bin/python
lrwxrwxrwx. 1 root root 7 Nov 7 13:41 /usr/bin/python -> python2

[root@luapp698 bin]# /usr/bin/python -V
Python 2.7.5

 

 

[root@luapp698 bin]# ls -lart /usr/bin/ambari-python-wrap
ls: cannot access /usr/bin/ambari-python-wrap: No such file or directory

 

I have reinstall the agent but i have the same issue 😞

 

Thanks

 

Translate
jsensharma
Platinum ⭐️⭐️
Platinum ⭐️⭐️
Nov 13, 2019 9:18 AM UTC

@asmarz 

On the Ambari Agent host where you are observing this issue please try this.

You will find a file like following "/var/lib/ambari-agent/tmp/create-python-wrap.sh". Can you please try to run that file manually as "root" user like?

# sh  -x  /var/lib/ambari-agent/tmp/create-python-wrap.sh

Above should create the mentioned symlink ... but if it does not work then please share the Full output of the above commend from the terminal as it is.

.

Once the above script is executed fine then please check if the link is created properly or not?

# ls -l /usr/bin//ambari-python-wrap

 

Translate