Support Questions

Find answers, ask questions, and share your expertise

ambari-server installation

avatar
Rising Star

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.

1 ACCEPTED SOLUTION

avatar
New Contributor

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

View solution in original post

10 REPLIES 10

avatar
Contributor

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?