Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4181418C81 for ; Wed, 27 Jan 2016 09:57:02 +0000 (UTC) Received: (qmail 70535 invoked by uid 500); 27 Jan 2016 09:56:40 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 70442 invoked by uid 500); 27 Jan 2016 09:56:40 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 70411 invoked by uid 99); 27 Jan 2016 09:56:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2016 09:56:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DCBFA2C1F54 for ; Wed, 27 Jan 2016 09:56:39 +0000 (UTC) Date: Wed, 27 Jan 2016 09:56:39 +0000 (UTC) From: "Andrew Onischuk (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-14807) Systemd on RHEL/CentOS 7.2 breaks ambari-server startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-14807?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Onischuk updated AMBARI-14807: ------------------------------------- Description:=20 Systemd on RHEL/CentOS 7.2 breaks Ambari startup. Users are unable to automate the startup of Ambari services Steps to Reproduce: 1\. Install RHEL 7.2 =20 2\. Configure env for Ambari =20 3\. Install Ambari 2.2.0 =20 4\. Configure Ambari =20 5\. Start Ambari =20 6\. Try using systemd to work with Ambari eg. systemctl status ambari-serve= r Expected behaviour: Under RHEL 7.1 this worked, sample output: =20 =20 [root@node1 ~]# systemctl status ambari-server ambari-server.service - SYSV: ambari-server daemon Loaded: loaded (/etc/rc.d/init.d/ambari-server) Active: active (running) since Mon 2016-01-18 15:46:08 GMT; 16h ago Process: 903 ExecStart=3D/etc/rc.d/init.d/ambari-server start (code= =3Dexited, status=3D0/SUCCESS) CGroup: /system.slice/ambari-server.service =E2=94=94=E2=94=802343 /usr/jdk64/jdk1.8.0_40/bin/java -serv= er -XX:NewRatio=3D3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMS= Init... =20 Jan 18 15:45:51 node1.node1.com ambari-server[903]: Ambari Server runni= ng with administrator privileges. Jan 18 15:45:51 node1.node1.com ambari-server[903]: Running initdb: Thi= s may take upto a minute. Jan 18 15:45:51 node1.node1.com ambari-server[903]: About to start Post= greSQL Jan 18 15:45:51 node1.node1.com ambari-server[903]: Organizing resource= files at /var/lib/ambari-server/resources... Jan 18 15:45:51 node1.node1.com ambari-server[903]: Server PID at: /var= /run/ambari-server/ambari-server.pid Jan 18 15:45:51 node1.node1.com ambari-server[903]: Server out at: /var= /log/ambari-server/ambari-server.out Jan 18 15:45:51 node1.node1.com ambari-server[903]: Server log at: /var= /log/ambari-server/ambari-server.log Jan 18 15:46:08 node1.node1.com ambari-server[903]: Waiting for server = start................... Jan 18 15:46:08 node1.node1.com ambari-server[903]: Ambari Server 'star= t' completed successfully. Jan 18 15:46:08 node1.node1.com systemd[1]: Started SYSV: ambari-server= daemon. =20 Actual Behaviour: =20 =20 [root@ip-172-30-0-10 ec2-user]# systemctl status ambari-server =E2=97=8F ambari-server.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) [root@ip-172-30-0-10 ec2-user]# =20 Analysis: I have tested this on Ambari 2.2.0 on CentOS 7.1 and RHEL 7.2 and can confi= rm that it's broken on 7.2. Rackspace discovered this and provided the following feedback: Version 7.2 of CentOS/RHEL includes a new version of systemd that breaks ho= w the ambari-server is started up. =20 The init.d script from the ambari-server package is not recognized anymore = and not added to systemd, thus ambari-server cannot start at boot time anymore: =20 =20 [root@server-02 ~]# rpm -qa|grep ambari=20 ambari-agent-2.2.0.0-1310.x86_64=20 ambari-server-2.2.0.0-1310.x86_64=20 [root@server-02 ~]# cat /etc/redhat-release=20 CentOS Linux release 7.2.1511 (Core)=20 [root@server-02 ~]# systemctl daemon-reload=20 [root@server-02 ~]# systemctl status ambari-server=20 =E2=97=8F ambari-server.service=20 Loaded: not-found (Reason: No such file or directory)=20 Active: inactive (dead)=20 [root@server-02 ~]#=20 =20 I believe this is because /etc/rc.d/init.d/ambari-server is a symlink. =20 ambari-agent init script still works just fine: =20 =20 [root@server-02 ~]# ls -l /etc/rc.d/init.d/ambari-*=20 -rwxr-xr-x. 1 root root 1628 Dec 20 23:34 /etc/rc.d/init.d/ambari-agent= =20 lrwxrwxrwx. 1 root root 23 Jan 20 10:18 /etc/rc.d/init.d/ambari-server = -> /usr/sbin/ambari-server=20 [root@server-02 ~]# systemctl status ambari-agent=20 =E2=97=8F ambari-agent.service - SYSV: ambari-agent daemon=20 Loaded: loaded (/etc/rc.d/init.d/ambari-agent)=20 =20 If I remove the symlink and copy the /usr/sbin/ambari-server then systemd works again just fine: =20 =20 [root@server-02 ~]# unlink /etc/rc.d/init.d/ambari-server && cp -a /usr= /sbin/ambari-server /etc/rc.d/init.d/ambari-server && systemctl daemon-relo= ad=20 [root@server-02 ~]# systemctl status ambari-server=20 =E2=97=8F ambari-server.service - SYSV: ambari-server daemon=20 Loaded: loaded (/etc/rc.d/init.d/ambari-server)=20 =20 So please have this fixed as currently, by default, ambari-server startup i= s broken in CentOS/RHEL 7.2 was: Systemd on RHEL/CentOS 7.2 breaks Ambari startup. Users are unable to automate the startup of Ambari services Steps to Reproduce: 1\. Install RHEL 7.2 =20 2\. Configure env for Ambari =20 3\. Install Ambari 2.2.0 =20 4\. Configure Ambari =20 5\. Start Ambari =20 6\. Try using systemd to work with Ambari eg. systemctl status ambari-serve= r Expected behaviour: Under RHEL 7.1 this worked, sample output: =20 =20 [root@node1 ~]# systemctl status ambari-server ambari-server.service - SYSV: ambari-server daemon Loaded: loaded (/etc/rc.d/init.d/ambari-server) Active: active (running) since Mon 2016-01-18 15:46:08 GMT; 16h ago Process: 903 ExecStart=3D/etc/rc.d/init.d/ambari-server start (code= =3Dexited, status=3D0/SUCCESS) CGroup: /system.slice/ambari-server.service =E2=94=94=E2=94=802343 /usr/jdk64/jdk1.8.0_40/bin/java -serv= er -XX:NewRatio=3D3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMS= Init... =20 Jan 18 15:45:51 node1.node1.com ambari-server[903]: Ambari Server runni= ng with administrator privileges. Jan 18 15:45:51 node1.node1.com ambari-server[903]: Running initdb: Thi= s may take upto a minute. Jan 18 15:45:51 node1.node1.com ambari-server[903]: About to start Post= greSQL Jan 18 15:45:51 node1.node1.com ambari-server[903]: Organizing resource= files at /var/lib/ambari-server/resources... Jan 18 15:45:51 node1.node1.com ambari-server[903]: Server PID at: /var= /run/ambari-server/ambari-server.pid Jan 18 15:45:51 node1.node1.com ambari-server[903]: Server out at: /var= /log/ambari-server/ambari-server.out Jan 18 15:45:51 node1.node1.com ambari-server[903]: Server log at: /var= /log/ambari-server/ambari-server.log Jan 18 15:46:08 node1.node1.com ambari-server[903]: Waiting for server = start................... Jan 18 15:46:08 node1.node1.com ambari-server[903]: Ambari Server 'star= t' completed successfully. Jan 18 15:46:08 node1.node1.com systemd[1]: Started SYSV: ambari-server= daemon. =20 Actual Behaviour: =20 =20 [root@ip-172-30-0-10 ec2-user]# systemctl status ambari-server =E2=97=8F ambari-server.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) [root@ip-172-30-0-10 ec2-user]# =20 Support Analysis: I have tested this on Ambari 2.2.0 on CentOS 7.1 and RHEL 7.2 and can confi= rm that it's broken on 7.2. Rackspace discovered this and provided the following feedback: Version 7.2 of CentOS/RHEL includes a new version of systemd that breaks ho= w the ambari-server is started up. =20 The init.d script from the ambari-server package is not recognized anymore = and not added to systemd, thus ambari-server cannot start at boot time anymore: =20 =20 [root@server-02 ~]# rpm -qa|grep ambari=20 ambari-agent-2.2.0.0-1310.x86_64=20 ambari-server-2.2.0.0-1310.x86_64=20 [root@server-02 ~]# cat /etc/redhat-release=20 CentOS Linux release 7.2.1511 (Core)=20 [root@server-02 ~]# systemctl daemon-reload=20 [root@server-02 ~]# systemctl status ambari-server=20 =E2=97=8F ambari-server.service=20 Loaded: not-found (Reason: No such file or directory)=20 Active: inactive (dead)=20 [root@server-02 ~]#=20 =20 I believe this is because /etc/rc.d/init.d/ambari-server is a symlink. =20 ambari-agent init script still works just fine: =20 =20 [root@server-02 ~]# ls -l /etc/rc.d/init.d/ambari-*=20 -rwxr-xr-x. 1 root root 1628 Dec 20 23:34 /etc/rc.d/init.d/ambari-agent= =20 lrwxrwxrwx. 1 root root 23 Jan 20 10:18 /etc/rc.d/init.d/ambari-server = -> /usr/sbin/ambari-server=20 [root@server-02 ~]# systemctl status ambari-agent=20 =E2=97=8F ambari-agent.service - SYSV: ambari-agent daemon=20 Loaded: loaded (/etc/rc.d/init.d/ambari-agent)=20 =20 If I remove the symlink and copy the /usr/sbin/ambari-server then systemd works again just fine: =20 =20 [root@server-02 ~]# unlink /etc/rc.d/init.d/ambari-server && cp -a /usr= /sbin/ambari-server /etc/rc.d/init.d/ambari-server && systemctl daemon-relo= ad=20 [root@server-02 ~]# systemctl status ambari-server=20 =E2=97=8F ambari-server.service - SYSV: ambari-server daemon=20 Loaded: loaded (/etc/rc.d/init.d/ambari-server)=20 =20 So please have this fixed as currently, by default, ambari-server startup i= s broken in CentOS/RHEL 7.2 > Systemd on RHEL/CentOS 7.2 breaks ambari-server startup > ------------------------------------------------------- > > Key: AMBARI-14807 > URL: https://issues.apache.org/jira/browse/AMBARI-14807 > Project: Ambari > Issue Type: Bug > Reporter: Andrew Onischuk > Assignee: Andrew Onischuk > Fix For: 2.2.2 > > Attachments: AMBARI-14807.patch > > > Systemd on RHEL/CentOS 7.2 breaks Ambari startup. > Users are unable to automate the startup of Ambari services > Steps to Reproduce: > 1\. Install RHEL 7.2 =20 > 2\. Configure env for Ambari =20 > 3\. Install Ambari 2.2.0 =20 > 4\. Configure Ambari =20 > 5\. Start Ambari =20 > 6\. Try using systemd to work with Ambari eg. systemctl status ambari-ser= ver > Expected behaviour: > Under RHEL 7.1 this worked, sample output: > =20 > =20 > [root@node1 ~]# systemctl status ambari-server > ambari-server.service - SYSV: ambari-server daemon > Loaded: loaded (/etc/rc.d/init.d/ambari-server) > Active: active (running) since Mon 2016-01-18 15:46:08 GMT; 16h ag= o > Process: 903 ExecStart=3D/etc/rc.d/init.d/ambari-server start (code= =3Dexited, status=3D0/SUCCESS) > CGroup: /system.slice/ambari-server.service > =E2=94=94=E2=94=802343 /usr/jdk64/jdk1.8.0_40/bin/java -se= rver -XX:NewRatio=3D3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:C= MSInit... > =20 > Jan 18 15:45:51 node1.node1.com ambari-server[903]: Ambari Server run= ning with administrator privileges. > Jan 18 15:45:51 node1.node1.com ambari-server[903]: Running initdb: T= his may take upto a minute. > Jan 18 15:45:51 node1.node1.com ambari-server[903]: About to start Po= stgreSQL > Jan 18 15:45:51 node1.node1.com ambari-server[903]: Organizing resour= ce files at /var/lib/ambari-server/resources... > Jan 18 15:45:51 node1.node1.com ambari-server[903]: Server PID at: /v= ar/run/ambari-server/ambari-server.pid > Jan 18 15:45:51 node1.node1.com ambari-server[903]: Server out at: /v= ar/log/ambari-server/ambari-server.out > Jan 18 15:45:51 node1.node1.com ambari-server[903]: Server log at: /v= ar/log/ambari-server/ambari-server.log > Jan 18 15:46:08 node1.node1.com ambari-server[903]: Waiting for serve= r start................... > Jan 18 15:46:08 node1.node1.com ambari-server[903]: Ambari Server 'st= art' completed successfully. > Jan 18 15:46:08 node1.node1.com systemd[1]: Started SYSV: ambari-serv= er daemon. > =20 > Actual Behaviour: > =20 > =20 > [root@ip-172-30-0-10 ec2-user]# systemctl status ambari-server > =E2=97=8F ambari-server.service > Loaded: not-found (Reason: No such file or directory) > Active: inactive (dead) > [root@ip-172-30-0-10 ec2-user]# > =20 > Analysis: > I have tested this on Ambari 2.2.0 on CentOS 7.1 and RHEL 7.2 and can con= firm > that it's broken on 7.2. > Rackspace discovered this and provided the following feedback: > Version 7.2 of CentOS/RHEL includes a new version of systemd that breaks = how > the ambari-server is started up. =20 > The init.d script from the ambari-server package is not recognized anymor= e and > not added to systemd, thus ambari-server cannot start at boot time anymor= e: > =20 > =20 > [root@server-02 ~]# rpm -qa|grep ambari=20 > ambari-agent-2.2.0.0-1310.x86_64=20 > ambari-server-2.2.0.0-1310.x86_64=20 > [root@server-02 ~]# cat /etc/redhat-release=20 > CentOS Linux release 7.2.1511 (Core)=20 > [root@server-02 ~]# systemctl daemon-reload=20 > [root@server-02 ~]# systemctl status ambari-server=20 > =E2=97=8F ambari-server.service=20 > Loaded: not-found (Reason: No such file or directory)=20 > Active: inactive (dead)=20 > [root@server-02 ~]#=20 > =20 > I believe this is because /etc/rc.d/init.d/ambari-server is a symlink. = =20 > ambari-agent init script still works just fine: > =20 > =20 > [root@server-02 ~]# ls -l /etc/rc.d/init.d/ambari-*=20 > -rwxr-xr-x. 1 root root 1628 Dec 20 23:34 /etc/rc.d/init.d/ambari-age= nt=20 > lrwxrwxrwx. 1 root root 23 Jan 20 10:18 /etc/rc.d/init.d/ambari-serve= r -> /usr/sbin/ambari-server=20 > [root@server-02 ~]# systemctl status ambari-agent=20 > =E2=97=8F ambari-agent.service - SYSV: ambari-agent daemon=20 > Loaded: loaded (/etc/rc.d/init.d/ambari-agent)=20 > =20 > If I remove the symlink and copy the /usr/sbin/ambari-server then systemd > works again just fine: > =20 > =20 > [root@server-02 ~]# unlink /etc/rc.d/init.d/ambari-server && cp -a /u= sr/sbin/ambari-server /etc/rc.d/init.d/ambari-server && systemctl daemon-re= load=20 > [root@server-02 ~]# systemctl status ambari-server=20 > =E2=97=8F ambari-server.service - SYSV: ambari-server daemon=20 > Loaded: loaded (/etc/rc.d/init.d/ambari-server)=20 > =20 > So please have this fixed as currently, by default, ambari-server startup= is > broken in CentOS/RHEL 7.2 -- This message was sent by Atlassian JIRA (v6.3.4#6332)