View Issue Details

IDProjectCategoryView StatusLast Update
0017334CentOS-8httpdpublic2020-06-02 14:29
Reportergryzli 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version8.1.1911 
Target VersionFixed in Version 
Summary0017334: Apache does not start on boot (when enabled in systemd)
DescriptionHello,

I've encountered the following problem with default Apache systemd file.

Apache is trying to start before the network is fully up, which leads to the following error:
cat /var/log/messages | grep httpd
----
(99)Cannot assign requested address: AH00072: make_sock: could not bind to address 192.168.....:8080
httpd[1096]: no listening sockets available, shutting down
httpd[1096]: AH00015: Unable to open logs
Steps To Reproducednf install httpd
systemctl enable httpd
reboot
Additional InformationI was able to fix this by changing the following line in: /usr/lib/systemd/system/httpd.service

After=network.target remote-fs.target nss-lookup.target httpd-init.service

TO ===>

After=network-online.target remote-fs.target nss-lookup.target httpd-init.service
TagsNo tags attached.

Activities

mexilence

mexilence

2020-06-02 14:29

reporter   ~0037024

Just throwing my 2 cents in here.

I was experiencing an issue where httpd would start upon reboot of a server, but it would not serve a simple proxypass, resulting in 404 error UNTIL httpd was restarted upon which point in time proxypasses functioned correctly. Timeout and retry values were never honored either, until restart of httpd subsequent to a reboot. I verified this on two different 8.1.1911 systems.

Since two systems had the same issue, I came here and found this bug report. Adding the -online to network.target allows httpd to function properly upon reboot.

CentOS Linux release 8.1.1911 (Core)
Derived from Red Hat Enterprise Linux 8.1 (Source)
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

CentOS Linux release 8.1.1911 (Core)
CentOS Linux release 8.1.1911 (Core)
cpe:/o:centos:centos:8



Server version: Apache/2.4.37 (centos)
Server built: Dec 23 2019 20:45:34
Server's Module Magic Number: 20120211:83
Server loaded: APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.3, APR-UTIL 1.6.1
Architecture: 64-bit
Server MPM: event
  threaded: yes (fixed thread count)
    forked: yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Issue History

Date Modified Username Field Change
2020-05-06 06:45 gryzli New Issue
2020-06-02 14:29 mexilence Note Added: 0037024