Results 1 to 8 of 8

Thread: upgrading from 12.3 to 13.1, apache2 and systemd

  1. #1
    jdd NNTP User

    Default upgrading from 12.3 to 13.1, apache2 and systemd

    Hello,

    I manage an online server. It worked perfetcly with 12.3.

    Now I upgraded it to 13.1, following strictly the wiki SDB, and mostly it worked.

    But I get a problem to start apache. It starts perfectly with "apache2ctl start", but do not with "systemctl start apache2.service" which is the boot time script :-(

    the systemctl status apache2.services gives:

    Code:
    ks311900:~ # systemctl status apache2.service  -l
    apache2.service - The Apache Webserver
       Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
       Active: inactive (dead) since mar. 2014-05-27 17:57:03 CEST; 2h 3min ago
      Process: 17760 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=0/SUCCESS)
      Process: 17742 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=0/SUCCESS)
     Main PID: 17742 (code=exited, status=0/SUCCESS)
    
    mai 27 17:57:03 ks311900 start_apache2[17742]: httpd (pid 17470) already running
    mai 27 17:57:03 ks311900 systemd[1]: Started The Apache Webserver.
    and after that it *do not run*.

    nothing at all in the logs as far as I can see :-(

    any idea what could have been changing from 12.3 to 13.1??

    thanks
    jdd

  2. #2
    jdd NNTP User

    Default Re: upgrading from 12.3 to 13.1, apache2 and systemd

    nobody have idea?

    nothing new since since yesterday, but after the apache2ctl restart, the errorlog have

    Code:
    [Wed May 28 09:16:33.673467 2014] [mpm_prefork:notice] [pid 6557] AH00163: Apache/2.4.6 (Linux/SUSE) PHP/5.4.20 configured -- resuming normal operations
    [Wed May 28 09:16:33.673528 2014] [core:notice] [pid 6557] AH00094: Command line: '/usr/sbin/httpd2 -f /etc/apache2/httpd.conf'
    that do not show error.

  3. #3
    jdd NNTP User

    Default Re: upgrading from 12.3 to 13.1, apache2 and systemd

    just in case, journalctl -xn result:

    Code:
    journalctl -xn                                                                      
    -- Logs begin at mar. 2014-05-27 12:23:20 CEST, end at mer. 2014-05-28 09:40:01 CEST. --
    mai 28 09:39:01 ks311900 systemd[1]: Starting Session c1387 of user root.
    -- Subject: Unit session-c1387.scope has begun with start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- Unit session-c1387.scope has begun starting up.
    mai 28 09:39:01 ks311900 systemd[1]: Started Session c1387 of user root.
    -- Subject: Unit session-c1387.scope has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- Unit session-c1387.scope has finished starting up.
    -- 
    -- The start-up result is done.
    mai 28 09:39:01 ks311900 /USR/SBIN/CRON[8356]: (root) CMD (/usr/local/rtm/bin/rtm 39 > /dev/null 2> /dev/null)
    mai 28 09:39:01 ks311900 kernel: SFW2-INext-ACC-TCP IN=eth0 OUT= MAC=00:30:48:be:e8:0a:00:1e:13:f9:af:00:08:00 SRC=5.9.97.244 DST=188.165.211.22 LEN=60 TOS=0x00 PREC=0x00 TTL=56 ID=60663 PROTO=TCP SPT=37859 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0 OPT (020405B40402080A02657D530000000001030307) 
    mai 28 09:39:20 ks311900 kernel: SFW2-INext-ACC-TCP IN=eth0 OUT= MAC=00:30:48:be:e8:0a:00:1e:13:f9:af:00:08:00 SRC=82.228.87.93 DST=188.165.211.22 LEN=60 TOS=0x00 PREC=0x00 TTL=54 ID=39211 DF PROTO=TCP SPT=32811 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0 OPT (020405B40402080A001264040000000001030307) 
    mai 28 09:39:51 ks311900 kernel: SFW2-INext-ACC-TCP IN=eth0 OUT= MAC=00:30:48:be:e8:0a:00:1e:13:f9:af:00:08:00 SRC=82.228.87.93 DST=188.165.211.22 LEN=60 TOS=0x00 PREC=0x00 TTL=54 ID=38722 DF PROTO=TCP SPT=32813 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0 OPT (020405B40402080A001281760000000001030307) 
    mai 28 09:40:01 ks311900 kernel: SFW2-INext-ACC-TCP IN=eth0 OUT= MAC=00:30:48:be:e8:0a:ec:30:91:e0:df:80:08:00 SRC=5.9.97.244 DST=188.165.211.22 LEN=60 TOS=0x00 PREC=0x00 TTL=56 ID=60702 PROTO=TCP SPT=33702 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0 OPT (020405B40402080A0265B76D0000000001030307) 
    mai 28 09:40:01 ks311900 systemd[1]: Starting Session c1388 of user root.
    -- Subject: Unit session-c1388.scope has begun with start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- Unit session-c1388.scope has begun starting up.
    mai 28 09:40:01 ks311900 systemd[1]: Started Session c1388 of user root.
    -- Subject: Unit session-c1388.scope has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- Unit session-c1388.scope has finished starting up.
    -- 
    -- The start-up result is done.
    mai 28 09:40:01 ks311900 /USR/SBIN/CRON[8409]: (root) CMD (/usr/local/rtm/bin/rtm 39 > /dev/null 2> /dev/null)
    "rtm" is probably the real time monitor installed by my provider from the beginning

    thanks
    jdd

  4. #4

    Default Re: upgrading from 12.3 to 13.1, apache2 and systemd

    Quote Originally Posted by jdd View Post
    Hello,

    I manage an online server. It worked perfetcly with 12.3.

    Now I upgraded it to 13.1, following strictly the wiki SDB, and mostly it worked.

    But I get a problem to start apache. It starts perfectly with "apache2ctl start", but do not with "systemctl start apache2.service" which is the boot time script :-(

    the systemctl status apache2.services gives:

    Code:
    ks311900:~ # systemctl status apache2.service  -l
    apache2.service - The Apache Webserver
       Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
       Active: inactive (dead) since mar. 2014-05-27 17:57:03 CEST; 2h 3min ago
      Process: 17760 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=0/SUCCESS)
      Process: 17742 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=0/SUCCESS)
     Main PID: 17742 (code=exited, status=0/SUCCESS)
    
    mai 27 17:57:03 ks311900 start_apache2[17742]: httpd (pid 17470) already running
    mai 27 17:57:03 ks311900 systemd[1]: Started The Apache Webserver.
    But it says it is already running. Was this after you started it manually with "apache2ctl"?

    Run "apache2ctl stop"
    Check whether an apache process ("httpd2-xxx") is running, and kill it.
    Try to remove /run/httpd.pid.

    Then run "systemctl start apache2" again, and post the output of "systemctl status apache2", please.

  5. #5
    jdd NNTP User

    Default Re: upgrading from 12.3 to 13.1, apache2 and systemd

    hello, thanks

    you may have been right.

    apache2ctl start

    starts the system

    after that, systemctl restart apache.service gives the message published, and let apache stopped (despite the message saying it's running).

    but

    apache2ctl stop
    systemctl start apache.service

    gives a running system.

    that's curious. but the better is that all works

    thanks again
    jdd

  6. #6

    Default Re: upgrading from 12.3 to 13.1, apache2 and systemd

    Quote Originally Posted by jdd View Post
    hello, thanks

    you may have been right.

    apache2ctl start

    starts the system

    after that, systemctl restart apache.service gives the message published, and let apache stopped (despite the message saying it's running).

    but

    apache2ctl stop
    systemctl start apache.service

    gives a running system.

    that's curious. but the better is that all works
    systemctl is for managing systemd's apache2.service.
    So it only cares whether that _systemd service_ is running or not. It doesn't know anything about apache2 itself.

    If apache2 (the daemon, process, executable, whatever you want to call it) is already running, apache2.service fails to start because it cannot start apache2 (obviously, as it is already running and doesn't allow itself to be started more than once).

    That's why "systemctl status apache2.service" gives "inactive (dead)", even though the apache2 daemon is indeed running.

    So, _either_ use apache2ctl _or_ systemctl to start/stop apache, but don't mix them.
    Last edited by wolfi323; 28-May-2014 at 02:07.

  7. #7
    jdd NNTP User

    Default Re: upgrading from 12.3 to 13.1, apache2 and systemd

    Quote Originally Posted by wolfi323 View Post
    systemctl is for managing systemd's apache2.service.
    So it only cares whether that _systemd service_ is running or not. It doesn't know anything about apache2 itself.

    If apache2 (the daemon, process, executable, whatever you want to call it) is already running, apache2.service fails to start because it cannot start apache2 (obviously, as it is already running and doesn't allow itself to be started more than once).

    That's why "systemctl status apache2.service" gives "inactive (dead)", even though the apache2 daemon is indeed running.

    So, _either_ use apache2ctl _or_ systemctl to start/stop apache, but don't mix them.
    yes, I understand this, what is curious is that apache is no more running after systemctl action.

    I use apache2ctl because it reports better (IMHO) the errors in config files, but I wile wrtie down that it needs to stop before everything else

    thanks
    jdd

  8. #8

    Default Re: upgrading from 12.3 to 13.1, apache2 and systemd

    Quote Originally Posted by jdd View Post
    yes, I understand this, what is curious is that apache is no more running after systemctl action.
    Hm, no idea.
    AFAICS the systemd service just calls /usr/share/apache2/find_mpm and /usr/sbin/httpd2 (via the /usr/sbin/start_apache2 script).

    But running httpd2 again should not kill the running process I suppose...

    OK, scratch that.
    It (apache2 gets killed when being started by apache2ctl) only seems to happen when you call "systemctl status apache2".

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •