Systemd fails to start httpd

Hardware information laptop, testing
$ inxi -Fzc 0
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_GB",
        LC_ALL = (unset),
        LC_MEASUREMENT = "nl_NL.UTF-8",
        LC_PAPER = "en_GB.UTF-8",
        LC_MONETARY = "nl_NL.UTF-8",
        LC_NAME = "en_GB.UTF-8",
        LC_ADDRESS = "en_GB.UTF-8",
        LC_NUMERIC = "en_GB.UTF-8",
        LC_TELEPHONE = "en_GB.UTF-8",
        LC_IDENTIFICATION = "en_GB.UTF-8",
        LC_TIME = "en_GB.UTF-8",
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
System:    Host: ReemZ-T0shiba Kernel: 4.18.12-1-CHAKRA x86_64 bits: 64 Desktop: KDE Plasma 5.14.3
           Distro: Chakra
Machine:   Type: Laptop System: TOSHIBA product: Satellite L550 v: PSLW0E-08P03VDU serial: <filter>
           Mobo: TOSHIBA model: KTWAA v: 1.00 serial: <filter> BIOS: TOSHIBA v: 1.90 date: 12/18/2009
Battery:   ID-1: BAT1 charge: 13.4 Wh condition: 45.8/48.6 Wh (94%)
CPU:       Topology: Dual Core model: Pentium T4400 bits: 64 type: MCP L2 cache: 1024 KiB
           Speed: 1877 MHz min/max: 1200/2200 MHz Core speeds (MHz): 1: 1877 2: 2000
Graphics:  Card-1: Intel Mobile 4 Series Integrated Graphics driver: i915 v: kernel
           Display: x11 server: X.Org 1.20.3 driver: intel unloaded: modesetting,vesa resolution: 1600x900~60Hz
           Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:     Card-1: Intel 82801I HD Audio driver: snd_hda_intel
           Sound Server: ALSA v: k4.18.12-1-CHAKRA
Network:   Card-1: Realtek RTL8101E/RTL8102E PCI Express Fast Ethernet driver: r8169
           IF: enp14s0 state: down mac: <filter>
           Card-2: Realtek RTL8191SEvB Wireless LAN driver: rtl8192se
           IF: wlp20s0 state: up mac: <filter>
Drives:    HDD Total Size: 111.79 GiB used: 8.52 GiB (7.6%)
           ID-1: /dev/sda vendor: Kingston model: SV300S37A120G size: 111.79 GiB
Partition: ID-1: / size: 81.36 GiB used: 8.52 GiB (10.5%) fs: ext4 dev: /dev/sda2
           ID-2: swap-1 size: 4.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda1
Sensors:   System Temperatures: cpu: 43.0 C mobo: N/A
           Fan Speeds (RPM): N/A
Info:      Processes: 141 Uptime: 2h 10m Memory: 3.70 GiB used: 975.3 MiB (25.8%) Shell: bash inxi: 3.0.10
Hardware information desktop, stable
$ inxi -Fzc 0
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_GB",
        LC_ALL = (unset),
        LC_MEASUREMENT = "nl_NL.UTF-8",
        LC_PAPER = "en_GB.UTF-8",
        LC_MONETARY = "nl_NL.UTF-8",
        LC_NAME = "en_GB.UTF-8",
        LC_ADDRESS = "en_GB.UTF-8",
        LC_NUMERIC = "en_GB.UTF-8",
        LC_TELEPHONE = "en_GB.UTF-8",
        LC_IDENTIFICATION = "en_GB.UTF-8",
        LC_TIME = "en_GB.UTF-8",
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
System:    Host: Linux-MC Kernel: 4.18.12-1-CHAKRA x86_64 bits: 64 Desktop: KDE Plasma 5.14.2 Distro: Chakra
Machine:   Type: Desktop System: MSI product: MS-7918 v: 1.0 serial: <filter>
           Mobo: MSI model: H97 GAMING 3 (MS-7918) v: 1.0 serial: <filter> UEFI [Legacy]: American Megatrends
           v: 1.9 date: 05/28/2015
CPU:       Topology: Quad Core model: Intel Core i5-4690 bits: 64 type: MCP L2 cache: 6144 KiB
           Speed: 2793 MHz min/max: 800/3900 MHz Core speeds (MHz): 1: 2793 2: 2641 3: 2798 4: 2789
Graphics:  Card-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics driver: i915 v: kernel
           Display: x11 server: X.Org 1.20.3 driver: intel unloaded: modesetting,vesa
           resolution: 1920x1200~60Hz
           Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:     Card-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio driver: snd_hda_intel
           Card-2: Intel 9 Series Family HD Audio driver: snd_hda_intel
           Sound Server: ALSA v: k4.18.12-1-CHAKRA
Network:   Card-1: Qualcomm Atheros Killer E2200 Gigabit Ethernet driver: alx
           IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 2.84 TiB used: 865.80 GiB (29.8%)
           ID-1: /dev/sda vendor: Kingston model: SUV400S37120G size: 111.79 GiB
           ID-2: /dev/sdb vendor: Samsung model: HD103SJ size: 931.51 GiB
           ID-3: /dev/sdc vendor: Western Digital model: WD2003FZEX-00Z4SA0 size: 1.82 TiB
Partition: ID-1: / size: 54.89 GiB used: 9.34 GiB (17.0%) fs: ext4 dev: /dev/sda1
           ID-2: /home size: 54.89 GiB used: 4.75 GiB (8.6%) fs: ext4 dev: /dev/sda2
           ID-3: swap-1 size: 8.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sdb2
Sensors:   System Temperatures: cpu: 29.8 C mobo: 27.8 C
           Fan Speeds (RPM): N/A
Info:      Processes: 172 Uptime: 5h 51m Memory: 7.66 GiB used: 1.64 GiB (21.4%) Shell: bash inxi: 3.0.10

On two completely different machines, one with testing repository enabled, systemd bluntly refuses to work nicely with Apache. The problem has been occurring for a while now, but didn’t originally occur when I installed and used Apache/PHP months ago.

Attempt to start httpd and failure messages
$ systemctl status httpd.service 
● httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
$ sudo systemctl start httpd.service 
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.
$ systemctl status httpd.service 
● httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2018-11-14 08:02:15 CET; 7s ago
  Process: 1336 ExecStart=/usr/bin/apachectl start (code=exited, status=1/FAILURE)

