Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 53

Thread: Apache doesn't start correctly on boot (very often)

  1. #11
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,703

    Default Re: Apache doesn't start correctly on boot (very often)

    Could be a bug I don't run a web server so can not confirm need a user that uses web servers to jump in

    I was just pointing out were things may go wrong.

  2. #12

    Default Re: Apache doesn't start correctly on boot (very often)

    Ok. I reported it to bugzilla.

  3. #13
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,518

    Default Re: Apache doesn't start correctly on boot (very often)

    Quote Originally Posted by gogalthorp View Post
    Apache is starting before the network maybe

    try syatemctl-analyze plot to see
    @ heyjoe: As an alternative to the graphical systemd-analyze plot, you could try a search of the systemd journal:
    Code:
     # journalctl --this-boot | grep -iE 'network|apache'
    Feb 23 08:18:49 xxx systemd[1]: Starting Host and Network Name Lookups.
    Feb 23 08:18:49 xxx systemd[1]: Reached target Host and Network Name Lookups.
    Feb 23 08:18:49 xxx avahi-daemon[891]: Network interface enumeration completed.
    Feb 23 08:18:49 xxx systemd[1]: Starting wicked network management service daemon...
    Feb 23 08:18:49 xxx systemd[1]: Started wicked network management service daemon.
    Feb 23 08:18:49 xxx systemd[1]: Starting wicked network nanny service...
    Feb 23 08:18:49 xxx systemd[1]: Started wicked network nanny service.
    Feb 23 08:18:58 xxx systemd[1]: Started wicked managed network interfaces.
    Feb 23 08:18:58 xxx systemd[1]: Starting Network.
    Feb 23 08:18:58 xxx systemd[1]: Reached target Network.
    Feb 23 08:18:58 xxx systemd[1]: Starting The Apache Webserver...
    Feb 23 08:18:58 xxx systemd[1]: Starting Network is Online.
    Feb 23 08:18:58 xxx systemd[1]: Reached target Network is Online.
    Feb 23 08:19:00 xxx start-ntpd[1441]: Starting network time protocol daemon (NTPD)sntp 4.2.8p8@1.3265-o Thu Sep 22 14:57:28 UTC 2016 (1)
    Feb 23 08:19:00 xxx systemd[1]: Started The Apache Webserver.
     #
    Note that, the Apache Webserver is started after the systemd target "Network" has been reached but, before the systemd step "Network is Online" is being started.

    BTW, the dates where the AH00052 Segmentation faults occurred were the timestamps in "/var/log/apache2/error_log".

  4. #14

    Default Re: Apache doesn't start correctly on boot (very often)

    Ok here is that output (including the manual restarting of Apache after boot):

    Code:
    # journalctl --this-boot | grep -iE 'network|apache'
    Feb 23 09:28:29 xxx systemd-udevd[251]: Network interface NamePolicy= disabled on kernel commandline, ignoring.
    Feb 23 09:28:29 xxx systemd-udevd[251]: Network interface NamePolicy= disabled on kernel commandline, ignoring.
    Feb 23 09:28:38 xxx systemd-udevd[552]: Network interface NamePolicy= disabled on kernel commandline, ignoring.
    Feb 23 09:28:38 xxx kernel: e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
    Feb 23 09:28:38 xxx kernel: e1000e 0000:00:19.0 eth1: Intel(R) PRO/1000 Network Connection
    Feb 23 09:28:39 xxx avahi-daemon[1109]: Network interface enumeration completed.
    Feb 23 09:28:40 xxx systemd[1]: Starting wicked network management service daemon...
    Feb 23 09:28:40 xxx systemd[1]: Started wicked network management service daemon.
    Feb 23 09:28:40 xxx systemd[1]: Starting wicked network nanny service...
    Feb 23 09:28:40 xxx systemd[1]: Started wicked network nanny service.
    Feb 23 09:28:40 xxx systemd[1]: Starting wicked managed network interfaces...
    Feb 23 09:28:43 xxx systemd[1]: Started wicked managed network interfaces.
    Feb 23 09:28:43 xxx systemd[1]: Starting Network.
    Feb 23 09:28:43 xxx systemd[1]: Reached target Network.
    Feb 23 09:28:43 xxx systemd[1]: Starting Network UPS Tools - power device driver controller...
    Feb 23 09:28:43 xxx systemd[1]: Starting Network is Online.
    Feb 23 09:28:43 xxx systemd[1]: Reached target Network is Online.
    Feb 23 09:28:43 xxx start-ntpd[1476]: Starting network time protocol daemon (NTPD)
    Feb 23 09:28:43 xxx systemd[1]: Starting The Apache Webserver...
    Feb 23 09:28:45 xxx systemd[1]: Started The Apache Webserver.
    Feb 23 09:28:48 xxx upsdrvctl[1481]: Network UPS Tools - Generic HID driver 0.38 (2.7.1)
    Feb 23 09:28:49 xxx systemd[1]: Started Network UPS Tools - power device driver controller.
    Feb 23 09:28:49 xxx systemd[1]: Starting Network UPS Tools - power devices information server...
    Feb 23 09:28:49 xxx systemd[1]: Started Network UPS Tools - power devices information server.
    Feb 23 09:28:49 xxx systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
    Feb 23 09:28:49 xxx upsdrvctl[1481]: Network UPS Tools - UPS driver controller 2.7.1
    Feb 23 09:28:49 xxx systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.
    Feb 23 09:33:22 xxx systemd[1]: Stopping The Apache Webserver...
    Feb 23 09:33:22 xxx systemd[1]: Starting The Apache Webserver...
    Feb 23 09:33:24 xxx systemd[1]: Started The Apache Webserver.
    It seems in my case network is online before starting Apache.

    BTW bugzilla seems not helpful. Someone just replied to the ticket requesting need-info but refused to even explain the steps how to get this info with an explanation that he has no time for this. This is the third time in my recent bugzilla reports when someone replies with something in the style "STFW for how to debug" which is quite frustrating.

    Quote Originally Posted by dcurtisfra View Post
    BTW, the dates where the AH00052 Segmentation faults occurred were the timestamps in "/var/log/apache2/error_log".
    Hm. But the dates in my log are from this February and you were talking about 25.April last year. That's why I wonder where this info comes from?

  5. #15
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,518

    Default Re: Apache doesn't start correctly on boot (very often)

    Quote Originally Posted by heyjoe View Post
    Hm. But the dates in my log are from this February and you were talking about 25.April last year. That's why I wonder where this info comes from?
    In my case, the AH00052 Segmentation faults are (quite) intermittent: initially 9 months between occurrences; and then since the 24th of January this year, nothing . . .

    In your case, with a later version of Apache, it seems that the AH00052 Segmentation faults are occurring regularly -- not intermittently . . .

    More specific to your case, are the AH00547 errors being reported by the Apache core.

    Why the concern related to the Segmentation faults?
    • A segmentation fault (often shortened to segfault) or access violation is a fault, or failure condition, raised by hardware with memory protection, notifying an operating system (OS) the software has attempted to access a restricted area of memory (a memory access violation).
    • They arise primarily due to errors in use of pointers for virtual memory addressing, particularly illegal access.

    In other words, for folks concerned about software quality, Segmentation faults are bad news -- they are an indication of a fundamental programming error -- a correct implementation never suffers from Segmentation faults.

    And the AH00547 errors?
    It seems that the network Name Service cache is taking some time to initialise and there is something in the Apache start-up which needs to access a named network resource which the network Name Service cannot, at that point in time, resolve.
    You could try: " # journalctl --this-boot | grep -iE 'name service|network|apache'"
    • The systemd "nscd.service" is the "Name Service Cache Daemon" which is normally started before the Network is started.
    • The systemd "systemd-hostnamed.service" is the "Hostname Service" which is normally started after the Apache Webserver has started.

  6. #16

    Default Re: Apache doesn't start correctly on boot (very often)

    All these sound like serious issues. I wonder why the neglecting attitude I received in bugzilla. Someone should definitely look into this. I am not sure what to do.

    Here is the output of today's boot:

    Code:
    # journalctl --this-boot | grep -iE 'name service|network|apache'
    Feb 24 08:59:35 xxx systemd-udevd[250]: Network interface NamePolicy= disabled on kernel commandline, ignoring.
    Feb 24 08:59:35 xxx systemd-udevd[250]: Network interface NamePolicy= disabled on kernel commandline, ignoring.
    Feb 24 08:59:43 xxx systemd-udevd[561]: Network interface NamePolicy= disabled on kernel commandline, ignoring.
    Feb 24 08:59:44 xxx kernel: e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
    Feb 24 08:59:44 xxx kernel: e1000e 0000:00:19.0 eth1: Intel(R) PRO/1000 Network Connection
    Feb 24 08:59:44 xxx avahi-daemon[1128]: Network interface enumeration completed.
    Feb 24 08:59:46 xxx systemd[1]: Starting wicked network management service daemon...
    Feb 24 08:59:46 xxx systemd[1]: Started wicked network management service daemon.
    Feb 24 08:59:46 xxx systemd[1]: Starting wicked network nanny service...
    Feb 24 08:59:46 xxx systemd[1]: Started wicked network nanny service.
    Feb 24 08:59:46 xxx systemd[1]: Starting wicked managed network interfaces...
    Feb 24 08:59:48 xxx systemd[1]: Started wicked managed network interfaces.
    Feb 24 08:59:48 xxx systemd[1]: Starting Network.
    Feb 24 08:59:48 xxx systemd[1]: Reached target Network.
    Feb 24 08:59:49 xxx systemd[1]: Starting Network UPS Tools - power device driver controller...
    Feb 24 08:59:49 xxx systemd[1]: Starting Network is Online.
    Feb 24 08:59:49 xxx systemd[1]: Reached target Network is Online.
    Feb 24 08:59:49 xxx start-ntpd[1496]: Starting network time protocol daemon (NTPD)
    Feb 24 08:59:49 xxx systemd[1]: Starting The Apache Webserver...
    Feb 24 08:59:51 xxx systemd[1]: Started The Apache Webserver.
    Feb 24 08:59:54 xxx upsdrvctl[1500]: Network UPS Tools - Generic HID driver 0.38 (2.7.1)
    Feb 24 08:59:55 xxx systemd[1]: Started Network UPS Tools - power device driver controller.
    Feb 24 08:59:55 xxx upsdrvctl[1500]: Network UPS Tools - UPS driver controller 2.7.1
    Feb 24 08:59:55 xxx systemd[1]: Starting Network UPS Tools - power devices information server...
    Feb 24 08:59:55 xxx systemd[1]: Started Network UPS Tools - power devices information server.
    Feb 24 08:59:55 xxx systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
    Feb 24 08:59:55 xxx systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.
    Feb 24 09:05:37 xxx systemd[1]: Starting Hostname Service...
    Feb 24 09:05:37 xxx systemd[1]: Started Hostname Service.
    BTW today I noticed another weirdness with Apache. I wonder if it is related in any way. I asked about it in this thread.

  7. #17
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,518

    Default Re: Apache doesn't start correctly on boot (very often)

    On my Leap 42.2 AMD Laptop the systemd journal network and name service trace looks like this (shortened because of Network Manager and WLAN):
    Code:
     # journalctl --this-boot | grep -iE 'name service|network|apache'
    Feb 27 09:41:35 xxx systemd-udevd[180]: Network interface NamePolicy= disabled by default.
    Feb 27 09:41:35 xxx systemd-udevd[180]: Network interface NamePolicy= disabled by default.
    Feb 27 09:41:45 xxx systemd-udevd[481]: Network interface NamePolicy= disabled by default.
    Feb 27 09:41:48 xxx kernel: audit: type=1400 audit(1488184908.185:7): apparmor="STATUS" operation="profile_load" name="/usr/lib/apache2/mpm-prefork/apache2" pid=517 comm="apparmor_parser"
    Feb 27 09:41:48 xxx kernel: audit: type=1400 audit(1488184908.185:8): apparmor="STATUS" operation="profile_load" name="/usr/lib/apache2/mpm-prefork/apache2//DEFAULT_URI" pid=517 comm="apparmor_parser"
    Feb 27 09:41:48 xxx kernel: audit: type=1400 audit(1488184908.185:9): apparmor="STATUS" operation="profile_load" name="/usr/lib/apache2/mpm-prefork/apache2//HANDLING_UNTRUSTED_INPUT" pid=517 comm="apparmor_parser"
    Feb 27 09:41:48 xxx kernel: audit: type=1400 audit(1488184908.185:10): apparmor="STATUS" operation="profile_load" name="/usr/lib/apache2/mpm-prefork/apache2//phpsysinfo" pid=517 comm="apparmor_parser"
    Feb 27 09:41:48 xxx kernel: FUJITSU Extended Socket Network Device Driver - version 1.0 - Copyright (c) 2015 FUJITSU LIMITED
    Feb 27 09:42:03 xxx systemd[1]: Starting Name Service Cache Daemon...
    Feb 27 09:42:03 xxx systemd[1]: Started Name Service Cache Daemon.
    Feb 27 09:42:03 xxx systemd[1]: Reached target Host and Network Name Lookups.
    Feb 27 09:42:04 xxx avahi-daemon[1107]: Network interface enumeration completed.
    Feb 27 09:42:05 xxx systemd[1]: Starting Network Manager...
    Feb 27 09:42:06 xxx NetworkManager[1227]: <info>  NetworkManager (version 1.0.12) is starting...
    Feb 27 09:42:06 xxx NetworkManager[1227]: <info>  Read config: /etc/NetworkManager/NetworkManager.conf
    Feb 27 09:42:06 xxx systemd[1]: Started Network Manager.
    Feb 27 09:42:06 xxx systemd[1]: Reached target Network
     .
     .
     .
     .
     #
    Is the Name Service Cache daemon (nscd) disabled on the troubled machines?
    Code:
     # systemctl status nscd.service
    ● nscd.service - Name Service Cache Daemon
       Loaded: loaded (/usr/lib/systemd/system/nscd.service; enabled; vendor preset: enabled)
       Active: active (running) since Mo 2017-02-27 09:42:03 CET; 10min ago
      Process: 1105 ExecStart=/usr/sbin/nscd (code=exited, status=0/SUCCESS)
     Main PID: 1116 (nscd)
        Tasks: 11 (limit: 512)
       CGroup: /system.slice/nscd.service
               └─1116 /usr/sbin/nscd
    
    Feb 27 09:42:03 xxx nscd[1116]: 1116 monitoring directory `/etc` (2)
    Feb 27 09:42:03 xxx nscd[1116]: 1116 monitoring file `/etc/resolv.conf` (5)
    Feb 27 09:42:03 xxx nscd[1116]: 1116 monitoring directory `/etc` (2)
    Feb 27 09:42:03 xxx nscd[1116]: 1116 monitoring file `/etc/services` (6)
    Feb 27 09:42:03 xxx nscd[1116]: 1116 monitoring directory `/etc` (2)
    Feb 27 09:42:03 xxx nscd[1116]: 1116 monitoring file `/etc/netgroup` (7)
    Feb 27 09:42:03 xxx nscd[1116]: 1116 monitoring directory `/etc` (2)
    Feb 27 09:42:03 xxx systemd[1]: Started Name Service Cache Daemon.
    Feb 27 09:43:37 xxx nscd[1116]: 1116 monitored file `/etc/resolv.conf` was written to
    Feb 27 09:43:39 xxx nscd[1116]: 1116 monitored file `/etc/resolv.conf` was written to
     #
    BTW: it seems that the Leap 42.2 systems (and possibly the Leap 42.1 systems) disable the Network interface Name Policy by default -- therefore no need to disable it on the kernel command line.

  8. #18

    Default Re: Apache doesn't start correctly on boot (very often)

    It is not disabled:

    Code:
    # systemctl status nscd.service
    nscd.service - Name Service Cache Daemon
       Loaded: loaded (/usr/lib/systemd/system/nscd.service; enabled)
       Active: active (running) since Mon 2017-02-27 10:35:14 EET; 41min ago
      Process: 1139 ExecStart=/usr/sbin/nscd (code=exited, status=0/SUCCESS)
     Main PID: 1140 (nscd)
       CGroup: /system.slice/nscd.service
               └─1140 /usr/sbin/nscd
    

  9. #19
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,518

    Default Re: Apache doesn't start correctly on boot (very often)

    Yes, but, why isn't the Name Service (caching) daemon being started before the Network comes up?

  10. #20

    Default Re: Apache doesn't start correctly on boot (very often)

    Quote Originally Posted by dcurtisfra View Post
    Yes, but, why isn't the Name Service (caching) daemon being started before the Network comes up?
    I really don't know. I was hoping someone who does to help.

    BTW are we sure about that? In my pasted log I don't see "Name Service Cache Daemon". I see only "Hostname Service" (is it the same?). So how can we know when nscd is started? And is this the actual reason for the main issue?

Page 2 of 6 FirstFirst 1234 ... LastLast

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
  •