Solved

Centreon 22.04 : Failed to start The Apache HTTP Server

  • 19 October 2022
  • 2 replies
  • 1511 views

Badge +1

I have an issu  CentOS 7.9.2009

systemctl status httpd24-httpd
● httpd24-httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd24-httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2022-10-19 15:27:55 CEST; 5min ago
  Process: 15682 ExecStart=/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 15682 (code=exited, status=1/FAILURE)
   Status: "Reading configuration..."

Oct 19 15:27:54 srv-log systemd[1]: Starting The Apache HTTP Server...
Oct 19 15:27:55 srv-log httpd-scl-wrapper[15682]: (20014)Internal error: AH00058: Error retrieving pid file run/httpd.pid
Oct 19 15:27:55 srv-log httpd-scl-wrapper[15682]: AH00059: Remove it before continuing if it is corrupted.
Oct 19 15:27:55 srv-log systemd[1]: httpd24-httpd.service: main process exited, code=exited, status=1/FAILURE
Oct 19 15:27:55 srv-log systemd[1]: Failed to start The Apache HTTP Server.
Oct 19 15:27:55 srv-log systemd[1]: Unit httpd24-httpd.service entered failed state.
Oct 19 15:27:55 srv-log systemd[1]: httpd24-httpd.service failed

 

Can anyone help me

icon

Best answer by Olivier666 21 October 2022, 08:11

View original

2 replies

Badge +1

when i send :ps aux | egrep '(httpd|php-)'

i get :
root      1002  0.0  0.4 421884 18880 ?        Ss   Oct18   0:11 php-fpm: master process (/etc/php-fpm.conf)
apache    1206  0.0  0.2 421848  9548 ?        S    Oct18   0:00 php-fpm: pool www
apache    1207  0.0  0.2 421848  9548 ?        S    Oct18   0:00 php-fpm: pool www
apache    1208  0.0  0.2 421848  9548 ?        S    Oct18   0:00 php-fpm: pool www
apache    1209  0.0  0.2 421848  9548 ?        S    Oct18   0:00 php-fpm: pool www
apache    1210  0.0  0.2 421848  9548 ?        S    Oct18   0:00 php-fpm: pool www
root     31081  0.0  0.0 112816  1008 pts/0    S+   18:46   0:00 grep -E --color=auto (httpd|php-)

 

I think It's missing :

root      98965  0.0  0.1 496704 22504 ?        Ss   00:51   0:01 /usr/sbin/httpd -DFOREGROUND
apache    98966  0.0  0.1 496840 12440 ?        S    00:51   0:00 /usr/sbin/httpd -DFOREGROUND
apache    98967  0.0  0.1 496840 12428 ?        S    00:51   0:00 /usr/sbin/httpd -DFOREGROUND
apache    98968  0.0  0.0 496704 11688 ?        S    00:51   0:00 /usr/sbin/httpd -DFOREGROUND
apache    98969  0.0  0.1 496840 12428 ?        S    00:51   0:00 /usr/sbin/httpd -DFOREGROUND
apache    98970  0.0  0.0 496840 11928 ?        S    00:51   0:00 /usr/sbin/httpd -DFOREGROUND
apache    99031  0.0  0.0 496704 11688 ?        S    00:52   0:00 /usr/sbin/httpd -DFOREGROUND
apache    99034  0.0  0.0 496704 11688 ?        S    00:52   0:00 /usr/sbin/httpd -DFOREGROUND
apache    99035  0.0  0.0 496704 11688 ?        S    00:52   0:00 /usr/sbin/httpd -DFOREGROUND
 

 

Badge +1

Success !

the problem came from the file httpd.pid :

[root@srv-log /]# mv /opt/rh/httpd24/root/var/run/httpd/httpd.pid /opt/rh/httpd24/root/var/run/httpd/httpd.pid.bk
[root@srv-log /]# systemctl restart httpd24-httpd
[root@srv-log /]# systemctl status httpd24-httpd
● httpd24-httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd24-httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2022-10-20 20:54:07 CEST; 7s ago
 Main PID: 2048 (httpd)
   Status: "Processing requests..."
   CGroup: /system.slice/httpd24-httpd.service
           ├─2048 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
           ├─2049 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
           ├─2050 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
           ├─2051 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
           ├─2053 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
           ├─2058 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
           └─2104 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND

Oct 20 20:54:07 srv-log systemd[1]: Starting The Apache HTTP Server...
Oct 20 20:54:07 srv-log systemd[1]: Started The Apache HTTP Server.

Reply