Superbug50
Posts: 4
Joined: Wed Oct 17, 2018 2:51 am

My local website doesn't work and every time i ping localhost i see it's from ( : : 1), Help pls

Wed Oct 17, 2018 3:03 am


Hello, This happened today when i was trying to directly go to my local-host website, Also whan i was pinging today it gave me this
64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.115 ms
64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.115 ms
64 bytes from localhost (::1): icmp_seq=3 ttl=64 time=0.115 ms
64 bytes from localhost (::1): icmp_seq=4 ttl=64 time=0.115 ms

Also when i tried to start up apache2 this is what it gave me:
---
[email protected]:~ $ sudo apache2
[Tue Oct 16 19:56:49.473376 2018] [core:warn] [pid 9989] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
[email protected]:~ $ 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.
[email protected]:~ $ sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-10-16 19:57:00 PDT; 23s ago
Process: 10089 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Oct 16 19:57:00 JPI3 apachectl[10089]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Oct 16 19:57:00 JPI3 apachectl[10089]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Oct 16 19:57:00 JPI3 apachectl[10089]: no listening sockets available, shutting down
Oct 16 19:57:00 JPI3 apachectl[10089]: AH00015: Unable to open logs
Oct 16 19:57:00 JPI3 apachectl[10089]: Action 'start' failed.
Oct 16 19:57:00 JPI3 apachectl[10089]: The Apache error log may have more information.
Oct 16 19:57:00 JPI3 systemd[1]: apache2.service: Control process exited, code=exited status=1
Oct 16 19:57:00 JPI3 systemd[1]: Failed to start The Apache HTTP Server.
Oct 16 19:57:00 JPI3 systemd[1]: apache2.service: Unit entered failed state.
Oct 16 19:57:00 JPI3 systemd[1]: apache2.service: Failed with result 'exit-code'.
[email protected]:~ $
---
Can someone ask me why this keeps showing up?

Thanks,
Superbug50
Thanks for reading this
-Superbug50

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

Re: My local website doesn't work and every time i ping localhost i see it's from ( : : 1), Help pls

Wed Oct 17, 2018 12:33 pm

The apache2 service starts as a service when your RPi boots. If you try to run apache2 again, that is the output you will get.

Edit: try this to check the status of apache2.

Code: Select all

sudo service apache2 status
It should show active (running).

Superbug50
Posts: 4
Joined: Wed Oct 17, 2018 2:51 am

Re: My local website doesn't work and every time i ping localhost i see it's from ( : : 1), Help pls

Wed Oct 17, 2018 11:09 pm

Did that and this shows up.

Code: Select all

[email protected]:~ $ sudo service apache2 status
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: 
   Active: failed (Result: exit-code) since Wed 2018-10-17 08:36:39 PDT; 7h ago
  Process: 704 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILUR

Oct 17 08:36:39 JPI3 apachectl[704]: AH00558: apache2: Could not reliably determ
Oct 17 08:36:39 JPI3 apachectl[704]: (98)Address already in use: AH00072: make_s
Oct 17 08:36:39 JPI3 apachectl[704]: no listening sockets available, shutting do
Oct 17 08:36:39 JPI3 apachectl[704]: AH00015: Unable to open logs
Oct 17 08:36:39 JPI3 apachectl[704]: Action 'start' failed.
Oct 17 08:36:39 JPI3 apachectl[704]: The Apache error log may have more informat
Oct 17 08:36:39 JPI3 systemd[1]: apache2.service: Control process exited, code=e
Oct 17 08:36:39 JPI3 systemd[1]: Failed to start The Apache HTTP Server.
Oct 17 08:36:39 JPI3 systemd[1]: apache2.service: Unit entered failed state.
Oct 17 08:36:39 JPI3 systemd[1]: apache2.service: Failed with result 'exit-code'
lines 1-15/15 (END)...skipping...
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-10-17 08:36:39 PDT; 7h ago
  Process: 704 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Oct 17 08:36:39 JPI3 apachectl[704]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress thi
Oct 17 08:36:39 JPI3 apachectl[704]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Oct 17 08:36:39 JPI3 apachectl[704]: no listening sockets available, shutting down
Oct 17 08:36:39 JPI3 apachectl[704]: AH00015: Unable to open logs
Oct 17 08:36:39 JPI3 apachectl[704]: Action 'start' failed.
Oct 17 08:36:39 JPI3 apachectl[704]: The Apache error log may have more information.
Oct 17 08:36:39 JPI3 systemd[1]: apache2.service: Control process exited, code=exited status=1
Oct 17 08:36:39 JPI3 systemd[1]: Failed to start The Apache HTTP Server.
Oct 17 08:36:39 JPI3 systemd[1]: apache2.service: Unit entered failed state.
Oct 17 08:36:39 JPI3 systemd[1]: apache2.service: Failed with result 'exit-code'.
Do i have to Reinstall apache2 because i'v done that, also im running a local LAMP Web Server.
Thanks for reading this
-Superbug50

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

Re: My local website doesn't work and every time i ping localhost i see it's from ( : : 1), Help pls

Wed Oct 17, 2018 11:42 pm

These three lines explain a little. The lines aren't complete, but it appears you have some other service running that is taking that address and sockets.

Code: Select all

Active: failed (Result: exit-code) since Wed 2018-10-17 08:36:39 PDT; 7h ago
Address already in use:
no listening sockets available

Superbug50
Posts: 4
Joined: Wed Oct 17, 2018 2:51 am

Re: My local website doesn't work ...

Thu Oct 18, 2018 4:40 am

I will try and find that. but i don't know what service is running that won't let me run apache2. i had uninstalled some Packages.
Attachments
Screenshot_541.png
Uninstalled packages and still apache2 wont work
Screenshot_541.png (35.41 KiB) Viewed 430 times
Screenshot_540.png
Some kept packages. before apache2 wont start when i rebooted my raspberry pi 3.
Screenshot_540.png (70.69 KiB) Viewed 430 times
Thanks for reading this
-Superbug50

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

Re: My local website doesn't work and every time i ping localhost i see it's from ( : : 1), Help pls

Thu Oct 18, 2018 12:11 pm

Do you have another uSD card? If so, you should try a fresh install. If not, you should think about buying one.

Superbug50
Posts: 4
Joined: Wed Oct 17, 2018 2:51 am

Re: My local website doesn't work and every time i ping localhost i see it's from ( : : 1), Help pls

Fri Oct 19, 2018 7:48 am

I have a sd card but it only works on my pc. when booting up, it won't flash or start up. i will change OS on NOOBS from LibreELEC to Raspbin.
Thanks for reading this
-Superbug50

Return to “Troubleshooting”