Author Topic: My apache has stopped working  (Read 4167 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
My apache has stopped working
« on: May 22, 2023, 07:50:59 AM »
Help please, my apache has stopped working, when I try to activate it it says:

WARNING!

Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.

WARNING!

● httpd.service - Web server Apache
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2023-05-22 09:28:35 CEST; 35s ago
  Process: 21926 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)

How can I solve it? I don't have too much knowledge.


Offline
**
Re: My apache has stopped working
« Reply #1 on: May 22, 2023, 09:24:09 AM »
Please provide more info about the problem.

1. Have you done some changes (changed apache config, recompiled apache, etc) before the problem appeared ?

2. Are there some errors in:

Code: [Select]
/usr/local/apache/logs/error_log
3. Try to restart apachce and show us output of "journalctl -xe":

Code: [Select]
service httpd restart
journalctl -xe

Offline
*
Re: My apache has stopped working
« Reply #2 on: May 22, 2023, 11:33:02 AM »
[root@server ~]# service httpd restart
Redirecting to /bin/systemctl restart 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.
[root@server ~]# journalctl -xe
may 22 13:26:53 server.notices.com nmbd[1567]: [2023/05/22 13:26:53.471920,  0] ../../source3/nmbd/nmbd_packets.c:181(s>
may 22 13:26:53 server.notices.com nmbd[1567]:   send_netbios_packet: send_packet() to IP 192.168.122.255 port 137 fail>
may 22 13:26:53 server.notices.com nmbd[1567]: [2023/05/22 13:26:53.471933,  0] ../../source3/nmbd/nmbd_namequery.c:245>
may 22 13:26:53 server.notices.com nmbd[1567]:   query_name: Failed to send packet trying to query name ALHAMA_COM<1d>
may 22 13:26:53 server.notices.com kernel: Firewall: *UDP_OUT Blocked* IN= OUT=virbr0 SRC=192.168.122.1 DST=192.168.122>
may 22 13:26:54 server.notices.com systemd[1]: Starting Web server Apache...
-- 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.
may 22 13:26:54 server.notices.com apachectl[47086]: AH00112: Warning: DocumentRoot [/usr/local/apache/undefined] does >
may 22 13:26:54 server.notices.com apachectl[47086]: AH00526: Syntax error on line 17 of /usr/local/apache/conf.d/vhost>
may 22 13:26:54 server.notices.com apachectl[47086]: SSLCertificateFile: file '/etc/pki/tls/certs/server.notices.com.c>
may 22 13:26:54 server.notices.com systemd[1]: httpd.service: Control process exited, code=exited status=1
may 22 13:26:54 server.notices.com systemd[1]: httpd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit httpd.service has entered the 'failed' state with result 'exit-code'.
may 22 13:26:54 server.notices.com systemd[1]: Failed to start Web server Apache.
-- 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 failed.

Offline
*
Re: My apache has stopped working
« Reply #3 on: May 22, 2023, 11:35:31 AM »
I have not touched anything, nor have I compiled.

Offline
***
Re: My apache has stopped working
« Reply #4 on: May 22, 2023, 11:46:51 AM »
systemctl status httpd -l

what is output of above command?

Offline
**
Re: My apache has stopped working
« Reply #5 on: May 22, 2023, 02:24:54 PM »
There is a syntax error in some apache config file:

Code: [Select]
may 22 13:26:54 server.notices.com apachectl[47086]: AH00526: Syntax error on line 17 of /usr/local/apache/conf.d/vhost>
Unfortunately it isn't possible to identify which file causes the problem because the line is truncated in your output.

I recommend you to check the output of "journalctl -xe" more closely to identify the problematic file, open it in some editor and investigate the line 17 of the file. It will help you to understand which directive isn't recognized by apache. In case it doesn't help you then show us content of the problematic file.

Offline
*
Re: My apache has stopped working
« Reply #6 on: May 22, 2023, 05:28:32 PM »

May 22 19:20:00 server.notices.com systemd[1]: sysstat-collect.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit sysstat-collect.service has successfully entered the 'dead' state.
May 22 19:20:00 server.notices.com systemd[1]: Started system activity accounting tool.
-- Subject: Unit sysstat-collect.service has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sysstat-collect.service has finished starting up.
--
-- The start-up result is done.
May 22 19:20:15 server.notices.com postfix/smtpd[72193]: connect from unknown[121.173.126.140]
May 22 19:20:15 server.notices.com postfix/smtpd[72193]: warning: non-SMTP command from unknown[121.173.126.140]: CONNECT www.naver.com:80 HTTP/1.1
May 22 19:20:15 server.notices.com postfix/smtpd[72193]: disconnect from unknown[121.173.126.140] unknown=0/1 commands=0/1
May 22 19:20:20 server.notices.com kernel: Firewall: *UDP6IN Blocked* IN=eno1 OUT= MAC=33:33:00:00:00:fb:06:21:92:77:49:c7:86:dd SRC=fe80:0000:0000:0000:2e44:fdff:fe16:d6a4 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=296 TC=0 HOPLIMIT=255 FLOWLBL=181522 PROTO=UDP SPT=5353 DPT=5353 LEN=256
May 22 19:20:20 server.notices.com kernel: Firewall: *UDP_OUT Blocked* IN= OUT=eno1 SRC=192.168.0.3 DST=224.0.0.251 LEN=119 TOS=0x00 PREC=0x00 TTL=255 ID=17855 DF PROTO=UDP SPT=5353 DPT=5353 LEN=99 UID=70 GID=70
May 22 19:20:20 server.notices.com kernel: Firewall: *UDP6IN Blocked* IN=eno1 OUT= MAC=33:33:00:00:00:fb:06:21:92:77:49:c7:86:dd SRC=fe80:0000:0000:0000:2e44:fdff:fe16:d6a4 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=186 TC=0 HOPLIMIT=255 FLOWLBL=181522 PROTO=UDP SPT=5353 DPT=5353 LEN=146
May 22 19:20:20 server.notices.com nmbd[1567]: [2023/05/22 19:20:20.984822,  0] ../../source3/nmbd/nmbd_incomingdgrams.c:305(process_local_master_announce)
May 22 19:20:20 server.notices.com nmbd[1567]:   process_local_master_announce: Server DEBIAN at IP 192.168.0.31 is announcing itself as a local master browser for workgroup ALHAMA_COM and we think we are master. Forcing election.
May 22 19:20:20 server.notices.com nmbd[1567]: [2023/05/22 19:20:20.984925,  0] ../../source3/nmbd/nmbd_become_lmb.c:151(unbecome_local_master_success)
May 22 19:20:20 server.notices.com nmbd[1567]:   *****
May 22 19:20:20 server.notices.com nmbd[1567]:
May 22 19:20:20 server.notices.com nmbd[1567]:   Samba name server server has stopped being a local master browser for workgroup ALHAMA_COM on subnet 192.168.0.3
May 22 19:20:20 server.notices.com nmbd[1567]:
May 22 19:20:20 server.notices.com nmbd[1567]:   *****
May 22 19:20:20 server.notices.com nmbd[1567]: [2023/05/22 19:20:20.985130,  0] ../../source3/libsmb/nmblib.c:924(send_udp)
May 22 19:20:20 server.notices.com nmbd[1567]:   Packet send failed to 192.168.122.255(137) ERRNO=Operación no permitida
May 22 19:20:20 server.notices.com nmbd[1567]: [2023/05/22 19:20:20.985153,  0] ../../source3/nmbd/nmbd_packets.c:181(send_netbios_packet)
May 22 19:20:20 server.notices.com nmbd[1567]:   send_netbios_packet: send_packet() to IP 192.168.122.255 port 137 failed
May 22 19:20:20 server.notices.com nmbd[1567]: [2023/05/22 19:20:20.985163,  0] ../../source3/nmbd/nmbd_namequery.c:245(query_name)
May 22 19:20:20 server.notices.com nmbd[1567]:   query_name: Failed to send packet trying to query name ALHAMA_COM<1d>
May 22 19:20:20 server.notices.com kernel: Firewall: *UDP_OUT Blocked* IN= OUT=virbr0 SRC=192.168.122.1 DST=192.168.122.255 LEN=78 TOS=0x00 PREC=0x00 TTL=64 ID=49415 DF PROTO=UDP SPT=137 DPT=137 LEN=58 UID=0 GID=0
May 22 19:20:40 server.notices.com nmbd[1567]: [2023/05/22 19:20:40.005870,  0] ../../source3/nmbd/nmbd_become_lmb.c:398(become_local_master_stage2)
May 22 19:20:40 server.notices.com nmbd[1567]:   *****
May 22 19:20:40 server.notices.com nmbd[1567]:
May 22 19:20:40 server.notices.com nmbd[1567]:   Samba name server server is now a local master browser for workgroup ALHAMA_COM on subnet 192.168.0.3
May 22 19:20:40 server.notices.com nmbd[1567]:
May 22 19:20:40 server.notices.com nmbd[1567]:   *****
May 22 19:20:40 server.notices.com kernel: Firewall: *UDP6OUT Blocked* IN= OUT=eno1 SRC=fe80:0000:0000:0000:bacb:29ff:fea3:9cd0 DST=ff02:0000:0000:0000:0000:0000:0001:0002 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=310832 PROTO=UDP SPT=546 DPT=547 LEN=56 UID=0 GID=0
May 22 19:20:52 server.notices.com clamd[980]: SelfCheck: Database status OK.
May 22 19:20:52 server.notices.com clamd[980]: SelfCheck: Database status OK.
May 22 19:21:28 server.notices.com dbus-daemon[759]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service' requested by ':1.266' (uid=0 pid=2744 comm="/usr/bin/gnome-shell ")
May 22 19:21:28 server.notices.com systemd[1]: Starting Fingerprint Authentication Daemon...
-- Subject: Unit fprintd.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--

Offline
**
Re: My apache has stopped working
« Reply #7 on: May 22, 2023, 05:59:52 PM »
Unfortunately the latest log provided by you doesn't contain anything about the error and doesn't allow to identify the problematic file either.

Try to identify the problematic file using the file:

Code: [Select]
/usr/local/apache/logs/error_log
Open it using "less", "vi" or some other editor and read content from the end to beginning.

Or just run:
Code: [Select]
/usr/local/apache/bin/apachectland read output.
« Last Edit: May 22, 2023, 06:16:50 PM by cyberspace »

Offline
*****
Re: My apache has stopped working
« Reply #8 on: May 23, 2023, 05:28:06 AM »
Run a configuration test with apachectl:
Code: [Select]
sudo apachectl configtest
If everything is ok, the configtest command will return the message Syntax OK. If there is a syntax error, configtest will output the invalid configuration option with the filename and the line number.