Unable to reach Fog Management website
-
I’m unable to reach the fog website I’m getting a connection refused error. As far as I know nothing has changed recently and I was able to use it last week. I’ll attach the error logs from apache below but I already tried pulling the most recent release and installing it. All services seem to be up and running.
[Mon Aug 21 13:25:25.064020 2017] [mpm_prefork:notice] [pid 1413] AH00169: caught SIGTERM, shutting down
[Mon Aug 21 13:25:55.933090 2017] [mpm_prefork:notice] [pid 4358] AH00163: Apache/2.4.27 (Ubuntu) OpenSSL/1.1.0f configured – resuming normal operations
[Mon Aug 21 13:25:55.933130 2017] [core:notice] [pid 4358] AH00094: Command line: ‘/usr/sbin/apache2’Edit:
If I do service apache2 status it states that is is running but I’m getting the follow logs from that commandAug 21 14:19:13 fog apachectl[1307]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/001-fog.conf:1
Aug 21 14:19:13 fog apachectl[1307]: 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 th
Aug 21 14:19:13 fog systemd[1]: Started The Apache HTTP Server. -
Lets see what the apache error log states (the above post doesn’t really tell me anything). The error log should be in /var/logs/apache2/error.log. Tail that file. If it gives you the indication of a database communication error AND it was working then magically stopped THEN this post is probably relevant: https://forums.fogproject.org/topic/10006/ubuntu-is-fog-s-enemy
-
The first dump is the tail from error.log.
-
@jarl2-0 Well that’s pretty unimpressive. It just tells me the http server was shutting down. If you start the http server up again and try to access the management console does it append anything to the error log? It should be throwing some errors if you try to access the management page but only get a white (blank) page.
-
@george1421 It doesn’t the page comes up connection timed out and I don’t see any connection attempts on the apache logs.
-
@jarl2-0 Ah, OK then lets try this.
ps aux|grep apache
to confirm that the apache process is running
You should see something like thiswww-data 21806 0.0 0.7 106732 7236 ? S 06:25 0:00 /usr/sbin/apache2 -k start www-data 21807 0.0 0.7 106732 7236 ? S 06:25 0:00 /usr/sbin/apache2 -k start www-data 21808 0.0 0.7 106732 7236 ? S 06:25 0:00 /usr/sbin/apache2 -k start www-data 21809 0.0 0.7 106732 7236 ? S 06:25 0:00 /usr/sbin/apache2 -k start www-data 21810 0.0 0.7 106732 7236 ? S 06:25 0:00 /usr/sbin/apache2 -k start
netstat -an | grep 80
to confirm that the apache server is listening
You should see something like this:tcp 0 0 :::80 :::* LISTEN
systemctl status firewalld
to see if the firewall is on by chance. -
-
@Jarl2-0 Please run
sudo iptables -L -n -v
and post a picture here. Just wanna make sure… -
@jarl2-0 This is really strange.
Apache is running, its listening on port 80 and yet you are getting a connection timeout. Something is not adding up. For the management gui access are you using the ip address of the fog server or a conical name?
I’m going to confirm a curl call to see if we can call the management page from the linux server console. One sec while I confirm it does what I think I want it to.
-
@jarl2-0 OK from the fog server linux console key in the following command.
curl "http://127.0.0.1/fog/management/index.php"
This is going to return a screen full of html code. This is a good thing. If we get a timeout then that will tell us something else.Then repeat the same process with the fog server’s IP address.
curl "http://<fog_server_ip>/fog/management/index.php"
-
I connect to it via IP normally.
Curling localhost and IP I got an HTML dump.
@Sebastian-Roth the output was really long so I dumped it into a text file and copied it to pastebin. https://pastebin.com/DAUPa0F8
-
@jarl2-0 well your pastbin file shows that the firewall rules are loaded into iptables.
You should see this if the firewall has been disabled.
# iptables -L -n -v Chain INPUT (policy ACCEPT 2968 packets, 899K bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 3137 packets, 471K bytes) pkts bytes target prot opt in out source destination
-
@Jarl2-0 As George already said, the firewall rules are the issue in your case. There is no rule to allow incoming packets on port 80 (HTTP) and default policy is drop… For now, try
sudo ufw disable
and see if you get back the FOG web UI. -
@sebastian-roth That worked I have no idea how those rules got loaded onto the firewall however…