Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
11-12-2019
08:01 AM
- last edited on
11-12-2019
10:47 PM
by
ask_bill_brooks
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
Created 11-13-2019 01:33 AM
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
.
Created on 11-12-2019 09:15 PM - edited 11-12-2019 09:19 PM
@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
.
Created 11-13-2019 01:06 AM
[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
Created 11-13-2019 01:18 AM
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.shAbove 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
Created 11-13-2019 01:29 AM
[root@luapp698 ambari-agent]# sh -x /var/lib/ambari-agent/tmp/create-python-wrap.sh
sh: /var/lib/ambari-agent/tmp/create-python-wrap.sh: No such file or directory
[root@luapp698 ambari-agent]# sudo su
[root@luapp698 ambari-agent]# ^C
[root@luapp698 ambari-agent]# cd /var/lib/ambari-agent/
[root@luapp698 ambari-agent]# ll
total 32
-rwxr-xr-x 1 root root 1116 Aug 22 02:11 ambari-env.sh
-rwxr-xr-x 1 root root 1345 Aug 22 02:11 ambari-sudo.sh
drwxr-xr-x 2 root root 26 Nov 13 10:05 bin
drwxr-xr-x 9 root root 179 Nov 13 10:05 cache
drwxr-xr-x 3 root root 17 Aug 22 02:12 cred
drwxr-xr-x 2 root root 21 Nov 13 10:05 data
-rwxr-xr-x 1 root root 8349 Aug 22 02:11 install-helper.sh
drwxr-xr-x 2 root root 6 Aug 22 02:11 keys
drwxr-xr-x 2 root root 6 Aug 22 02:11 lib
drwxr-xr-x 2 root root 6 Aug 22 02:11 tmp
drwxr-xr-x 2 root root 53 Nov 13 10:05 tools
-rwxr-xr-x 1 root root 2326 Aug 22 02:11 upgrade_agent_configs.py
-rwxr-xr-x 2 root root 2166 Aug 22 02:13 upgrade_agent_configs.pyc
-rwxr-xr-x 2 root root 2166 Aug 22 02:13 upgrade_agent_configs.pyo
[root@luapp698 ambari-agent]#
I have downloaded this
and installed like this
I think that the problem is deeper ..
Just as a supplement information, I have installed one ambari server in centos7 and multiple nodes, I have then tried to install ambari agent on ambari server and one of those node but the error is the same
I have set passwordless on all the nodes before installing agent, I could connect to all of nodes from the ambari using ssh, do I need even to install agents on all the nodes?
Thank you in advance
Created 11-13-2019 01:30 AM
I have nothing under the /tmp directory
Created 11-13-2019 01:33 AM
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
.
Created 11-13-2019 01:53 AM
Hello
[root@luapp698 tmp]# rpm -qa | grep ambari
ambari-server-2.7.4.0-118.x86_64
ambari-agent-2.7.4.0-118.x86_64
[root@luapp698 tmp]# grep ambari /var/log/yum.log
Nov 08 14:55:40 Installed: ambari-server-2.7.4.0-118.x86_64
Nov 12 17:40:20 Installed: ambari-agent-2.7.4.0-118.x86_64
Nov 13 10:05:16 Installed: ambari-agent-2.7.4.0-118.x86_64
Now I am getting this error
==========================
Running create-python-wrap script...
==========================
Command start time 2019-11-13 10:43:52
bash: /var/lib/ambari-agent/tmp/ambari-sudo.sh: Permission denied
Connection to luapp698.lu.ema.ad.pwcinternal.com closed.
SSH command execution finished
host=luapp698.lu.ema.ad.pwcinternal.com, exitcode=126
Command end time 2019-11-13 10:43:52
ERROR: Bootstrap of host luapp698.lu.ema.ad.pwcinternal.com fails because previous action finished with non-zero exit code (126)
ERROR MESSAGE: Connection to luapp698.lu.ema.ad.pwcinternal.com closed.
STDOUT: bash: /var/lib/ambari-agent/tmp/ambari-sudo.sh: Permission denied
Connection to luapp698.lu.ema.ad.pwcinternal.com closed.
in SSH
[root@luapp698 tmp]# ll
total 16
drwxr-xr-x 6 root root 4096 Nov 13 10:43 ambari_commons
-rwx------ 1 root root 1345 Nov 13 10:43 ambari-sudo.sh
-rwxr-xr-x 1 root root 1577 Nov 13 10:43 create-python-wrap.sh
-rwxr-xr-x 1 root root 1558 Nov 13 10:43 os_check_type1573638232.py
What should be the issue please?
Created 11-13-2019 01:59 AM
@asmarz
We see the sudoer error.
Command start time 2019-11-13 10:43:52
bash: /var/lib/ambari-agent/tmp/ambari-sudo.sh: Permission deniedSo please make sure that Either you are running amabri agent as "root" user. You can verify it by looking at the following property:
# grep run_as /etc/ambari-agent/conf/ambari-agent.ini
run_as_user=root
OR You have configured the Sudoer permissions properly as mentioned in the doc:
https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.4/securing-credentials/content/ambari_sec_how_to...
Created 11-13-2019 02:09 AM
yes it is the case
grep run_as /etc/ambari-agent/conf/ambari-agent.ini
run_as_user=root
and
[root@server tmp]# ambari-agent start
bash: /var/lib/ambari-agent/bin/ambari-agent: Permission denied
i am with a root user ..