• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Changing hostname from fog broken

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    19
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sebastian Roth Moderator
      last edited by

      @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?

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      D 1 Reply Last reply Reply Quote 0
      • D
        dejv @Sebastian Roth
        last edited by

        @sebastian-roth

        yes client was registered already

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by

          @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.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          D 1 Reply Last reply Reply Quote 0
          • D
            dejv @Sebastian Roth
            last edited by dejv

            @sebastian-roth

            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

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by

              @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.0

              While 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.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              D 1 Reply Last reply Reply Quote 0
              • D
                dejv @Sebastian Roth
                last edited by

                @sebastian-roth

                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
                
                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by

                  @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.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dejv @Sebastian Roth
                    last edited by dejv

                    @sebastian-roth said in Changing hostname from fog broken:

                    http://fog

                    http://fog/fog/management/ - doesnt seem to open
                    http://192.168.0.58/fog/management - works

                    however 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:~#
                    
                    Tom ElliottT 1 Reply Last reply Reply Quote 1
                    • Tom ElliottT
                      Tom Elliott @dejv
                      last edited by Sebastian Roth

                      @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,

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        dejv @Tom Elliott
                        last edited by

                        @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

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        178

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project