I cannot restart apache on CentOS. The results are below. I cannot locate a meaningful error to fix the issue.
Running service httpd start
Results in
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
Then running systemctl status httpd.service
Results in
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2017-06-11 08:29:11 EDT; 15min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 640 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 638 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=killed, signal=SEGV)
Main PID: 638 (code=killed, signal=SEGV)
Jun 11 08:29:11 server systemd[1]: Starting The Apache HTTP Server...
Jun 11 08:29:11 server systemd[1]: httpd.service: main process exited, code=killed, status=11/SEGV
Jun 11 08:29:11 server kill[640]: kill: cannot find process ""
Jun 11 08:29:11 server systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 11 08:29:11 server systemd[1]: Failed to start The Apache HTTP Server.
Jun 11 08:29:11 server systemd[1]: Unit httpd.service entered failed state.
Jun 11 08:29:11 server systemd[1]: httpd.service failed.
And journalctl -xe
Results in
Jun 11 08:45:10 server systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Jun 11 08:45:10 server systemd[1]: httpd.service: main process exited, code=killed, status=11/SEGV
Jun 11 08:45:10 server kill[691]: kill: cannot find process ""
Jun 11 08:45:10 server systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 11 08:45:10 server systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Jun 11 08:45:10 server systemd[1]: Unit httpd.service entered failed state.
Jun 11 08:45:10 server systemd[1]: httpd.service failed.
And from /etc/httpd/logs/error_log
[Sun Jun 11 08:49:33.214825 2017] [suexec:notice] [pid 761] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jun 11 08:49:33.237392 2017] [auth_digest:notice] [pid 761] AH01757: generating secret for digest authentication ...
[Sun Jun 11 08:49:33.238036 2017] [lbmethod_heartbeat:notice] [pid 761] AH02282: No slotmem from mod_heartmonitor
PHP Fatal error: PHP Startup: apc_shm_create: shmget(0, 67108864, 914) failed: Invalid argument. It is possible that the chosen SHM segment size is higher than the operation system allows. Linux has usually a default limit of 32MB per segment. in Unknown on line 0
PHP Fatal error: PHP Startup: apc_shm_attach: shmat failed: in Unknown on line 0
Related
[ec2-user#tower1 ~]$ systemctl status httpd.service -l
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2021-10-28 12:13:49 UTC; 5min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 12139 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 12137 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 12137 (code=exited, status=1/FAILURE)
Oct 28 12:13:49 tower1.12c2.internal httpd[12137]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Oct 28 12:13:49 tower1.12c2.internal httpd[12137]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Oct 28 12:13:49 tower1.12c2.internal httpd[12137]: no listening sockets available, shutting down
Oct 28 12:13:49 tower1.12c2.internal httpd[12137]: AH00015: Unable to open logs
Oct 28 12:13:49 tower1.12c2.internal systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Oct 28 12:13:49 tower1.12c2.internal kill[12139]: kill: cannot find process ""
Oct 28 12:13:49 tower1.12c2.internal systemd[1]: httpd.service: control process exited, code=exited status=1
Oct 28 12:13:49 tower1.12c2.internal systemd[1]: Failed to start The Apache HTTP Server.
Oct 28 12:13:49 tower1.12c2.internal systemd[1]: Unit httpd.service entered failed state.
Oct 28 12:13:49 tower1.12c2.internal systemd[1]: httpd.service failed.
I'm running few things on CentOS 7. Everything was working fine until full update with yum update. Can't launch Apache since.
I tried everything including removing and reinstalling httpd.
The error I'm getting is this:
**systemctl status httpd.service**
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-07-09 20:50:18 CEST; 34min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 5785 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 5785 (code=exited, status=1/FAILURE)
Jul 09 20:50:18 vps.xyz.com systemd[1]: Starting The Apache HTTP Server...
Jul 09 20:50:18 vps.xyz.com httpd[5785]: [Thu Jul 09 20:50:18.618214 2020] [so:warn] [pid 5785] AH01574: module systemd_module is already ...skipping
Jul 09 20:50:18 vps.xyz.com httpd[5785]: AH00526: Syntax error on line 1 of /etc/httpd/conf/httpd.conf:
Jul 09 20:50:18 vps.xyz.com httpd[5785]: Invalid command '\xef\xbb\xbfServerRoot', perhaps misspelled or defined by a module not included ...guration
Jul 09 20:50:18 vps.xyz.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 09 20:50:18 vps.xyz.com systemd[1]: Failed to start The Apache HTTP Server.
Jul 09 20:50:18 vps.xyz.com systemd[1]: Unit httpd.service entered failed state.
Jul 09 20:50:18 vps.xyz.com systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
It doesn't matter how I edit httpd.conf, it always shows me the same \xef\xbb\xbf error.
Looks like an encoding issue. Could you please encoding type of httpd.conf file. It should be UTF-8 Unicode text
file httpd.conf
i.e
[test#test bin]# file /etc/httpd/conf/httpd.conf
/etc/httpd/conf/httpd.conf: UTF-8 Unicode text
On Notepad++ you can use the Encoding -> Encode in UTF-8 without BOM option to remove it
are they any Centos 7 / Apache 2.4.6 experts out there?
I am a newbie at web servers, but I have read Go Daddy's Support instructions, Apache HTTPD support sites, and every other Support Forum I can find about this issue.
I have setup the Centos 7 server with HTTPD 2.4.6. I created the Private Key with Open SSL and the CSR and sent the request to Go Daddy. I received back three files: the Server Certificate File and the CA Bundle File. I have copied these files to my server. I have setup the virtual host configuration files with:
<VirtualHost *:443>
ServerName www.laggersec.org
ServerAlias laggersec.org
DocumentRoot /var/www/laggersec.org/html
ErrorLog /var/www/laggersec.org/log/error.log
CustomLog /var/www/laggersec.org/log/requests.log combined
SSLEngine on
SSLProtocol -all +TLSv1.2
SSLCertificateFile /etc/ssl/certs/laggersec.org.crt
SSLCertificateKeyFile /etc/ssl/certs/private/laggersec.org.key
SSLCertificateChainFile /etc/ssl/certs/intermediate.crt
</VirtualHost>
However, whenever I start httpd, it fails with an error.
[root#LAGGERSEC1WEB1 slaggeradmin04]# apachectl restart
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root#LAGGERSEC1WEB1 slaggeradmin04]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-03-23 17:24:10 UTC; 10s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 116366 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 116365 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 116365 (code=exited, status=1/FAILURE)
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: Starting The Apache HTTP Server...
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 23 17:24:10 LAGGERSEC1WEB1 kill[116366]: kill: cannot find process ""
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: Failed to start The Apache HTTP Server.
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: Unit httpd.service entered failed state.
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: httpd.service failed.
[root#LAGGERSEC1WEB1 slaggeradmin04]# journalctl -xe
--
-- Unit user-0.slice has finished starting up.
--
-- The start-up result is done.
Mar 23 17:24:01 LAGGERSEC1WEB1 systemd[1]: Started Session 1533 of user root.
-- Subject: Unit session-1533.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-1533.scope has finished starting up.
--
-- The start-up result is done.
Mar 23 17:24:02 LAGGERSEC1WEB1 CROND[116341]: (root) CMD ([ -f /etc/krb5.keytab ] && [ \( ! -f /etc/opt/omi/creds/omi.keytab \) -o \( /etc/krb5.keytab
Mar 23 17:24:02 LAGGERSEC1WEB1 systemd[1]: Removed slice User Slice of root.
-- Subject: Unit user-0.slice has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished shutting down.
Mar 23 17:24:10 LAGGERSEC1WEB1 polkitd[616]: Registered Authentication Agent for unix-process:116359:6177048 (system bus name :1.3444 [/usr/bin/pkttyag
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 23 17:24:10 LAGGERSEC1WEB1 kill[116366]: kill: cannot find process ""
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: Unit httpd.service entered failed state.
Mar 23 17:24:10 LAGGERSEC1WEB1 systemd[1]: httpd.service failed.
Mar 23 17:24:10 LAGGERSEC1WEB1 polkitd[616]: Unregistered Authentication Agent for unix-process:116359:6177048 (system bus name :1.3444, object path /o
lines 4447-4486/4486 (END)
[root#LAGGERSEC1WEB1 slaggeradmin04]# cd /var/log/httpd
[root#LAGGERSEC1WEB1 httpd]# ls
access_log error_log-20200308 off ssl_error_log ssl_request_log-20200308
access_log-20200308 error_log-20200315 ssl_access_log ssl_error_log-20200308 system_u:object_r:etc_t:s0
error_log error_log-20200322 ssl_access_log-20200308 ssl_request_log
[root#LAGGERSEC1WEB1 httpd]# cat error_log
[Sun Mar 22 13:41:32.406464 2020] [suexec:notice] [pid 72981] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Mar 22 13:41:32.407451 2020] [ssl:emerg] [pid 72981] AH02311: Fatal error initialising mod_ssl, exiting. See /var/www/laggersec.org/log/error.log for more information
[Sun Mar 22 14:35:38.944945 2020] [suexec:notice] [pid 78824] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Mar 22 14:35:38.945970 2020] [ssl:emerg] [pid 78824] AH02311: Fatal error initialising mod_ssl, exiting. See /var/www/laggersec.org/log/error.log for more information
[Mon Mar 23 14:03:41.301190 2020] [core:notice] [pid 95150] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Mon Mar 23 14:03:41.310673 2020] [suexec:notice] [pid 95150] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 23 14:03:41.311961 2020] [ssl:emerg] [pid 95150] AH01903: Failed to configure CA certificate chain!
[Mon Mar 23 14:03:41.311973 2020] [ssl:emerg] [pid 95150] AH02312: Fatal error initialising mod_ssl, exiting.
[Mon Mar 23 14:29:46.498804 2020] [core:notice] [pid 97660] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Mon Mar 23 14:29:46.500217 2020] [suexec:notice] [pid 97660] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 23 14:29:46.501001 2020] [ssl:emerg] [pid 97660] AH01903: Failed to configure CA certificate chain!
[Mon Mar 23 14:29:46.501007 2020] [ssl:emerg] [pid 97660] AH02312: Fatal error initialising mod_ssl, exiting.
[Mon Mar 23 17:24:10.788302 2020] [core:notice] [pid 116365] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Mon Mar 23 17:24:10.789746 2020] [suexec:notice] [pid 116365] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 23 17:24:10.790996 2020] [ssl:emerg] [pid 116365] AH01903: Failed to configure CA certificate chain!
[Mon Mar 23 17:24:10.791006 2020] [ssl:emerg] [pid 116365] AH02312: Fatal error initialising mod_ssl, exiting.
Is there any expert that could help me out?
I figured it out. I had to use SSLCACertificateFile directive instead of SSLCertificateChainFile directive. This was due to Go Daddy's cert not containing any Intermediate CA entities.
I'm trying to install ssl certificate on a new linode machine with centos 7. I installed httpd and open_ssl. I followed this guide for apache: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-7
and this one https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-apache-for-centos-7 for create a certificate ssl.
Now when i try to restart apache with this command:
systemctl restart httpd.service
I got this error:
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
If I run the first script I get this:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2017-03-01 16:32:27 UTC; 48s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 13836 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 13835 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 13835 (code=exited, status=1/FAILURE)
Mar 01 16:32:27 li947-5 systemd[1]: Starting The Apache HTTP Server...
Mar 01 16:32:27 li947-5 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 01 16:32:27 li947-5 kill[13836]: kill: cannot find process ""
Mar 01 16:32:27 li947-5 systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 01 16:32:27 li947-5 systemd[1]: Failed to start The Apache HTTP Server.
Mar 01 16:32:27 li947-5 systemd[1]: Unit httpd.service entered failed state.
Mar 01 16:32:27 li947-5 systemd[1]: httpd.service failed.
and if I run "journalctl -xe" I got this:
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Mar 01 16:26:00 li947-5 systemd[1]: Unit httpd.service entered failed state.
Mar 01 16:26:00 li947-5 polkitd[3179]: Unregistered Authentication Agent for unix-process:4730:177180 (system bus name :1.35, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (dis
Mar 01 16:26:00 li947-5 systemd[1]: httpd.service failed.
Mar 01 16:30:01 li947-5 systemd[1]: Started Session 6 of user root.
-- Subject: Unit session-6.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-6.scope has finished starting up.
--
-- The start-up result is done.
Mar 01 16:30:01 li947-5 systemd[1]: Starting Session 6 of user root.
-- Subject: Unit session-6.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-6.scope has begun starting up.
Mar 01 16:30:01 li947-5 CROND[4746]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 01 16:31:01 li947-5 anacron[4602]: Job `cron.daily' started
Mar 01 16:31:01 li947-5 run-parts(/etc/cron.daily)[4753]: starting logrotate
Mar 01 16:31:01 li947-5 run-parts(/etc/cron.daily)[4758]: finished logrotate
Mar 01 16:31:01 li947-5 run-parts(/etc/cron.daily)[4760]: starting man-db.cron
Mar 01 16:31:13 li947-5 run-parts(/etc/cron.daily)[13828]: finished man-db.cron
Mar 01 16:31:13 li947-5 anacron[4602]: Job `cron.daily' terminated
Mar 01 16:32:27 li947-5 polkitd[3179]: Registered Authentication Agent for unix-process:13829:215883 (system bus name :1.38 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1
Mar 01 16:32:27 li947-5 systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Mar 01 16:32:27 li947-5 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 01 16:32:27 li947-5 kill[13836]: kill: cannot find process ""
Mar 01 16:32:27 li947-5 systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 01 16:32:27 li947-5 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Mar 01 16:32:27 li947-5 systemd[1]: Unit httpd.service entered failed state.
Mar 01 16:32:27 li947-5 systemd[1]: httpd.service failed.
Mar 01 16:32:27 li947-5 polkitd[3179]: Unregistered Authentication Agent for unix-process:13829:215883 (system bus name :1.38, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (di
l
I try to google the problem, but without success. Anyone know how to resolve this?
Thanks and sorry for the english.
I ran into an issue similar to this the other day while trying to install an SSL certificate.
I was able to get more information by checking the SSL log /etc/httpd/logs/ssl_error_log
tail /etc/httpd/logs/ssl_error_log
I installed memcache on my Ubuntu 10.04 machine but when it comes to restarting apache it gives me an error. My main root is /var/www/ and there is only index.php file in it.
Everything was working before installing memcache.
This is what I did.
Help please
ERROR:
myubuntu#ubuntu:~$ service apache2 restart
* Restarting web server apache2 (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
APACHE LOG:
myubuntu#ubuntu:~$ tail -f /var/log/apache2/error.log
[Sun Mar 04 14:04:45 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Sun Mar 04 18:54:35 2012] [notice] caught SIGTERM, shutting down
[Wed Mar 07 20:32:59 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Wed Mar 07 21:01:57 2012] [notice] caught SIGTERM, shutting down
[Fri Mar 09 22:20:06 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Sat Mar 10 01:45:00 2012] [notice] caught SIGTERM, shutting down
[Sat Mar 10 10:58:24 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Sat Mar 10 11:16:49 2012] [error] [client ::1] File does not exist: /var/www/favicon.ico
[Sat Mar 10 11:16:49 2012] [error] [client ::1] File does not exist: /var/www/favicon.ico
You have to be root. You may want to use sudo when starting Apache.