This seems to work so far, in case someone else runs into the same problem:

/usr/lib/systemd/system/ambari-server.service
--------------------------------------------------------------

[Unit]
Description=ambari-server service
After=xe-linux-distribution.service

[Service]
Type=forking
ExecStart=/usr/sbin/ambari-server start
ExecStop=/usr/sbin/ambari-server stop

[Install]
WantedBy=multi-user.target


From: Greg <greg.h...@rackspace.com<mailto:greg.h...@rackspace.com>>
Reply-To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" 
<user@ambari.apache.org<mailto:user@ambari.apache.org>>
Date: Wednesday, December 30, 2015 at 10:10 AM
To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" 
<user@ambari.apache.org<mailto:user@ambari.apache.org>>
Subject: Re: Systemd update breaks ambari-server and ambari-agent

I was mistaken on one detail, ambari-agent does appear to still work with 
systemd, just not ambari-server.

Greg

From: Greg <greg.h...@rackspace.com<mailto:greg.h...@rackspace.com>>
Reply-To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" 
<user@ambari.apache.org<mailto:user@ambari.apache.org>>
Date: Wednesday, December 30, 2015 at 9:31 AM
To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" 
<user@ambari.apache.org<mailto:user@ambari.apache.org>>
Subject: Systemd update breaks ambari-server and ambari-agent

A recent CentOS update (7.2) is causing ambari-server to not work with systemd.

systemctl restart ambari-server
Unit ambari-server.service failed to load: No such file or directory.

This is because ambari-server does not install a service definition file in:
/usr/lib/systemd/system/ambari-server.service

I can't find anything in the Ambari git repo referencing systemd, so maybe this 
hasn't been addressed yet?

I think what maybe happened was that RHEL/CentOS provided a shim to use the old 
sysvinit init script with systemd and they have now either removed or broken 
that.

Does anyone have a working systemd service definition for ambari-agent and 
ambari-server by chance?  Otherwise, I'll figure out how to write one I guess 
(first time for everything).

Greg

Reply via email to