Nov 14 08:02:14 ReemZ-T0shiba systemd[1]: Starting Apache Web Server...
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: no listening sockets available, shutting down
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: AH00015: Unable to open logs
Nov 14 08:02:15 ReemZ-T0shiba systemd[1]: httpd.service: Control process exited, code=exited status=1
Nov 14 08:02:15 ReemZ-T0shiba systemd[1]: httpd.service: Failed with result 'exit-code'.
Nov 14 08:02:15 ReemZ-T0shiba systemd[1]: Failed to start Apache Web Server.
$ journalctl -xe
Nov 14 08:01:10 ReemZ-T0shiba kernel: rtlwifi: AP off, try to reconnect now
Nov 14 08:01:10 ReemZ-T0shiba kernel: wlp20s0: Connection to AP 9c:c7:a6:ce:85:17 lost
Nov 14 08:01:10 ReemZ-T0shiba wpa_supplicant[371]: wlp20s0: CTRL-EVENT-DISCONNECTED bssid=9c:c7:a6:ce:85:17 reason=4 locally_generated=1
Nov 14 08:01:10 ReemZ-T0shiba NetworkManager[319]: <warn>  [1542178870.2909] sup-iface[0x557ab80ff2d0,wlp20s0]: connection disconnected (reason -4)
Nov 14 08:01:10 ReemZ-T0shiba NetworkManager[319]: <info>  [1542178870.3102] device (wlp20s0): supplicant interface state: completed -> disconnected
Nov 14 08:01:10 ReemZ-T0shiba wpa_supplicant[371]: wlp20s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Nov 14 08:01:10 ReemZ-T0shiba NetworkManager[319]: <info>  [1542178870.3964] device (wlp20s0): supplicant interface state: disconnected -> scanning
Nov 14 08:01:11 ReemZ-T0shiba wpa_supplicant[371]: wlp20s0: SME: Trying to authenticate with 9c:c7:a6:ce:85:17 (SSID='Crappy signal...' freq=2417 MHz)
Nov 14 08:01:11 ReemZ-T0shiba kernel: wlp20s0: authenticate with 9c:c7:a6:ce:85:17
Nov 14 08:01:11 ReemZ-T0shiba kernel: wlp20s0: send auth to 9c:c7:a6:ce:85:17 (try 1/3)
Nov 14 08:01:11 ReemZ-T0shiba NetworkManager[319]: <info>  [1542178871.4394] device (wlp20s0): supplicant interface state: scanning -> authenticating
Nov 14 08:01:11 ReemZ-T0shiba kernel: wlp20s0: authenticated
Nov 14 08:01:11 ReemZ-T0shiba wpa_supplicant[371]: wlp20s0: Trying to associate with 9c:c7:a6:ce:85:17 (SSID='Crappy signal...' freq=2417 MHz)
Nov 14 08:01:11 ReemZ-T0shiba kernel: wlp20s0: associate with 9c:c7:a6:ce:85:17 (try 1/3)
Nov 14 08:01:11 ReemZ-T0shiba wpa_supplicant[371]: wlp20s0: Associated with 9c:c7:a6:ce:85:17
Nov 14 08:01:11 ReemZ-T0shiba wpa_supplicant[371]: wlp20s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Nov 14 08:01:11 ReemZ-T0shiba kernel: wlp20s0: RX AssocResp from 9c:c7:a6:ce:85:17 (capab=0x411 status=0 aid=1)
Nov 14 08:01:11 ReemZ-T0shiba kernel: rtl8192se: switch case 0x5e not processed
Nov 14 08:01:11 ReemZ-T0shiba kernel: wlp20s0: associated
Nov 14 08:01:11 ReemZ-T0shiba NetworkManager[319]: <info>  [1542178871.4870] device (wlp20s0): supplicant interface state: authenticating -> associating
Nov 14 08:01:11 ReemZ-T0shiba NetworkManager[319]: <info>  [1542178871.5193] device (wlp20s0): supplicant interface state: associating -> associated
Nov 14 08:01:11 ReemZ-T0shiba wpa_supplicant[371]: wlp20s0: WPA: Key negotiation completed with 9c:c7:a6:ce:85:17 [PTK=CCMP GTK=CCMP]
Nov 14 08:01:11 ReemZ-T0shiba wpa_supplicant[371]: wlp20s0: CTRL-EVENT-CONNECTED - Connection to 9c:c7:a6:ce:85:17 completed [id=0 id_str=]
Nov 14 08:01:11 ReemZ-T0shiba wpa_supplicant[371]: bgscan simple: Failed to enable signal strength monitoring
Nov 14 08:01:11 ReemZ-T0shiba NetworkManager[319]: <info>  [1542178871.5520] device (wlp20s0): supplicant interface state: associated -> 4-way handshake
Nov 14 08:01:11 ReemZ-T0shiba NetworkManager[319]: <info>  [1542178871.5691] device (wlp20s0): supplicant interface state: 4-way handshake -> completed
Nov 14 08:01:43 ReemZ-T0shiba plasmashell[534]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:342: Unable to assign [undefined] to int
Nov 14 08:01:43 ReemZ-T0shiba plasmashell[534]: qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 11721, resource id: 52428823, major code: 142 (Unknown), minor code: 3
Nov 14 08:01:44 ReemZ-T0shiba plasmashell[534]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:342: Unable to assign [undefined] to int
Nov 14 08:02:14 ReemZ-T0shiba sudo[1333]:    reemz : TTY=pts/0 ; PWD=/home/reemz ; USER=root ; COMMAND=/usr/bin/systemctl start httpd.service
Nov 14 08:02:14 ReemZ-T0shiba sudo[1333]: pam_unix(sudo:session): session opened for user root by reemz(uid=0)
Nov 14 08:02:14 ReemZ-T0shiba systemd[1]: Starting Apache Web Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: no listening sockets available, shutting down
Nov 14 08:02:15 ReemZ-T0shiba apachectl[1336]: AH00015: Unable to open logs
Nov 14 08:02:15 ReemZ-T0shiba systemd[1]: httpd.service: Control process exited, code=exited status=1
Nov 14 08:02:15 ReemZ-T0shiba systemd[1]: httpd.service: Failed with result 'exit-code'.
Nov 14 08:02:15 ReemZ-T0shiba systemd[1]: Failed to start Apache Web Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is RESULT.
Nov 14 08:02:15 ReemZ-T0shiba sudo[1333]: pam_unix(sudo:session): session closed for user root

Any ideas?

Check your config of Apache, this isn’t system’s error

httpd.conf (19.4 KB)

I’ve not made changes in that file for quite some time, in fact I only did right after installing Apache and PHP, and like I said it did work then. If it is the config, it must be because something else changed that the config should be made aware of - and me too.

Looks like there’s some other service using port 80, so Apache cannot bind it
Check this link for more informations and workaround

sudo netstat -tulpn | grep :80 returns nothing.

Did The Big Update™ this evening, tried starting Apache again just to see if it would make a difference, and it did. httpd is running normally again. Marking this as solved.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.