Created 08-16-2016 11:20 PM
I am trying to install ambari-server in Ubuntu. while ambari-server install or setup system asking about install python >2.6 .
I installed python 2.7 version then trying to setup the ambari-server then also prompting the same that "Need python version >2.6.
Previously it was not asked like that. could you please help me.
Created 09-17-2016 11:32 AM
Got the same issue on Centos7, when launching by systemctl.
systemctl status ambari-server ..... Sep 17 13:02:15 sr1 systemd[1]: Starting LSB: ambari-server daemon... Sep 17 13:02:15 sr1 ambari-server[1339]: Need python version > 2.6 Sep 17 13:02:15 sr1 systemd[1]: ambari-server.service: control process exited, code=exited status=1
But,
/etc/init.d/ambari-server starts
works fine!
I fixed it by patching ambari-server file:
Replace:
export ROOT=`dirname $(dirname $SCRIPT_DIR)` ROOT=`echo $ROOT | sed 's/\/$//'`
by
export ROOT='/'
I don't know what this ROOT variable is intended for, but in my case, it was set to '/etc' when launching by systemctl. This will of course break the launched process
TRICK:
Just add
env >/tmp/env.txt
at appropriate place in ambari-server file. And you will get
PATH=/etc/usr/lib/ambari-server/*:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin/:/usr/sbin PWD=/ LANG=en_US.UTF-8 AMBARI_CONF_DIR=/etc/etc/ambari-server/conf ROOT=/etc AMBARI_PASSPHRASE=DEV SHLVL=1 PYTHON= _=/usr/bin/env
Which is obviously wrong....
Hope this will help
Created 09-20-2016 12:26 PM
This solution worked for me.
For some reason systemctl makes ROOT to be set as /etc, breaking the process. I am running Centos7 too, could someone else verify this? Have you reported this bug?