A
A
Artyom Innokentiev2015-11-24 17:21:38
Apache HTTP Server
Artyom Innokentiev, 2015-11-24 17:21:38

What is the problem with Apache2?

When you enter the command sudo service apache2 reload:
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
Output when systemctl status apache2.service -l:
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: active (exited) (Result: exit-code) since Tue. 2015-11-24 16:54:20 MSK; 19min ago
Docs: man:systemd-sysv-generator(8)
Process: 5848 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
Nov. 24 17:07:43 artem-desktop apache2[4417]: *
Nov. 24 17:07:43 artem-desktop apache2[4417]: * Apache2 is not running
Nov. 24 17:07:43 artem-desktop systemd[1]: apache2.service: Control process exited, code=exited status=
Nov 1 24 17:07:43 artem-desktop systemd[1]: Reload failed for LSB: Apache2 web server.
Nov. 24 17:10:55 artem-desktop systemd[1]: Reloading LSB: Apache2 web server.
Nov. 24 17:10:55 artem-desktop apache2[5848]: * Reloading web server apache2
Nov. 24 17:10:55 artem-desktop apache2[5848]: *
Nov. 24 17:10:55 artem-desktop apache2[5848]: * Apache2 is not running
Nov. 24 17:10:55 artem-desktop systemd[1]: apache2.service: Control process exited, code=exited status=
Nov 1 24 17:10:55 artem-desktop systemd[1]: Reload failed for LSB: Apache2 web server.

Output for journalctl -xe:
-- The result is failed.
Nov. 24 17:10:55 artem-desktop polkitd(authority=local)[738]: Unregistered Authentication Agent for unix-process:5838:102243 (system bus name :1.126, object path /org/freedesktop
Nov 24 17:10: 55 artem-desktop sudo[5837]: pam_unix(sudo:session): session closed for user root
Nov 24 17:11:04 artem-desktop pkexec[5869]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Nov 24 17:11:04 artem-desktop pkexec[5869]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session
Nov 24 17:11:04 artem -desktop pkexec[5869]: artem: Executing command [USER=root] [TTY=unknown] [CWD=/home/artem] [COMMAND=/usr/lib/update-notifier/package-system-locked]
Nov. 24 17:11:05 artem-desktop com.ubuntu.OneConf[2172]: WARNING:oneconf.hosts:Error in loading other_hosts file: [Errno 2] No such file or directory: '/home/artem/.cache/oneconf
Nov. 24 17:17:01 artem-desktop CRON[6066]: pam_unix(cron:session): session opened for user root by (uid=0)
Nov. 24 17:17:01 artem-desktop CRON[6067]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Nov. 24 17:17:01 artem-desktop CRON[6066]: pam_unix(cron:session): session closed for user root
Nov. 24 17:19:06 artem-desktop sudo[6112]: artem : TTY=pts/14 ; PWD=/etc ; USER=root ; COMMAND=/usr/bin/vim hosts
Nov. 24 17:19:06 artem-desktop sudo[6112]: pam_unix(sudo:session): session opened for user root by artem(uid=0)
Nov. 24 17:19:14 artem-desktop sudo[6112]: pam_unix(sudo:session): session closed for user root
Nov. 24 17:19:28 artem-desktop sudo[6118]: artem : TTY=pts/14 ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/service apache2 reload
Nov. 24 17:19:28 artem-desktop sudo[6118]: pam_unix(sudo:session): session opened for user root by artem(uid=0)
Nov. 24 17:19:28 artem-desktop polkitd(authority=local)[738]: Registered Authentication Agent for unix-process:6119:153564 (system bus name :1.132 [/usr/bin/pkttyagent --notify-f
nov. 24 17:19:28 artem-desktop systemd[1]: Reloading LSB: Apache2 web server.
-- Subject: Unit apache2.service has begun reloading its configuration
-- Defined-By: systemd
-- Support:lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun reloading its configuration
Nov. 24 17:19:28 artem-desktop apache2[6129]: * Reloading web server apache2
Nov. 24 17:19:28 artem-desktop apache2[6129]: *
Nov. 24 17:19:28 artem-desktop apache2[6129]: * Apache2 is not running
Nov. 24 17:19:28 artem-desktop systemd[1]: apache2.service: Control process exited, code=exited status=
Nov 1 24 17:19:28 artem-desktop systemd[1]: Reload failed for LSB: Apache2 web server.
-- Subject: Unit apache2.service has finished reloading its configuration
-- Defined-By: systemd
-- Support: lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished reloading its configuration
--
-- The result is failed.
Nov. 24 17:19:28 artem-desktop sudo[6118]: pam_unix(sudo:session): session closed for user root
Nov. 24 17:19:28 artem-desktop polkitd(authority=local)[738]: Unregistered Authentication Agent for unix-process:6119:153564 (system bus name :1.132, object path /org/freedesktop

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
mureevms, 2015-11-24
@mureevms

You want to reread the Apache config (reload), but it cannot do this, because not running, as the log says:
Run first, then reload.

K
Kostya Lakin, 2015-11-24
@laki9

Start the web server something like this:
sudo apache2 -X -f /etc/apache2/httpd.conf
Let the config be replaced with the actual one in your case.
And if you are using systemd, then restart your web server with systemctl:
systemctl reload apache2

I
ildar r. khasanshin, 2018-05-04
@ildarkhasanshin

sudo mkdir /var/log/apache2/ might help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question