0

Trying to start Apache from terminal using following command:

systemctl start apache2.service

when executing that command getting below error:

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

Output of systemctl status apache2.service:

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Tue 2018-08-28 10:59:14 EEST; 4min 37s ago
  Process: 1051 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

авг 28 10:59:14 GhostInTheShell apachectl[1051]: 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
авг 28 10:59:14 GhostInTheShell apachectl[1051]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
авг 28 10:59:14 GhostInTheShell apachectl[1051]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /etc/apache2/sites-enabled/laravel.conf:1
авг 28 10:59:14 GhostInTheShell apachectl[1051]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /etc/apache2/sites-enabled/000-default.conf:1
авг 28 10:59:14 GhostInTheShell apachectl[1051]: AH00014: Configuration check failed
авг 28 10:59:14 GhostInTheShell apachectl[1051]: Action 'start' failed.
авг 28 10:59:14 GhostInTheShell apachectl[1051]: The Apache error log may have more information.
авг 28 10:59:14 GhostInTheShell systemd[1]: apache2.service: Control process exited, code=exited status=1
авг 28 10:59:14 GhostInTheShell systemd[1]: apache2.service: Failed with result 'exit-code'.
авг 28 10:59:14 GhostInTheShell systemd[1]: Failed to start The Apache HTTP Server.

Output of journalctl | tail:

авг 28 11:19:14 GhostInTheShell org.gnome.SettingsDaemon.MediaKeys.desktop[1773]: # Theme parsing error: gtk.css:4423:25: '' is not a valid color name
авг 28 11:19:14 GhostInTheShell org.gnome.SettingsDaemon.MediaKeys.desktop[1773]: # Theme parsing error: gtk.css:4433:25: '' is not a valid color name
авг 28 11:19:14 GhostInTheShell org.gnome.SettingsDaemon.MediaKeys.desktop[1773]: # Theme parsing error: gtk.css:4445:14: unknown value for property
авг 28 11:20:19 GhostInTheShell kernel: [UFW BLOCK] IN=wlp2s0 OUT= MAC=01:00:5e:00:00:01:54:e6:fc:a6:a5:4b:08:00 SRC=0.0.0.0 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 
авг 28 11:22:25 GhostInTheShell kernel: [UFW BLOCK] IN=wlp2s0 OUT= MAC=01:00:5e:00:00:01:54:e6:fc:a6:a5:4b:08:00 SRC=0.0.0.0 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 
авг 28 11:23:32 GhostInTheShell kernel: perf: interrupt took too long (5102 > 5055), lowering kernel.perf_event_max_sample_rate to 39000
авг 28 11:23:38 GhostInTheShell gnome-keyring-daemon[1450]: asked to register item /org/freedesktop/secrets/collection/login/1, but it's already registered
авг 28 11:24:30 GhostInTheShell kernel: [UFW BLOCK] IN=wlp2s0 OUT= MAC=01:00:5e:00:00:01:54:e6:fc:a6:a5:4b:08:00 SRC=0.0.0.0 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 
авг 28 11:26:36 GhostInTheShell kernel: [UFW BLOCK] IN=wlp2s0 OUT= MAC=01:00:5e:00:00:01:54:e6:fc:a6:a5:4b:08:00 SRC=0.0.0.0 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 
авг 28 11:27:00 GhostInTheShell wpa_supplicant[903]: wlp2s0: WPA: Group rekeying completed with 54:e6:fc:a6:a5:4c [GTK=CCMP]

I have same error in MySQL

Output of systemctl start mysql.service:

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

Output of systemctl status mysql.service:

● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2018-08-28 11:37:47 EEST; 6s ago
  Process: 6209 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
  Process: 6200 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

авг 28 11:37:47 GhostInTheShell systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
авг 28 11:37:47 GhostInTheShell systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
авг 28 11:37:47 GhostInTheShell systemd[1]: Stopped MySQL Community Server.
авг 28 11:37:47 GhostInTheShell systemd[1]: mysql.service: Start request repeated too quickly.
авг 28 11:37:47 GhostInTheShell systemd[1]: mysql.service: Failed with result 'exit-code'.
авг 28 11:37:47 GhostInTheShell systemd[1]: Failed to start MySQL Community Server.
  • the output said авг 28 10:59:14 GhostInTheShell apachectl[1051]: 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 are you sure about that "ServerName" ? – abu-ahmed al-khatiri Aug 28 '18 at 8:59
  • @abu-ahmedal-khatiri I fix this error: AH00558 , but still have this message when i try to start or restart apache2 – GhostInTheShell Aug 28 '18 at 9:14
  • @abu-ahmedal-khatiri That should not cause the server to fail. It happens all the time in new installations. – Jos Aug 28 '18 at 9:14
  • I find it strange that the error log can not be reached. Do you have a directory /var/log/apache2? – Jos Aug 28 '18 at 9:17
  • @Jos I don't have directory apache2 in /var/log .. What can i do in this case. – GhostInTheShell Aug 28 '18 at 9:18
0
  • I found out how I got the errors of Apache and MySql. When i use the program for cleaning the cash, logs and etc in this case i have erased my directories Apache2 and MySql in /var/log/

    Here is the solution

For apache2

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.