@artinnok
бекенд-программист

В чем проблема с Apache2?

При вводе команды 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.

Вывод при systemctl status apache2.service -l:
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: active (exited) (Result: exit-code) since Вт. 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)

нояб. 24 17:07:43 artem-desktop apache2[4417]: *
нояб. 24 17:07:43 artem-desktop apache2[4417]: * Apache2 is not running
нояб. 24 17:07:43 artem-desktop systemd[1]: apache2.service: Control process exited, code=exited status=1
нояб. 24 17:07:43 artem-desktop systemd[1]: Reload failed for LSB: Apache2 web server.
нояб. 24 17:10:55 artem-desktop systemd[1]: Reloading LSB: Apache2 web server.
нояб. 24 17:10:55 artem-desktop apache2[5848]: * Reloading web server apache2
нояб. 24 17:10:55 artem-desktop apache2[5848]: *
нояб. 24 17:10:55 artem-desktop apache2[5848]: * Apache2 is not running
нояб. 24 17:10:55 artem-desktop systemd[1]: apache2.service: Control process exited, code=exited status=1
нояб. 24 17:10:55 artem-desktop systemd[1]: Reload failed for LSB: Apache2 web server.


Вывод при journalctl -xe:
-- The result is failed.
нояб. 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
нояб. 24 17:10:55 artem-desktop sudo[5837]: pam_unix(sudo:session): session closed for user root
нояб. 24 17:11:04 artem-desktop pkexec[5869]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
нояб. 24 17:11:04 artem-desktop pkexec[5869]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session
нояб. 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]
нояб. 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
нояб. 24 17:17:01 artem-desktop CRON[6066]: pam_unix(cron:session): session opened for user root by (uid=0)
нояб. 24 17:17:01 artem-desktop CRON[6067]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
нояб. 24 17:17:01 artem-desktop CRON[6066]: pam_unix(cron:session): session closed for user root
нояб. 24 17:19:06 artem-desktop sudo[6112]: artem : TTY=pts/14 ; PWD=/etc ; USER=root ; COMMAND=/usr/bin/vim hosts
нояб. 24 17:19:06 artem-desktop sudo[6112]: pam_unix(sudo:session): session opened for user root by artem(uid=0)
нояб. 24 17:19:14 artem-desktop sudo[6112]: pam_unix(sudo:session): session closed for user root
нояб. 24 17:19:28 artem-desktop sudo[6118]: artem : TTY=pts/14 ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/service apache2 reload
нояб. 24 17:19:28 artem-desktop sudo[6118]: pam_unix(sudo:session): session opened for user root by artem(uid=0)
нояб. 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
нояб. 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
нояб. 24 17:19:28 artem-desktop apache2[6129]: * Reloading web server apache2
нояб. 24 17:19:28 artem-desktop apache2[6129]: *
нояб. 24 17:19:28 artem-desktop apache2[6129]: * Apache2 is not running
нояб. 24 17:19:28 artem-desktop systemd[1]: apache2.service: Control process exited, code=exited status=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.
нояб. 24 17:19:28 artem-desktop sudo[6118]: pam_unix(sudo:session): session closed for user root
нояб. 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
  • Вопрос задан
  • 24537 просмотров
Пригласить эксперта
Ответы на вопрос 3
@mureevms
Вы хотите перечитать конфиг апача (reload), но он этого сделать не может, т.к. не запущен, о чем и говорит лог:
Apache2 is not running

Сначала запустите, потом делайте релоад.
Ответ написан
Запустите веб-сервер как-то так:
sudo apache2 -X -f /etc/apache2/httpd.conf

Пусть к конфигу замените на актуальный в вашем случае.
И если используете systemd, то и перезапускайте ваш веб-сервер с помощью systemctl:
systemctl reload apache2
Ответ написан
ildarkhasanshin
@ildarkhasanshin
developer
может помочь sudo mkdir /var/log/apache2/
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы