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