Changing hostname from fog broken
-
@sebastian-roth If I redownload Fog and reinstall it will it fix the issue? (hopefully it will keep all settings)
-
@dejv said in Changing hostname from fog broken:
If I redownload Fog and reinstall it will it fix the issue?
Well, without further information we don’t know what is causing the problem. Therefore I can’t tell you if re-installing will help either.
-
Tried redownloading and installing fog as its pretty easy and straightforward however still same issue.
[Tue May 25 00:00:04.404259 2021] [mpm_prefork:notice] [pid 801] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations [Tue May 25 00:00:04.404282 2021] [core:notice] [pid 801] AH00094: Command line: '/usr/sbin/apache2' [Wed May 26 00:00:06.516283 2021] [mpm_prefork:notice] [pid 801] AH00171: Graceful restart requested, doing restart 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 [Mon May 24 00:00:07.495210 2021] [mpm_prefork:notice] [pid 801] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations [Mon May 24 00:00:07.495231 2021] [core:notice] [pid 801] AH00094: Command line: '/usr/sbin/apache2' [Tue May 25 00:00:03.853271 2021] [mpm_prefork:notice] [pid 801] AH00171: Graceful restart requested, doing restart 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 [Thu May 20 00:00:07.690477 2021] [mpm_prefork:notice] [pid 801] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations [Thu May 20 00:00:07.690497 2021] [core:notice] [pid 801] AH00094: Command line: '/usr/sbin/apache2' [Thu May 20 14:46:05.550377 2021] [proxy:error] [pid 901639] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed [Thu May 20 14:46:05.556623 2021] [proxy_fcgi:error] [pid 901639] [client 192.168.0.254:49042] AH01079: failed to make connection to backend: 127.0.0.1 [Thu May 20 14:46:05.575487 2021] [proxy:error] [pid 901622] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed [Thu May 20 14:46:05.575640 2021] [proxy_fcgi:error] [pid 901622] [client 192.168.0.254:49043] AH01079: failed to make connection to backend: 127.0.0.1 [Thu May 20 14:46:07.616286 2021] [proxy:error] [pid 901620] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed [Thu May 20 14:46:07.616353 2021] [proxy_fcgi:error] [pid 901620] [client 192.168.0.254:49065] AH01079: failed to make connection to backend: 127.0.0.1 [Thu May 20 14:46:08.280219 2021] [mpm_prefork:notice] [pid 801] AH00169: caught SIGTERM, shutting down [Thu May 20 14:46:42.725606 2021] [mpm_prefork:notice] [pid 801] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations [Thu May 20 14:46:42.760133 2021] [core:notice] [pid 801] AH00094: Command line: '/usr/sbin/apache2' [Thu May 20 15:49:43.614999 2021] [proxy_fcgi:error] [pid 1133] [client 192.168.0.93:49784] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function isValid() on null in /var/www/html/fog/lib/fog/host.class.php:305\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogbase.class.php(1832): Host->save()\n#1 /var/www/html/fog/lib/client/fogclient.class.php(179): FOGBase->sendData()\n#2 /var/www/html/fog/service/register.php(32): FOGClient->__construct()\n#3 {main}\n thrown in /var/www/html/fog/lib/fog/host.class.php on line 305' [Thu May 20 15:56:04.356205 2021] [proxy_fcgi:error] [pid 1896] [client 192.168.0.95:49766] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function isValid() on null in /var/www/html/fog/lib/fog/host.class.php:305\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogbase.class.php(1832): Host->save()\n#1 /var/www/html/fog/lib/client/fogclient.class.php(179): FOGBase->sendData()\n#2 /var/www/html/fog/service/register.php(32): FOGClient->__construct()\n#3 {main}\n thrown in /var/www/html/fog/lib/fog/host.class.php on line 305' [Fri May 21 00:00:10.688815 2021] [mpm_prefork:notice] [pid 801] AH00171: Graceful restart requested, doing restart 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
I found some other files that were compressed please find above.
The php7.4 log is all the same as posted before
-
@dejv said in Changing hostname from fog broken:
AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to a member function isValid() on null in /var/www/html/fog/lib/fog/host.class.php:305\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogbase.class.php(1832): Host->save()\n#1 /var/www/html/fog/lib/client/fogclient.class.php(179): FOGBase->sendData()\n#2 /var/www/html/fog/service/register.php(32): FOGClient->__construct()\n#3 {main}\n thrown in /var/www/html/fog/lib/fog/host.class.php on line 305’
That might be a first hint on what might be causing the problem. But on the other hand I am wondering why it’s calling register.php. Is this client registered in FOG already or not?
-
yes client was registered already
-
@dejv Found some time to look into this and I think I was on the wrong track. I looked through the code and I don’t think that part can be triggered by a registered client. It does not match what we see in the fog-client log file. As well the logs posted last (that include the register.php call) are from May 20. But the fog-client log posted earlier is from May 21. Just doesn’t match.
So let’s try to tackle this from a different angle. What happens if you open the URL http://fog/fog/service/getversion.php?clientver&newService&json in your browser on a normal work PC?
I ask because in the fog-client log we see that URL request triggered a HTTP 502 Bad Gateway error and I am wondering if you see that when opening the URL manually as well.
-
Thanks
I am getting the below number when accessesing the following link: http://192.168.0.58/fog/service/getversion.php?clientver&newService&json
0.12.0
-
@dejv said in Changing hostname from fog broken:
I am getting the below number when accessesing the following link: http://192.168.0.58/fog/service/getversion.php?clientver&newService&json
0.12.0While this sounds like it does work as it should the version number is different to what we saw in the fog-client log. When you re-installed the FOG server did you use the latest dev-branch version?
Possibly you are hitting a different error now. Please post the latest fog-client fog.log here so we see if it’s still the same problem or a different one.
Are your FOG server and the client machine in the same subnet? No router, gateway or maybe proxy server in between? I ask because we had someone with very strange fog-client issues that were caused by a proxy server. The fog-client seems to be using the global Windows proxy settings.
-
I downloaded from : https://github.com/FOGProject/fogproject.
Fog server and clients are on different subnets however have been like this for around 2years, I have a sophos utm router, without proxy server------------------------------------------------------------------------------ ----------------------------------UserTracker--------------------------------- ------------------------------------------------------------------------------ 6/4/2021 3:24:23 PM Client-Info Client Version: 0.11.19 6/4/2021 3:24:23 PM Client-Info Client OS: Windows 6/4/2021 3:24:23 PM Client-Info Server Version: 1.5.9 6/4/2021 3:24:23 PM Middleware::Response ERROR: Unable to get subsection 6/4/2021 3:24:23 PM Middleware::Response ERROR: Object reference not set to an instance of an object. 6/4/2021 3:24:23 PM Service Sleeping for 60 seconds 6/4/2021 3:25:23 PM Middleware::Communication URL: http://fog/fog/management/index.php?sub=requestClientInfo&configure&newService&json 6/4/2021 3:25:23 PM Middleware::Communication ERROR: Could not contact FOG server 6/4/2021 3:25:23 PM Middleware::Communication ERROR: The remote server returned an error: (502) Bad Gateway. 6/4/2021 3:25:23 PM Middleware::Response Success 6/4/2021 3:25:23 PM Service ERROR: Invalid promptTime, using default 6/4/2021 3:25:23 PM Middleware::Communication URL: http://fog/fog/management/index.php?sub=requestClientInfo&mac=74:D0:2B:35:33:6B&newService&json 6/4/2021 3:25:23 PM Middleware::Communication ERROR: Could not contact FOG server 6/4/2021 3:25:23 PM Middleware::Communication ERROR: The remote server returned an error: (502) Bad Gateway. 6/4/2021 3:25:23 PM Middleware::Response Success 6/4/2021 3:25:23 PM Middleware::Communication URL: http://fog/fog/service/getversion.php?clientver&newService&json 6/4/2021 3:25:23 PM Service ERROR: Unable to get cycle data 6/4/2021 3:25:23 PM Service ERROR: The remote server returned an error: (502) Bad Gateway. 6/4/2021 3:25:23 PM Middleware::Response Success ------------------------------------------------------------------------------ ---------------------------------ClientUpdater-------------------------------- ------------------------------------------------------------------------------ 6/4/2021 3:25:23 PM Client-Info Client Version: 0.11.19 6/4/2021 3:25:23 PM Client-Info Client OS: Windows 6/4/2021 3:25:23 PM Client-Info Server Version: 1.5.9 6/4/2021 3:25:23 PM Middleware::Response ERROR: Unable to get subsection 6/4/2021 3:25:23 PM Middleware::Response ERROR: Object reference not set to an instance of an object. ------------------------------------------------------------------------------ ----------------------------------TaskReboot---------------------------------- ------------------------------------------------------------------------------ 6/4/2021 3:25:23 PM Client-Info Client Version: 0.11.19 6/4/2021 3:25:23 PM Client-Info Client OS: Windows 6/4/2021 3:25:23 PM Client-Info Server Version: 1.5.9 6/4/2021 3:25:23 PM Middleware::Response ERROR: Unable to get subsection 6/4/2021 3:25:23 PM Middleware::Response ERROR: Object reference not set to an instance of an object. ------------------------------------------------------------------------------ --------------------------------HostnameChanger------------------------------- ------------------------------------------------------------------------------ 6/4/2021 3:25:23 PM Client-Info Client Version: 0.11.19 6/4/2021 3:25:23 PM Client-Info Client OS: Windows 6/4/2021 3:25:23 PM Client-Info Server Version: 1.5.9 6/4/2021 3:25:23 PM Middleware::Response ERROR: Unable to get subsection 6/4/2021 3:25:23 PM Middleware::Response ERROR: Object reference not set to an instance of an object. ------------------------------------------------------------------------------ ---------------------------------SnapinClient--------------------------------- ------------------------------------------------------------------------------ 6/4/2021 3:25:23 PM Client-Info Client Version: 0.11.19 6/4/2021 3:25:23 PM Client-Info Client OS: Windows 6/4/2021 3:25:23 PM Client-Info Server Version: 1.5.9 6/4/2021 3:25:23 PM Middleware::Response ERROR: Unable to get subsection 6/4/2021 3:25:23 PM Middleware::Response ERROR: Object reference not set to an instance of an object. ------------------------------------------------------------------------------ --------------------------------PrinterManager-------------------------------- ------------------------------------------------------------------------------ 6/4/2021 3:25:23 PM Client-Info Client Version: 0.11.19 6/4/2021 3:25:23 PM Client-Info Client OS: Windows 6/4/2021 3:25:23 PM Client-Info Server Version: 1.5.9 6/4/2021 3:25:23 PM Middleware::Response ERROR: Unable to get subsection 6/4/2021 3:25:23 PM Middleware::Response ERROR: Object reference not set to an instance of an object. ------------------------------------------------------------------------------ --------------------------------PowerManagement------------------------------- ------------------------------------------------------------------------------ 6/4/2021 3:25:23 PM Client-Info Client Version: 0.11.19 6/4/2021 3:25:23 PM Client-Info Client OS: Windows 6/4/2021 3:25:23 PM Client-Info Server Version: 1.5.9 6/4/2021 3:25:23 PM Middleware::Response ERROR: Unable to get subsection 6/4/2021 3:25:23 PM Middleware::Response ERROR: Object reference not set to an instance of an object. ------------------------------------------------------------------------------ ----------------------------------UserTracker--------------------------------- ------------------------------------------------------------------------------ 6/4/2021 3:25:23 PM Client-Info Client Version: 0.11.19 6/4/2021 3:25:23 PM Client-Info Client OS: Windows 6/4/2021 3:25:23 PM Client-Info Server Version: 1.5.9 6/4/2021 3:25:23 PM Middleware::Response ERROR: Unable to get subsection 6/4/2021 3:25:23 PM Middleware::Response ERROR: Object reference not set to an instance of an object. 6/4/2021 3:25:23 PM Service Sleeping for 60 seconds
-
@dejv In the fog.log we see the hostname
fog
in the URL - http://fog/fog/management/… Does this hostname resolve to the IP 192.168.0.58?Do you have just one FOG server (master node) or other FOG storage nodes as well?
Please run
ls -al /var/www/{,html}
as terminal command on your FOG server and post the full output here. -
@sebastian-roth said in Changing hostname from fog broken:
http://fog/fog/management/ - doesnt seem to open
http://192.168.0.58/fog/management - workshowever when I ping fog I get a reply
I only got 1 fog server
Command as requested:
root@fog:~# ls -al /var/www/{,html} /var/www/: total 16 drwxr-xr-x 4 root root 4096 Jan 29 2019 . drwxr-xr-x 15 root root 4096 Jan 29 2019 .. drwxr-xr-x 11 www-data www-data 4096 Jan 29 2019 fog drwxr-xr-x 3 root root 4096 Mej 26 12:24 html /var/www/html: total 28 drwxr-xr-x 3 root root 4096 Mej 26 12:24 . drwxr-xr-x 4 root root 4096 Jan 29 2019 .. drwxr-xr-x 10 www-data www-data 4096 Mej 26 12:26 fog -rw-r--r-- 1 root root 10918 Jan 29 2019 index.html -rw-r--r-- 1 www-data www-data 52 Ott 8 2020 index.php root@fog:~#
-
@dejv Can you please run:
sudo -i mv /var/www/fog{,_back} ln -s /var/www/html/fog /var/www/fog
This should help fix the fact that your environment sees 2 separate fog instances (one in /var/www/fog and one in /var/www/html/fog with the one in /var/www/html being the newest version.)
The commands I give will move the /var/www/fog to /var/www/fog_back (you can simply delete this if you feel comfortable to do so.)
Thank you,
-
@tom-elliott I tested on another computer and its working.
on this particular pc its not working. I will try and uninstall fog client from the pc and reinstall it again and will see if it works.
IF it still doesnt work will try to remove from fog server and re add