I'm building https://github.com/devopsgroup-io/catapult-release-management and every once in a while trying to apachectl start an error of:
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
systemctl status httpd.service outputs:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Wed 2015-07-15 19:25:23 EDT; 4s ago
Process: 3247 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 3246 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 3246 (code=exited, status=1/FAILURE)
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Starting The Apache HTTP Server...
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 15 19:25:23 devopsgroup.io-dev-redhat kill[3247]: kill: cannot find process ""
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Failed to start The Apache HTTP Server.
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Unit httpd.service entered failed state.
and journalctl -xn outputs:
-- Logs begin at Wed 2015-07-15 19:23:53 EDT, end at Wed 2015-07-15 19:25:23 EDT. --
Jul 15 19:25:11 devopsgroup.io-dev-redhat sshd[3196]: pam_unix(sshd:session): session opened for user vagrant by (uid=0)
Jul 15 19:25:17 devopsgroup.io-dev-redhat sudo[3221]: vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/bin/su -l
Jul 15 19:25:17 devopsgroup.io-dev-redhat su[3222]: (to root) vagrant on pts/0
Jul 15 19:25:17 devopsgroup.io-dev-redhat su[3222]: pam_unix(su-l:session): session opened for user root by vagrant(uid=0)
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 15 19:25:23 devopsgroup.io-dev-redhat kill[3247]: kill: cannot find process ""
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 15 19:25:23 devopsgroup.io-dev-redhat 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.
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Unit httpd.service entered failed state.
Any ideas?
This was due to /etc/httpd/conf/httpd.conf being appended with more than 20 duplicate lines of IncludeOptional sites-enabled/*.conf
This is a bug in apachectl configtest as it reports correct configuration and does not provide a traceable error.
Related
My webserver down and cant run it again After update Directadmin
[root#srv ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: signal) since Tue 2020-06-30 10:41:18 +0430; 1min 17s ago
Process: 1363 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=killed, signal=KILL)
Main PID: 1363 (code=killed, signal=KILL)
Jun 30 09:52:24 srv.shahriariboresh.ir systemd[1]: Starting The Apache HTTP Server...
Jun 30 10:41:13 srv.shahriariboresh.ir systemd[1]: httpd.service start operation timed out. Terminating.
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: httpd.service stop-sigterm timed out. Killing.
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: httpd.service: main process exited, code=killed, status=9/KILL
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: Failed to start The Apache HTTP Server.
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: Unit httpd.service entered failed state.
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: httpd.service failed.
any body help me for solve this problem ?
Not able to start apache. Giving the below error.
Could some one please help me on this?
Error message:
ip-10-128-9-27 httpd-scl-wrapper: httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-ssl.conf: Cannot load modules/mod_ssl.so into server: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by /opt/rh/httpd24/root/etc/httpd/modules/mod_ssl.so)
Below is the detailed error message.
[root#ip-10-128-9-27 centos]# systemctl status httpd24-httpd.service
● 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 Thu 2017-12-07 12:34:05 UTC; 12s ago
Process: 29020 ExecStop=/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper $OPTIONS -k graceful-stop (code=exited, status=1/FAILURE)
Process: 29018 ExecStart=/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 29018 (code=exited, status=1/FAILURE)
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: Starting The Apache HTTP Server...
Dec 07 12:34:05 ip-10-128-9-27 httpd-scl-wrapper[29018]: httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-ssl.conf...
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: httpd24-httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 07 12:34:05 ip-10-128-9-27 httpd-scl-wrapper[29020]: httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-ssl.conf...
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: httpd24-httpd.service: control process exited, code=exited status=1
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: Failed to start The Apache HTTP Server.
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: Unit httpd24-httpd.service entered failed state.
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: httpd24-httpd.service failed.
systemctl restart httpd.service
when i execute that command httpd cannot restart
systemctl status httpd.service
shows
[root#openstack ~]# systemctl status httpd.service
â—� httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─openstack-dashboard.conf
Active: failed (Result: exit-code) since Fri 2017-10-27 18:11:35 WIB; 10s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 14032 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 14029 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Process: 13983 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force (code=exited, status=0/SUCCESS)
Process: 13959 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=exited, status=0/SUCCESS)
Main PID: 14029 (code=exited, status=1/FAILURE)
Oct 27 18:11:21 openstack.localdomain python[13959]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/modal/delete-modal.service.js'
Oct 27 18:11:21 openstack.localdomain python[13959]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/modal/delete-modal.service.spec.js'
Oct 27 18:11:21 openstack.localdomain python[13959]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/modal/modal.module.js'
Oct 27 18:11:21 openstack.localdomain python[13959]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/modal/simple-modal.controller.js'
Oct 27 18:11:21 openstack.localdomain python[13959]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/modal/simple-modal.html'
Oct 27 18:11:35 openstack.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Oct 27 18:11:35 openstack.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Oct 27 18:11:35 openstack.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Oct 27 18:11:35 openstack.localdomain systemd[1]: Unit httpd.service entered failed state.
Oct 27 18:11:35 openstack.localdomain systemd[1]: httpd.service failed.
Your status reveals that the service failed for some reason. There could be a million reasons for this, but my money is on a syntax error in the configuration file.
Try running:
httpd -t
That will either tell you that the syntax is bad and what to fix, or let you know you need to look for a different answer.
Server is Cent OS.
The httpd was working properly that is why I shut down the whole server to take snapshot. After the reboot the httpd was not working anymore, here is error from jorunalctl:
-- Unit httpd.service has begun starting up.
Mar 16 12:47:49 ragnar01.novalocal httpd[2350]: httpd (pid 2322) already running
Mar 16 12:47:49 ragnar01.novalocal kill[2351]: kill: cannot find process ""
Mar 16 12:47:49 ragnar01.novalocal systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 16 12:47:49 ragnar01.novalocal 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 16 12:47:49 ragnar01.novalocal systemd[1]: Unit httpd.service entered failed state.
Mar 16 12:47:49 ragnar01.novalocal systemd[1]: httpd.service failed.
Mar 16 12:47:49 ragnar01.novalocal polkitd[779]: Unregistered Authentication Agent for unix-process:2335:24998 (system bus name :1.13, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Mar 16 12:48:00 ragnar01.novalocal sshd[2332]: Connection closed by 123.183.209.139 [preauth]
I will be glad for all the ideas to start it again.
I have just starting using Linode with Centos 7. I have never created my own server to host a website so apologies in advance.
I have read every stackoverflow (and other sites) Q&A's for this problem and I can't seem to fix it.
I installed Apache2 and followed the tutorial on Linodes website. The server doesn't start and I get these following errors:
When I run - systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Sun 2015-11-08 16:18:47 GMT; 10s ago
Process: 15662 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 15661 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 15661 (code=exited, status=0/SUCCESS)
Nov 08 16:18:47 london systemd[1]: Starting The Apache HTTP Server...
Nov 08 16:18:47 london httpd[15661]: httpd (pid 15652) already running
Nov 08 16:18:47 london kill[15662]: kill: cannot find process ""
Nov 08 16:18:47 london systemd[1]: httpd.service: control process exited, code=exited status=1
Nov 08 16:18:47 london systemd[1]: Failed to start The Apache HTTP Server.
Nov 08 16:18:47 london systemd[1]: Unit httpd.service entered failed state.
When I run - journalctl -xn
Logs begin at Thu 2015-10-22 20:33:26 BST, end at Sun 2015-11-08 16:18:47 GMT.
Nov 08 16:10:01 london systemd[1]: Starting Session 2857 of user root.
Subject: Unit session-2857.scope has begun with start-up
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Unit session-2857.scope has begun starting up.
Nov 08 16:10:01 london systemd[1]: Started Session 2857 of user root.
Subject: Unit session-2857.scope has finished start-up
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Unit session-2857.scope has finished starting up.
The start-up result is done.
Nov 08 16:10:01 london CROND[15635]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Nov 08 16:15:02 london sshd[15647]: Received disconnect from 43.229.53.26: 11: [preauth]
Nov 08 16:18:47 london systemd[1]: Starting The Apache HTTP Server...
Subject: Unit httpd.service has begun with start-up
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Unit httpd.service has begun starting up.
Nov 08 16:18:47 london httpd[15661]: httpd (pid 15652) already running
Nov 08 16:18:47 london kill[15662]: kill: cannot find process ""
Nov 08 16:18:47 london systemd[1]: httpd.service: control process exited, code=exited status=1
Nov 08 16:18:47 london 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.
I have absolutely no idea and can't see where I am going wrong. Can someone help at all??
Many thanks!