boze
Posts: 11
Joined: Sun Jan 08, 2017 2:41 am

Apache2 faild every time

Fri Jun 16, 2017 10:05 pm

hi
i install apache2 but after few days the apache can't start.

when i'm restarting apache
i'm getting error "Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details."
so to find the error i'm writing the command "systemctl status apache2.service"
and i'm getting :
Jun 17 01:02:37 osmc apache2[1922]: Starting web server: apache2 failed!
Jun 17 01:02:37 osmc apache2[1922]: The apache2 instance did not start with...).
Jun 17 01:02:37 osmc systemd[1]: apache2.service: control process exited, c...=1
Jun 17 01:02:37 osmc systemd[1]: Failed to start LSB: Apache2 web server.
Jun 17 01:02:37 osmc systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

some one know what i can do to fix it?

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Apache2 faild every time

Fri Jun 16, 2017 11:36 pm

Have you looked in /var/log/apache2/error.log?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Apache2 faild every time

Fri Jun 16, 2017 11:37 pm

Open a command window and run sudo apachectl configtest to find your error.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

boze
Posts: 11
Joined: Sun Jan 08, 2017 2:41 am

Re: Apache2 faild every time

Sat Jun 17, 2017 12:05 am

hii
all i can see there is old errors noting new from the day the apache2 stop working .

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Apache2 faild every time

Sat Jun 17, 2017 4:47 am

Stop the server with asudo systemctl stop apache2 command.

Run it from a command line with sudo apachectl -X -e debug and see if it emits any error messages.

Take a look in /var/log/apache2 at the error.log file in there.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

boze
Posts: 11
Joined: Sun Jan 08, 2017 2:41 am

Re: Apache2 faild every time

Sat Jun 17, 2017 8:10 am

hi

i add one error
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppres$

in google say to add :
ServerName localhost
to the file /etc/apache2/apache2.conf

*now this error not showing , in the error.log all i get is :

