I use Ubuntu 16.02. When i try sudo service apache2 restart
, it says:
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
Then I type: journalctl -xe
, and request:
-- -- Unit apache2.service has begun starting up. Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /etc/init.d/apache2: 1: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /etc/init.d/apache2: 49: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /etc/init.d/apache2: 1: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /etc/init.d/apache2: 49: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: * Starting Apache httpd web server apache2 Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: * Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: * The apache2 configtest failed. Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: Output of config test was: Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /usr/sbin/apache2ctl: 1: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /usr/sbin/apache2ctl: 49: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: (2)No such file or directory: AH02291: Cannot access directory '/etc/apache2/logs/' for main error log Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: AH00014: Configuration check failed Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: Action 'configtest' failed. Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: The Apache error log may have more information. Jan 11 02:30:46 aleksandr-VirtualBox systemd[1]: apache2.service: Control process exited, code=exited status=1 Jan 11 02:30:46 aleksandr-VirtualBox sudo[8171]: pam_unix(sudo:session): session closed for user root Jan 11 02:30:46 aleksandr-VirtualBox systemd[1]: Failed to start LSB: Apache2 web server. -- Subject: Unit apache2.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit apache2.service has failed. -- -- The result is failed. Jan 11 02:30:46 aleksandr-VirtualBox systemd[1]: apache2.service: Unit entered failed state. Jan 11 02:30:46 aleksandr-VirtualBox systemd[1]: apache2.service: Failed with result 'exit-code'. Jan 11 02:33:09 aleksandr-VirtualBox dhclient[792]: DHCPREQUEST of 192.168.56.101 on enp0s8 to 192.168.56.100 port 67 (xid=0x204f076f) Jan 11 02:33:09 aleksandr-VirtualBox dhclient[792]: DHCPACK of 192.168.56.101 from 192.168.56.100 Jan 11 02:33:09 aleksandr-VirtualBox NetworkManager[619]: [1484073189.4253] address 192.168.56.101 Jan 11 02:33:09 aleksandr-VirtualBox NetworkManager[619]: [1484073189.4260] plen 24 (255.255.255.0) Jan 11 02:33:09 aleksandr-VirtualBox NetworkManager[619]: [1484073189.4266] server identifier 192.168.56.100 Jan 11 02:33:09 aleksandr-VirtualBox NetworkManager[619]: [1484073189.4273] lease time 1200 Jan 11 02:33:09 aleksandr-VirtualBox NetworkManager[619]: [1484073189.4279] dhcp4 (enp0s8): state changed bound -> bound Jan 11 02:33:09 aleksandr-VirtualBox dbus[590]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' Jan 11 02:33:09 aleksandr-VirtualBox systemd[1]: Starting Network Manager Script Dispatcher Service... -- Subject: Unit NetworkManager-dispatcher.service has begun start-up -- Defined-By: systemd -- Support: -- -- Unit NetworkManager-dispatcher.service has begun starting up. Jan 11 02:33:09 aleksandr-VirtualBox dhclient[792]: bound to 192.168.56.101 -- renewal in 559 seconds. Jan 11 02:33:09 aleksandr-VirtualBox dbus[590]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher' Jan 11 02:33:09 aleksandr-VirtualBox systemd[1]: Started Network Manager Script Dispatcher Service. -- Subject: Unit NetworkManager-dispatcher.service has finished start-up -- Defined-By: systemd -- Support: -- -- Unit NetworkManager-dispatcher.service has finished starting up. -- -- The start-up result is done. Jan 11 02:33:09 aleksandr-VirtualBox nm-dispatcher[8205]: req:1 'dhcp4-change' [enp0s8]: new request (1 scripts) Jan 11 02:33:09 aleksandr-VirtualBox nm-dispatcher[8205]: req:1 'dhcp4-change' [enp0s8]: start running ordered scripts...
And when systemctl status apache2.service
It`s reaqest:
* apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d `-apache2-systemd.conf Active: failed (Result: exit-code) since Wed 2017-01-11 02:30:46 +08; 33min ago Docs: man:systemd-sysv-generator(8) Process: 8023 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS) Process: 2236 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS) Process: 8177 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE) Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /usr/sbin/apache2ctl: 1: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /usr/sbin/apache2ctl: 49: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: (2)No such file or directory: AH02291: Cannot access directory '/etc/apache2/logs/' for main error log Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: AH00014: Configuration check failed Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: Action 'configtest' failed. Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: The Apache error log may have more information. Jan 11 02:30:46 aleksandr-VirtualBox systemd[1]: apache2.service: Control process exited, code=exited status=1 Jan 11 02:30:46 aleksandr-VirtualBox systemd[1]: Failed to start LSB: Apache2 web server. Jan 11 02:30:46 aleksandr-VirtualBox systemd[1]: apache2.service: Unit entered failed state. Jan 11 02:30:46 aleksandr-VirtualBox systemd[1]: apache2.service: Failed with result 'exit-code'.
What is wrong? Where is an interrupt? Please help!