1

I used Ubuntu 16.04 and encountered weird error with Apache2, where it don't start anymore and I cannot figure out what is causing this. Hopefully someone with fresh eyes could help me in here.

Here are some errors which I received:

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

Then here is printout from those two status commands:

$sudo systemctl status apache2.service
● 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 Fri 2018-08-24 19:15:41 CEST; 2min 35s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 8631 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
   CGroup: /system.slice/apache2.service
           └─8645 [pdflush-0

Aug 24 19:15:21 tegra-ubuntu systemd[1]: Starting LSB: Apache2 web server...
Aug 24 19:15:21 tegra-ubuntu apache2[8631]:  * Starting Apache httpd web server apache2
Aug 24 19:15:41 tegra-ubuntu apache2[8631]:  *
Aug 24 19:15:41 tegra-ubuntu apache2[8631]:  * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Aug 24 19:15:41 tegra-ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 24 19:15:41 tegra-ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
Aug 24 19:15:41 tegra-ubuntu systemd[1]: apache2.service: Unit entered failed state.
Aug 24 19:15:41 tegra-ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.

sudo journalctl -xe
Aug 24 19:20:03 tegra-ubuntu systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Aug 24 19:20:03 tegra-ubuntu apache2[8768]:  * Starting Apache httpd web server apache2
Aug 24 19:20:23 tegra-ubuntu apache2[8768]:  *
Aug 24 19:20:23 tegra-ubuntu apache2[8768]:  * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 24 19:20:23 tegra-ubuntu 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.
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Unit entered failed state.
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 24 19:20:23 tegra-ubuntu sudo[8736]: pam_unix(sudo:session): session closed for user root

And config test for apache looks to be clean (if don't count servername warning)

apachectl configtest
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK

What is even more interesting is that apache2 error.log is empty

Here is output of journalctl (which I shrinked down a bit where it was repeating same stuff for Apache2 due the my trials to get it running). It looks that this is not telling much either, weird.

-- Logs begin at Wed 2018-08-22 21:52:44 CEST, end at Sat 2018-08-25 13:25:11 CEST. --
Aug 24 19:20:03 tegra-ubuntu systemd[1]: Starting LSB: Apache2 web server...
Aug 24 19:20:03 tegra-ubuntu apache2[8768]:  * Starting Apache httpd web server apache2
Aug 24 19:20:23 tegra-ubuntu apache2[8768]:  *
Aug 24 19:20:23 tegra-ubuntu apache2[8768]:  * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 24 19:20:23 tegra-ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Unit entered failed state.
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
1
  • Please post the output of journalctl -u apache2.service by editing your question. Aug 25, 2018 at 3:18

1 Answer 1

0

Now it's getting even more interested.

If I set apache2 to start without document root check with command

apache2ctl -T

and then use following command to start apache, it starts without errors.

systemctl start apache2.service

but after reboot of machine apache2 is not started automatically as it should be and error again is the same. Any idea what is happening there now?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.