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]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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 Member

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

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?