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

    Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    21
    2.8k
    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.
    • C
      carl.d
      last edited by carl.d

      Hello,
      After upgrading Debian from 8 to 9, then from 9 to 10, I tried updating FoG from 1.5.7 to 1.5.9.

      The process completed without errors, but after logging into FoG and going to the configuration page the version information section reads “Failed to get latest info”.

      I also found the kernelUpdate page displays ERROR 500 when I try to view it. Same with the log viewer.

      Please advise, thank you!
      edit I just noticed the dashboard no longer shows my storage info in the upper right corner either. Also, I think my predecessor did the install many years ago via the tarball method but I used git for the upgrade attempt(s).

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @carl.d
        last edited by

        @carl-d In place upgrades are always message because repo packages sometimes disappear or change.

        1.5.9 does not support debian 11 (yes I know you mentioned 10).

        What I would do is switch to the dev branch and then reinstall FOG 1.5.9.110 or later. That does have fixes in it that might address missing packages in debian 10.

        TBH with such a large jump in both OS versions and FOG versions, I would have just spun up a new fog server then migrated stuff from the old fog server to the new fog server. This would have kept the old fog server functional until the functionality of the new fog server could be affirmed. Its a bit late now so as I mentioned, switch to the dev branch of FOG and then reinstall FOG. Make sure you do all 3 parts of the install. (linux console->FOG Web UI->linux console to complete)

        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!

        C 1 Reply Last reply Reply Quote 0
        • C
          carl.d @george1421
          last edited by

          @george1421
          Thank you, George1421.

          When I made the attempt at upgrading FoG to 1.5.9 from 1.5.7, I did so through the dev branch.

          I just noticed that when I start a task, I get taken to a broken page although the task itself does get created and executes.

          I’m going to revert back to the snapshot I took before attempting the FoG upgrade. I took snapshots before and after going from Debian 8 to 9, and 9 to 10.

          I can see that FoG itself still thinks it’s version 1.5.7.

          Since I have these snapshots, I could revert back to Debian 8. Should I do that and then stand up a new FOG server as you suggested? Assuming that’s a yes, which OS would you recommend? Debian, Ubuntu, something else?

          Please consider, I am a Linux novice. Thanks again!

          edit again- I reverted back to the snapshot I took after upgrading Debian 8 to 9.
          From this point (on Debian 9, FoG 1.5.7), the issues I mentioned earlier are not occurring. I can see the version and the sub-pages (kernel update, log viewer). Dashboard looks good too.

          Wondering if I should try upgrading FoG to 1.5.9 (dev-branch) or go with the new server.

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

            @carl-d said in Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10:

            The process completed without errors, but after logging into FoG and going to the configuration page the version information section reads “Failed to get latest info”.
            I also found the kernelUpdate page displays ERROR 500 when I try to view it. Same with the log viewer.

            It’s hard to say without having more details like log files (see my signature). Though it sounds very similar to what we tried to solve in another topic two years ago: https://forums.fogproject.org/topic/14813/updated-ubuntu-fog (ignore this being Ubuntu)

            When I made the attempt at upgrading FoG to 1.5.9 from 1.5.7, I did so through the dev branch.

            Can you explain what you mean by “through the dev branch”? I ask because the version 1.5.9 is not dev-branch. Currently 1.5.9 is the latest official FOG release. But the branch dev-branch is different to that. It has many bugs fixed and things improved.

            I just noticed that when I start a task, I get taken to a broken page although the task itself does get created and executes.

            Same in the topic mentioned above.

            I’m going to revert back to the snapshot I took before attempting the FoG upgrade. I took snapshots before and after going from Debian 8 to 9, and 9 to 10.

            Using snapshots is a great way of preventing from exactly these situations where things go wrong on updates, well done!

            I can see that FoG itself still thinks it’s version 1.5.7.

            You mean after the update. Well that’s strange. If you see this again on the next try I ask you to run ls -al /var/www /var/www/html /var/www/fog and post output here in the forums. It’s likely two versions of the web UI are installed.

            Since I have these snapshots, I could revert back to Debian 8. Should I do that and then stand up a new FOG server as you suggested?

            While setting up a new server is not a bad idea in general to get rid of some issues with old stuff I can also see this one to be fixed. See what you think after reading the topic linked above.

            Please consider, I am a Linux novice.

            We try to help you but it’s definitely a good idea to train your Linux skills to be able to debug and fix issues.

            From this point (on Debian 9, FoG 1.5.7), the issues I mentioned earlier are not occurring. I can see the version and the sub-pages (kernel update, log viewer). Dashboard looks good too.

            Wondering if I should try upgrading FoG to 1.5.9 (dev-branch) or go with the new server.

            If you really want to use dev-branch (which is probably a good idea if you want to update to Debian 10 or 11) then follow these steps (assuming you cloned to git repo to /root/fogproject/)

            cd /root/fogproject/
            git checkout dev-branch
            git pull
            cd bin/
            ./installfog.sh
            

            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

            C 2 Replies Last reply Reply Quote 0
            • C
              carl.d @Sebastian Roth
              last edited by

              @sebastian-roth

              How do I remove the php5 package from the install script?

              When I try to upgrade or otherwise reinstall Fog now, it fails at
              "installing package: php5… failed (will try later)
              .
              .
              …
              “Installing now everything is updated…failed”
              Package php5 is not available, but is referred to by another package.

              I’m currently on Debian 9 after having reverted to a previous snapshot

              When I attempt to reinstall Fog I do the following
              cd /root/fogproject/
              git checkout dev-branch
              git pull
              cd bin/
              ./installfog.sh

              The git pull command returns, says it’s already up to date

              C 1 Reply Last reply Reply Quote 0
              • C
                carl.d @carl.d
                last edited by

                I’m about ready to give up on old Debian.

                I’m going to upgrade to Debian 10, and then to 11 before I attempt another FoG reinstall/upgrade

                C 1 Reply Last reply Reply Quote 0
                • C
                  carl.d @carl.d
                  last edited by

                  Now on Debian 11, those upgrades went without error.
                  Now when I try to reinstall FoG I get a different error:
                  Setting up Apache and PHP files…failed
                  PHP failed to install properly
                  Could not find /etc/php/7.4/fpm/php.ini

                  I’m going to create an empty pnp.ini with the touch command at the location where FoG is expecting to see it

                  C 1 Reply Last reply Reply Quote 0
                  • C
                    carl.d @carl.d
                    last edited by

                    @carl-d
                    I was able to get the Fog installer to run and complete.
                    During the installation it told me to update the database but the Web page won’t load so I skipped that step and made it through to the end without any other errors or warnings.

                    Still, the Web page won’t load so I’m thinking either I ruined Apache2 or I have to do something with mysql.

                    1 Reply Last reply Reply Quote 0
                    • C
                      carl.d @Sebastian Roth
                      last edited by

                      @sebastian-roth
                      On Debian11 after having attempted to upgrade FOG to 1.5.9.222 the http://fogserver/fog/management/index.php page wont load (500 error)

                      I’m looking at the Apache2 error.log and here’s the last line:
                      %timestamp% [proxy_fcgi:error] [pid #####] [client %LAN-IP%:%port%] AH1071: Got error ‘PHP message: PHP Fatal error: Uncaught Exception: Missing one or more extensions. in /var/www/html/fog/commons/init.php:439\nStack trace:\n#0 /var/www/html/fog/commons/init.php(306): Initiator::_extCheck()\n#1 /var/www/html/fog/commons/base.inc.php(46): Initiator::startInit()\n#2 /var/www/html/fog/management/index.php(22): require(’/var/www/html/f…‘)\n#3 {main}\n thrown in /var/www/html/fog/commons.init.php on line 439’

                      Please advise, thank you!

                      C 1 Reply Last reply Reply Quote 0
                      • C
                        carl.d @carl.d
                        last edited by

                        @carl-d @Sebastian-Roth @george1421

                        I’m sorry for being a pain in the ass and I very much appreciate your advice.

                        Reading another post, I made the info.php file and saved it as instructed. I can browse to that at http://fogserver/fog/info.php - lots of info on that page - please advise!

                        george1421G 1 Reply Last reply Reply Quote 0
                        • george1421G
                          george1421 Moderator @carl.d
                          last edited by

                          @carl-d Just to be clear you installed FOG 1.5.9.110 or later from the dev branch and not 1.5.9GA?

                          I will spin up a test debian 11 instance tonight and test to see if I get the same error during an install. Your issues are new so I’m concerned that something got missed. I’ll let you know what I find.

                          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!

                          C 1 Reply Last reply Reply Quote 0
                          • C
                            carl.d @george1421
                            last edited by

                            @george1421
                            Yes, I installed FOG 1.5.9.xxx from the dev branch - what command can I run to confirm the fogserver version?

                            I updated the password to the fogstorage user, in the /opt/fog/.fogsettings file because it didn’t match what I was given during the upgrade.

                            After doing that, I can get to the schema update page however I get the following errors when trying to update the schema:

                            Database Error:

                            Failed to query: Error: SQLSTATE[42000]: Syntax error or access violation: 1142 UPDATE command denied to user ‘fogstorage’@‘localhost’ for table ‘globalSettings’ Error Message: Error Code: “42000”, Error Message: [“42000”,1142,“UPDATE command denied to user ‘fogstorage’@‘localhost’ for table ‘globalSettings’”], Debug: SQL: [266] UPDATE globalSettings SET settingDesc='Email address(s) to send the reports to. Separate multiple emails by comma (e.g. user_a@domain.com, user_b@domain2.com). Token ${user-name} is replaced by the task creators username.'WHERE settingKey=‘FOG_EMAIL_ADDRESS’
                            Params: 0
                            Variable contains:

                            Array
                            ( [0] => UPDATE globalSettings SET settingDesc='Email address(s) to send the reports to. Separate multiple emails by comma (e.g. user_a@domain.com, user_b@domain2.com). Token ${user-name} is replaced by the task creators username.'WHERE settingKey=‘FOG_EMAIL_ADDRESS’
                            )
                            Database SQL:

                            UPDATE globalSettings SET settingDesc='Email address(s) to send the reports to. Separate multiple emails by comma (e.g. user_a@domain.com, user_b@domain2.com). Token ${user-name} is replaced by the task creators username.'WHERE settingKey=‘FOG_EMAIL_ADDRESS’

                            george1421G 1 Reply Last reply Reply Quote 0
                            • george1421G
                              george1421 Moderator @carl.d
                              last edited by

                              @carl-d said in Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10:

                              “UPDATE command denied to user ‘fogstorage’@‘localhost’ for table ‘globalSettings’”

                              This tells me the password you configured for fogstorage doesn’t match what the install created in the database.

                              Something bad happened during the install. Its going to be tough to fix but not impossible.

                              On the fog server linux console, switch to root with
                              sudo su -
                              Then we are going to follow this document https://linuxize.com/post/how-to-change-mysql-user-password/

                              Login to the mysql database as root
                              mysql -u root -p

                              then in mysql we will need to issue this command
                              ALTER USER 'fogstorage'@'localhost' IDENTIFIED BY 'NEW_USER_PASSWORD';
                              FLUSH PRIVILEGES;
                              GRANT ALL PRIVILEGES ON fog.* TO 'fogstorage'@'localhost';

                              Where NEW_USER_PASSWORD is the password you changed into the .fogsettings file.

                              That should fix the mysql access permissions.

                              …
                              For some reason fogstorage looks wrong. The next bit was I was going to check what password the fog program uses to talk to the database. Looking at /var/www/html/fog/lib/fog/config.class.php I see the fog php code uses the fogmaster user account not fogstorage. I wonder if its going to be easier to fix this by blowing away the current fog install and reinstalling things again. The install of 1.5.9.110 or later should install cleanly on debian 11. So I’m not sure which will be quicker, trying to fix a botched install or just starting over again.

                              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!

                              C 1 Reply Last reply Reply Quote 0
                              • C
                                carl.d @george1421
                                last edited by

                                @george1421
                                Ahhhh George thank you so much!!!

                                I had to create the fogstorage account within mysql and then apply the password, but after doing so I was able to update the schema and now I’m also able to login!

                                I’m going to download and upload a couple of images to test that functionality but this is further than I’ve gotten and it feels great!

                                I greatly appreciate your assistance!

                                C 1 Reply Last reply Reply Quote 0
                                • C
                                  carl.d @carl.d
                                  last edited by carl.d

                                  @george1421

                                  I’m getting ready to test download & capture (upload), though I did notice the storage usage chart in the upper right corner of the dashboard has gone missing.

                                  Also, from within the FoG configuration page the kernel update, and log viewer, sub-pages give me a 500 error. From the home section of the fog configuration page, the fog version information section reads “Failed to get version info”.

                                  These are mere annoyances that I can certainly live without as long as I’m able to image new machines and upload new images.

                                  C 1 Reply Last reply Reply Quote 0
                                  • C
                                    carl.d @carl.d
                                    last edited by

                                    @george1421

                                    I had a capture already in progress from last night that was failing (it couldn’t write back to the database that the capture task had completed, so it was stuck in a loop of uploading and then failing to update the task status then rebooting and uploading again), it succeeded!

                                    This failure was the catalyst for me trying to upgrade to Debian 11 and FoG 1.5.9. So I’m very happy with this result.

                                    I see now that when I click the blue task button to begin a download or upload task, the task gets created but I’m taken to a broken page (500 error). So I hit my back button and went back to my hosts that way.

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

                                      @carl-d said in Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10:

                                      I see now that when I click the blue task button to begin a download or upload task, the task gets created but I’m taken to a broken page (500 error).

                                      Please check the apache and PHP logs (see my signature) and post relevant information 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

                                      C 1 Reply Last reply Reply Quote 0
                                      • C
                                        carl.d @Sebastian Roth
                                        last edited by carl.d

                                        @sebastian-roth

                                        Here’s what I’m seeing in the Apache2 error.log:

                                        %Date&TimeStamp% [proxy_fcgi:error] [pid ####] [client LAN-IP:port] AH01071: Got error ‘PHP message: PHP Warning: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed ‘CURLOPT_SSL_VERIFYPEER’ (this will throw an Error in future version of PHP) in /var/www/html/fog/lib/fog/fogbase.class.php on line 481PHP message: PHP Warning: Use of undefined constant CURLOPT_SSL_VERIFYHOST -assumed ‘CURLOPT_SSL_SERIFYHOST’ (this will throw an Error in a future version of PHP) in /var/www/html/fog/lib/fog/fogbase.class.php on line 481PHP message: PHP Warning: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed ‘CURLOPT_RETURNTRANSFER’ (this will throw an Error in a future version of PHP) in /var/www//html/fog/lib/fog/fogbase.class.php on line 481PHP message: PHP Warning: Use of undefined constant ‘CURLOPT_CONNECTTIMEOUT - assumed ‘CURLOPT_CONNECTTIMEOUT’ (this will throw an Error in a future version of PHP) in /var/www/html/fog/lib/fog/fogurlrequests.class.php on line 146PHP message: PHP Warning: Use of undefined constant CURLOPT_TIMEOUT -assumed ‘CURLOPT_TIMEOUT’ (this will throw an Error in a future version of PHP) in /var/www//html/fog/lib/fog/fogurlrequests.class.php on line 147PHP message: PHP Warning: Use of undefined constant CURLOPT_SSL_VERIFYPEER’ (this will throw an Error in future version of PHP) /var/www//html/fog/lib/fog/fogbase.class.php on line 158PHP message: PHP Warning CURLOPT_SSL_VERIFYHOST -assumed ‘CURLOPT_SSL_SERIFYHOST’ (this will throw an Error in a future version of PHP) in /var/www//html/fog/lib/fog/fogurlrequests.class.php on line 159PHP message: PHP Warning: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed ‘CURLOPT_RETURNTRANSFER’ (this will throw an Error in a future version of PHP) in /var/www//html/fog/lib/fog/fogurlrequests.class.php on line 160’

                                        Checking PHP 7.4 logs, not much there but here are the last two lines;
                                        %Date&TimeStamp% NOTICE: [pool www] child 22019 exited with code 0 after 1476.###### seconds >
                                        %Date&TimeStamp% NOTICE: [pool www] child 24654 started

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

                                          @carl-d said in Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10:

                                          Use of undefined constant CURLOPT_SSL_VERIFYPEER

                                          Please make sure the package php-curl is being installed: dpkg | grep curl and if you don’t see the package to be installed then apt install php-curl (restart your FOG server after that).

                                          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

                                          C 1 Reply Last reply Reply Quote 0
                                          • C
                                            carl.d @Sebastian Roth
                                            last edited by

                                            @sebastian-roth

                                            I did have to install php-curl, and now everything is working properly. Thank you very, very much sebastian-roth! I greatly appreciate your help!

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

                                            197

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project