M
M
Martovitskiy2019-10-03 18:05:36
linux
Martovitskiy, 2019-10-03 18:05:36

Why can't I restart apache?

● 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 2019-10-03 18:01:49 EEST; 5s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 557243 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 557241 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 557241 (code=exited, status=1/FAILURE)

Oct 03 18:01:49 VM-VIPOC systemd[1]: Starting The Apache HTTP Server...
Oct 03 18:01:49 VM-VIPOC systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Oct 03 18:01:49 VM-VIPOC kill[557243]: kill: cannot find process ""
Oct 03 18:01:49 VM-VIPOC systemd[1]: httpd.service: control process exited, code=exited status=1
Oct 03 18:01:49 VM-VIPOC systemd[1]: Failed to start The Apache HTTP Server.
Oct 03 18:01:49 VM-VIPOC systemd[1]: Unit httpd.service entered failed state.
Oct 03 18:01:49 VM-VIPOC systemd[1]: httpd.service failed.

Why can't it run? Reinstalled, the httpd.conf file is standard. Installed on Centos7

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Karasik, 2019-10-03
@vitaly_il1

Send us the output
of systemctl status httpd.service"
and
"journalctl -xe"

M
Mikhail Vasilyev, 2019-10-03
@vasilyevmn

Check the content /usr/lib/systemd/system/httpd.service
If it doesn't match this, then fix it:

[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/httpd
ExecStart=/usr/sbin/httpd $OPTIONS -k start
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop
PrivateTmp=true
# If you have 90 seconds reload problem - uncomment several lines below (mixed - worked for me)
#LimitNOFILE=infinity
#KillMode=mixed
#KillMode=none
#TimeoutStopSec=10

[Install]
WantedBy=multi-user.target

After fixing -systemctl daemon-reload

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question