Cannot log in after running Install script again
-
My network address space changed from 192.168.0.0/23 to 10.32.10.0/23. I did nothing in the FOG config, but noticed PCs that were set to boot from the network first failed.
While searching for fixing it, I came across this page about changing the FOG server IP address. It was 1.5.5 before, so I expected the 1.3.0 instructions to work. I updated the
ipaddress=
parameter, and ran the installation. It completes successfully, and tells me to log in to the Management Interface in my web browser.I type in my FOG username and password, and it hangs. I eventually get it to time out with a 503 error. When I check the Apache Error Log (
/var/log/apache2/error.log
), I see the following line:[proxy_fcgi:error] [pid 597] (70007)The timeout specified has expired: [client 10.32.10.115:50251] AH01075: Error dispatching request to : (polling), referer: http://10.32.10.2/fog/management/
I have tried rebooting the server (Debian 9.8), but no change. I have checked the following as well:
- No firewall is running (
iptables -L
shows everything is Accept) - Lots of free space on all partitions
- 250 MB of used memory, with 2.5 GB free
- No
selinux
installed or activated apt
is updated, and all packages available are installed- Checked
/var/log/php7.0-fpm.log
- the same four lines keep repeated:[25-Mar-2019 09:20:42] NOTICE: fpm is running, pid 6223 [25-Mar-2019 09:20:42] NOTICE: ready to handle connections [25-Mar-2019 09:20:42] NOTICE: systemd monitor interval set to 10000ms [25-Mar-2019 09:25:27] NOTICE: Terminating ... [25-Mar-2019 09:25:27] NOTICE: exiting, bye-bye!
- Restarted
apache2.service
,mysql
, andphp7.0-fpm
, no change. nginx
is not installed, and has never been installed on this server.- Attempted to run the latest stable installfog.sh script from Git Hub - no change
Where can I look next?
- No firewall is running (
-
@lukebarone Ahhhh, I might have an idea what’s going on. Back when the wiki instructions were written it used to work this way. You could login and change the StorageNode information in the web UI. But an issue in the code might refuse this now. It is fixed in the current development code but still a problem in 1.5.5.
To work around this you’d either need to modify the Storage Node information in the database by hand or you might try Wayne’s updateIP script which will do the necessary changes for you. A third way would be to extend the proxy timeout for php-fpm to make it long enough to wait for the storage node timeout. For that change your
001-fog.conf
look like this and restart the apache webserver:<VirtualHost *:80> <Proxy "fcgi://127.0.0.1:9000"> ProxySet timeout=600 </Proxy> <FilesMatch "\.php$"> SetHandler "proxy:fcgi://127.0.0.1:9000/" </FilesMatch> ...
-
@lukebarone Sounds like the installer messed something up. Sorry for that. Please take a look at the following configs to see if you find anything suspicious:
/etc/apache2/sites-available/001-fog.conf
and/var/www/html/fog/lib/fog/config.class.php
As well run
ss -antul | grep 9000
to see if php-fpm is properly listening on that port. -
@Sebastian-Roth Output below:
# ss -antul | grep 9000 tcp LISTEN 0 128 127.0.0.1:9000 *:* # cat /etc/apache2/sites-available/001-fog.conf <VirtualHost *:80> <FilesMatch "\.php$"> SetHandler "proxy:fcgi://127.0.0.1:9000/" </FilesMatch> KeepAlive Off ServerName 10.32.10.2 DocumentRoot /var/www/html/ <Directory /var/www/html/fog/> DirectoryIndex index.php index.html index.htm </Directory> RewriteEngine On RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d RewriteRule ^/fog/(.*)$ /fog/api/index.php [QSA,L] </VirtualHost>
And the config.class.php file looks normal to me.
-
@lukebarone Ahhhh, I might have an idea what’s going on. Back when the wiki instructions were written it used to work this way. You could login and change the StorageNode information in the web UI. But an issue in the code might refuse this now. It is fixed in the current development code but still a problem in 1.5.5.
To work around this you’d either need to modify the Storage Node information in the database by hand or you might try Wayne’s updateIP script which will do the necessary changes for you. A third way would be to extend the proxy timeout for php-fpm to make it long enough to wait for the storage node timeout. For that change your
001-fog.conf
look like this and restart the apache webserver:<VirtualHost *:80> <Proxy "fcgi://127.0.0.1:9000"> ProxySet timeout=600 </Proxy> <FilesMatch "\.php$"> SetHandler "proxy:fcgi://127.0.0.1:9000/" </FilesMatch> ...
-
@Sebastian-Roth I added the new lines to my
/etc/apache2/sites-enabled/001-fog
file, entered my credentials and waited 10 minutes… No change, still getting an HTTP/503 response.I downloaded the script to the FOG server, ran
./updateIP.sh
, and got the following results:Updating the IP Settings server-wide. A password was not set in /opt/fog/.fogsettings for mysql use. Updating the IP in /tftpboot/default.ipxe Backing up /var/www/html//fog/lib/fog/config.class.php Updating the IP inside /var/www/html//fog/lib/fog/config.class.php Updating the fields inside of /opt/fog/.fogsettings All done.
I tried to log in again, and it’s still spinning around (although, it’s only been 2 minutes since I ran the script and tried to log in).
EDIT: It’s working now! After running the script, I also restarted Apache, PHP and MySQL, then tried again:
systemctl restart php7.0-fpm.service apache2.service mysql.service