[Sat Jun 17 10:54:08.281163 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module access_compat_module from /usr/lib/apache2/modules/mod_access_$
[Sat Jun 17 10:54:08.281708 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module alias_module from /usr/lib/apache2/modules/mod_alias.so
[Sat Jun 17 10:54:08.282183 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module auth_basic_module from /usr/lib/apache2/modules/mod_auth_basic$
[Sat Jun 17 10:54:08.282585 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authn_core_module from /usr/lib/apache2/modules/mod_authn_core$
[Sat Jun 17 10:54:08.282952 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authn_file_module from /usr/lib/apache2/modules/mod_authn_file$
[Sat Jun 17 10:54:08.283392 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authz_core_module from /usr/lib/apache2/modules/mod_authz_core$
[Sat Jun 17 10:54:08.283849 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authz_host_module from /usr/lib/apache2/modules/mod_authz_host$
[Sat Jun 17 10:54:08.284235 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authz_user_module from /usr/lib/apache2/modules/mod_authz_user$
[Sat Jun 17 10:54:08.284791 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module autoindex_module from /usr/lib/apache2/modules/mod_autoindex.so
[Sat Jun 17 10:54:08.286208 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module deflate_module from /usr/lib/apache2/modules/mod_deflate.so
[Sat Jun 17 10:54:08.286705 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module dir_module from /usr/lib/apache2/modules/mod_dir.so
[Sat Jun 17 10:54:08.287087 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module env_module from /usr/lib/apache2/modules/mod_env.so
[Sat Jun 17 10:54:08.287523 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module filter_module from /usr/lib/apache2/modules/mod_filter.so
[Sat Jun 17 10:54:08.288032 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module mime_module from /usr/lib/apache2/modules/mod_mime.so
[Sat Jun 17 10:54:08.288675 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module mpm_prefork_module from /usr/lib/apache2/modules/mod_mpm_prefo$
[Sat Jun 17 10:54:08.289409 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module negotiation_module from /usr/lib/apache2/modules/mod_negotiati$
[Sat Jun 17 10:54:08.386975 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module php5_module from /usr/lib/apache2/modules/libphp5.so
[Sat Jun 17 10:54:08.388188 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module reqtimeout_module from /usr/lib/apache2/modules/mod_reqtimeout$
[Sat Jun 17 10:54:08.388839 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module setenvif_module from /usr/lib/apache2/modules/mod_setenvif.so
[Sat Jun 17 10:54:08.389570 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module status_module from /usr/lib/apache2/modules/mod_status.so


*** and the apache still don't working :
*** on sudo /etc/init.d/apache2 restart
i get this message : "
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed! "

when i'm adding the command journalctl -xn
i get "
Jun 17 11:06:25 osmc apache2[1482]: Starting web server: apache2 failed!
Jun 17 11:06:25 osmc apache2[1482]: The apache2 instance did not start within 20 seconds. Please read the log files to discover problems ... (warning).
Jun 17 11:06:25 osmc systemd[1]: apache2.service: control process exited, code=exited status=1
Jun 17 11:06:25 osmc systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit apache2.service has failed.
"


what can i do ?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Apache2 faild every time

Sat Jun 17, 2017 10:49 am

Look in /var/log/apache2/error.log
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Apache2 faild every time

Sat Jun 17, 2017 1:56 pm

Have you checked your available space on your SD card?

Code: Select all

df -h

boze
Posts: 11
Joined: Sun Jan 08, 2017 2:41 am

Re: Apache2 faild every time

Sat Jun 17, 2017 2:44 pm

i checked
noting more then 10% use

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Apache2 faild every time

Sat Jun 17, 2017 3:41 pm

You may need to remove and reinstall apache.
sudo apt-get remove --purge apache2

boze
Posts: 11
Joined: Sun Jan 08, 2017 2:41 am

Re: Apache2 faild every time

Sat Jun 17, 2017 11:44 pm

i did it already but, after few days the problem coming back.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Apache2 faild every time

Sat Jun 17, 2017 11:58 pm

I did a little net research. Have you installed php? If not, maybe you should.
sudo apt-get install php5

edit: When you say it fails after a few days, is that continuous running, or a few hours every day?

boze
Posts: 11
Joined: Sun Jan 08, 2017 2:41 am

Re: Apache2 faild every time

Sun Jun 18, 2017 7:45 am

i'm using php and sql
the php and sql working fine ..
the fails comes after few day i'm installing the apache sql and php
the only system fail is the apache, uninstall reinstall dons't help, the only way to make it work again is to format the sd card and install all over again.

what can i do ?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Apache2 faild every time

Sun Jun 18, 2017 9:27 am

Read the *.gz logs using zcat /var/log/apache2/error.log.1.gz | less
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

boze
Posts: 11
Joined: Sun Jan 08, 2017 2:41 am

Re: Apache2 faild every time

Sun Jun 18, 2017 6:28 pm

how to compress the error.log will help me

this is what i have in the error.log file

[Sat Jun 17 10:54:08.281163 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module access_compat_module from /usr/lib/apache2/modules/mod_access_$
[Sat Jun 17 10:54:08.281708 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module alias_module from /usr/lib/apache2/modules/mod_alias.so
[Sat Jun 17 10:54:08.282183 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module auth_basic_module from /usr/lib/apache2/modules/mod_auth_basic$
[Sat Jun 17 10:54:08.282585 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authn_core_module from /usr/lib/apache2/modules/mod_authn_core$
[Sat Jun 17 10:54:08.282952 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authn_file_module from /usr/lib/apache2/modules/mod_authn_file$
[Sat Jun 17 10:54:08.283392 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authz_core_module from /usr/lib/apache2/modules/mod_authz_core$
[Sat Jun 17 10:54:08.283849 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authz_host_module from /usr/lib/apache2/modules/mod_authz_host$
[Sat Jun 17 10:54:08.284235 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module authz_user_module from /usr/lib/apache2/modules/mod_authz_user$
[Sat Jun 17 10:54:08.284791 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module autoindex_module from /usr/lib/apache2/modules/mod_autoindex.so
[Sat Jun 17 10:54:08.286208 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module deflate_module from /usr/lib/apache2/modules/mod_deflate.so
[Sat Jun 17 10:54:08.286705 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module dir_module from /usr/lib/apache2/modules/mod_dir.so
[Sat Jun 17 10:54:08.287087 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module env_module from /usr/lib/apache2/modules/mod_env.so
[Sat Jun 17 10:54:08.287523 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module filter_module from /usr/lib/apache2/modules/mod_filter.so
[Sat Jun 17 10:54:08.288032 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module mime_module from /usr/lib/apache2/modules/mod_mime.so
[Sat Jun 17 10:54:08.288675 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module mpm_prefork_module from /usr/lib/apache2/modules/mod_mpm_prefo$
[Sat Jun 17 10:54:08.289409 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module negotiation_module from /usr/lib/apache2/modules/mod_negotiati$
[Sat Jun 17 10:54:08.386975 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module php5_module from /usr/lib/apache2/modules/libphp5.so
[Sat Jun 17 10:54:08.388188 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module reqtimeout_module from /usr/lib/apache2/modules/mod_reqtimeout$
[Sat Jun 17 10:54:08.388839 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module setenvif_module from /usr/lib/apache2/modules/mod_setenvif.so
[Sat Jun 17 10:54:08.389570 2017] [so:debug] [pid 1190] mod_so.c(266): AH01575: loaded module status_module from /usr/lib/apache2/modules/mod_status.so
[Sat Jun 17 16:10:47.839346 2017] [core:warn] [pid 3166] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache r$
[Sat Jun 17 16:10:47.852973 2017] [mpm_prefork:notice] [pid 3166] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Sat Jun 17 16:10:47.853151 2017] [core:notice] [pid 3166] AH00094: Command line: '/usr/sbin/apache2'
[Sat Jun 17 16:11:09.393830 2017] [mpm_prefork:notice] [pid 3166] AH00169: caught SIGTERM, shutting down
[Sat Jun 17 16:11:11.453898 2017] [mpm_prefork:notice] [pid 3184] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Sat Jun 17 16:11:11.454160 2017] [core:notice] [pid 3184] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 18 10:49:01.161957 2017] [core:warn] [pid 3184] AH00045: child process 3185 still did not exit, sending a SIGTERM
[Sun Jun 18 10:49:03.164266 2017] [core:warn] [pid 3184] AH00045: child process 3185 still did not exit, sending a SIGTERM
[Sun Jun 18 10:49:05.166198 2017] [core:warn] [pid 3184] AH00045: child process 3185 still did not exit, sending a SIGTERM
[Sun Jun 18 10:49:07.173097 2017] [core:error] [pid 3184] AH00046: child process 3185 still did not exit, sending a SIGKILL
[Sun Jun 18 10:49:08.174596 2017] [mpm_prefork:notice] [pid 3184] AH00169: caught SIGTERM, shutting down

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Apache2 faild every time

Sun Jun 18, 2017 6:31 pm

I'm outta here, you're not prepared to look at the evidence, so I give up.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

boze
Posts: 11
Joined: Sun Jan 08, 2017 2:41 am

Re: Apache2 faild every time

Sun Jun 18, 2017 7:22 pm

Albert Einstein once said :
"if you can't explain it to a six year old you don't understand it yourself"

there is some one else that can give me some tip to find the solution....?

Return to “Troubleshooting”