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

    Storage ID 0 is not valid / A valid database connection could not be made

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    27
    10.0k
    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.
    • E
      entr0py @Tom Elliott
      last edited by

      @Tom-Elliott

      This problem seems to exist in RC20 as well. I just did an upgrade of our fog system to RC20 from a much older SVN (RC8 I think?) and have the exact same error. I’ve dropped users, recreated them, I can mount nfs, ftp, ssh and mysql between node and the full Fog server with the passwords and users as specified in the configs with no issues but the existing storage nodes are dead. Trying to add another storage node results in the Storage ID 0 is not valid error as described.

      No firewalls, nothing new. Did a straight svn up from the fogproject folder and an installfog.sh as usual. No hardware or software changes on either machine and this is (was) a running production system a few hours ago that had been deploying and capturing from the nodes just fine. I’ve done basically everything possible to make this as insecure as possible, granting all with %'s and everything to no avail.

      0_1478464694876_Fog Issues.png

      SERVER

      FOG Version: 1.3.0 RC20
      OS: Ubuntu 12.04
      IP: 172.16.0.13

      I’ve done the following on the server:

      mysql> SET PASSWORD FOR ‘fogstorage’@‘%’ = PASSWORD(‘password’);
      Query OK, 0 rows affected (0.00 sec)

      mysql> GRANT ALL PRIVILEGES ON fog.* TO ‘fogstorage’@‘%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
      Query OK, 0 rows affected (0.00 sec)

      mysql> SET PASSWORD FOR ‘fog’@‘%’ = PASSWORD(‘password’);
      Query OK, 0 rows affected (0.00 sec)

      mysql> GRANT ALL PRIVILEGES ON fog.* TO ‘fog’@‘%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
      Query OK, 0 rows affected (0.00 sec)

      NODE0

      FOG Version: 1.3.0 RC20
      OS: Ubuntu 12.04
      IP: 172.16.0.16

      Results on the Node:

      root@node0-MicroServer-Gen8:/images# mysql -u fogstorage -h 172.16.0.13 -ppassword -D fog
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A

      Welcome to the MySQL monitor. Commands end with ; or \g.
      Your MySQL connection id is 1617
      Server version: 5.5.53-0ubuntu0.12.04.1 (Ubuntu)

      root@node0-MicroServer-Gen8:/images# lsb_release -a
      No LSB modules are available.
      Distributor ID: Ubuntu
      Description: Ubuntu 12.04.5 LTS
      Release: 12.04
      Codename: precise

      0_1478464835324_Storage Management Page.png

      Wayne WorkmanW 1 Reply Last reply Reply Quote 0
      • Wayne WorkmanW
        Wayne Workman @entr0py
        last edited by

        @entr0py can we begin with your apache error log please?

        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!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

        E 1 Reply Last reply Reply Quote 0
        • E
          entr0py @Wayne Workman
          last edited by entr0py

          @Wayne-Workman

          0_1478476447405_error.log.txt

          Attached.

          Nothing in the last 3ish hours…

          root@FOG-Virtual-Machine:/var/log/apache2# date
          Sun Nov 6 16:55:33 MST 2016

          1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott
            last edited by

            I don’t know what is wrong, but if I had to guess, looking earlier down the road.

            You set the fog user for DB connections.

            The fog user may be created, but probably doesn’t have permissions to communicate with the FOG database. I think you intended to use fogstorage for db connections?

            I’m not sure why you had shown us the values in the storage node. If I had to guess, you changed “management user/password” to match what you set for the fog database connection? If that is the case, this means your FTP information is likely broken at this point. To fix this, (after fixing the fogstorage user/password to the db) edit the /opt/fog/.fogsettings file and ensure the username and password is correct for the “local” linux user. Ensure the snmysqluser portion is set to snmysqluser='fogstorage'. Ensure the snmysqlpass portion is set to the password as set in FOG Configuration Page->FOG Settings->FOG Storage Nodes->FOG_STORAGENODE_MYSQLPASS

            Please see if making this fixes will work.

            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

            E 1 Reply Last reply Reply Quote 0
            • E
              entr0py @Tom Elliott
              last edited by

              @Tom-Elliott

              Sorry for it being so confusing what I posted. I was just playing around with a ton of options trying to find something that might work before I started to complain at the overworked and underpaid developers. 😉 My snmysqluser=‘fogstorage’ on the node already. Passwords all match. I can ftp between the boxes using the management user of “fog” and password of “password” and mysql works with “fogstorage” and “password” as well. The user works as shown below:

              root@node0-MicroServer-Gen8:/opt/fog# mysql -h 172.16.0.13 -u fogstorage -ppassword -A fog
              Welcome to the MySQL monitor. Commands end with ; or \g.
              Your MySQL connection id is 2984
              Server version: 5.5.53-0ubuntu0.12.04.1 (Ubuntu)

              Copyright © 2000, 2016, Oracle and/or its affiliates. All rights reserved.

              Oracle is a registered trademark of Oracle Corporation and/or its
              affiliates. Other names may be trademarks of their respective
              owners.

              Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

              mysql> SELECT * FROM hostMAC WHERE hmHostID=0;
              Empty set (0.00 sec)

              It also matches the web interface settings.

              0_1478478256370_web.png

              Attached are both .fogsettings files.

              0_1478478272991_dotfogsettings-host.txt
              0_1478478279431_dotfogsettings-node.txt

              Tom ElliottT 1 Reply Last reply Reply Quote 0
              • E
                entr0py
                last edited by

                Also, either user should work given the grants in MySQL.

                mysql> show grants for fog;
                ±---------------------------------------------------------------------------------------------------+
                | Grants for fog@% |
                ±---------------------------------------------------------------------------------------------------+
                | GRANT USAGE ON . TO ‘fog’@‘%’ IDENTIFIED BY PASSWORD ‘2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19’ |
                | GRANT ALL PRIVILEGES ON fog.
                TO ‘fog’@’%’ WITH GRANT OPTION |
                ±---------------------------------------------------------------------------------------------------+
                2 rows in set (0.00 sec)

                mysql> show grants for fogstorage;
                ±----------------------------------------------------------------------------------------------------------+
                | Grants for fogstorage@% |
                ±----------------------------------------------------------------------------------------------------------+
                | GRANT USAGE ON . TO ‘fogstorage’@‘%’ IDENTIFIED BY PASSWORD ‘2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19’ |
                | GRANT ALL PRIVILEGES ON fog.
                TO ‘fogstorage’@’%’ WITH GRANT OPTION |
                ±----------------------------------------------------------------------------------------------------------+
                2 rows in set (0.00 sec)

                mysql>

                1 Reply Last reply Reply Quote 0
                • Tom ElliottT
                  Tom Elliott @entr0py
                  last edited by

                  @entr0py I confirmed the storage id 0 is not valid issue. Mind you, this was literally just a message. The node was indeed created and functional even though this message was there.

                  When you create a new node, the page redirects to the “edit” page. This edit page needs to have the id passed into it. I missed passing it the “edit” portion and had the id being incorrectly set.

                  While this was a very minor bug, I have republished as RC-20. Sorry for not noticing it sooner.

                  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

                  E 1 Reply Last reply Reply Quote 0
                  • E
                    entr0py @Tom Elliott
                    last edited by

                    @Tom-Elliott

                    Any thoughts on why the storage node still doesn’t work? If I try to create a task it says the node doesn’t exist. If I try to create a task I get the following:

                    0_1478480560515_failed.png

                    If I try to show the node on the dashboard it isn’t even listed:

                    0_1478480581836_node list.png

                    If I try to image a computer using “Deploy Image” on GRUB menu:

                    0_1478480682552_20161106_190157.jpg

                    1 Reply Last reply Reply Quote 0
                    • Tom ElliottT
                      Tom Elliott
                      last edited by Tom Elliott

                      It’s seems it’s connecting to the db now, but we can’t seem to connect to the other nodes.

                      This might be due to two things.

                      I modified a function to help ensure the nodes are available before getting data. The () on the nodes tells me the main server is unable to request the other nodes’ urls. This might simply be because the isAvailable is using a connection timeout of 500 ms. Maybe this is just too short to see those servers? It worked fine in my testing, but my nodes are admittedly within the same network I am. To test this theory, please open up the file:

                      /var/www/fog/lib/fog/fogurlrequests.class.php.

                      At lines: 271 and 327.

                      Please make them read as:
                      $options[CURLOPT_CONNECTTIMEOUT_MS] = 2000;

                      I think maybe then you’ll start seeing data filling in these areas?

                      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

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

                        and I think that will fix for the unable to create the task issue for you too. (The changing the timeout to 2000 miliseconds).

                        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

                        E 2 Replies Last reply Reply Quote 0
                        • E
                          entr0py
                          last edited by entr0py

                          That might be the problem considering I don’t even have that file…

                          root@FOG-Virtual-Machine:/var/www/fog/lib/fog# ls -lsa quests
                          ls: cannot access quests: No such file or directory

                          Those are supposed to be asterisks for anything quests anything. I only have one file in the whole lib/fog directory with a newer date than August 13 2014…

                          1 Reply Last reply Reply Quote 0
                          • E
                            entr0py @Tom Elliott
                            last edited by

                            @Tom-Elliott

                            Nevermind… how about /var/www/html/fog/lib/fog

                            My bad.

                            Tom ElliottT 1 Reply Last reply Reply Quote 0
                            • E
                              entr0py @Tom Elliott
                              last edited by

                              @Tom-Elliott

                              Upgraded to 6007 on both host and node, made the change you suggested and still nothing. Same routine.

                              I created another node with all the same settings, placed it in the same storage group, disabled the old node and enabled the new one and still nothing. If I select that storage group on the dashboard it shows 0/0/0 with and the node doesn’t show in the list either.

                              1 Reply Last reply Reply Quote 0
                              • Tom ElliottT
                                Tom Elliott @entr0py
                                last edited by

                                @entr0py your issue brought another partial issue for what I would call doubles. At one point the server only used /var/www/fog for ubuntu (this is usually set as a link now).

                                Please try running:
                                rm -rf /var/www/fog; ln -s /var/www/{html/,}fog

                                This should allow the server to see the files regardless of how you’re accessing the data (why you didn’t see fogurlrequests).

                                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

                                1 Reply Last reply Reply Quote 0
                                • Tom ElliottT
                                  Tom Elliott
                                  last edited by

                                  Remoted in and found that the server was in fairly funky state.

                                  It is ubuntu 12.04, and while we typically recommend to update, this particular issue was simply due to ondrej attempting to install php 7, but the packages variable on fogsettings was pre-labelled as php 5. Removed the packages variable and php/apache on the node, updated the php version stored in the fogsettings, reinstalled ondrej, and re-ran installer .

                                  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

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

                                  205

                                  Online

                                  12.0k

                                  Users

                                  17.3k

                                  Topics

                                  155.2k

                                  Posts
                                  Copyright © 2012-2024 FOG Project