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

    Failed to connect to database server, will try again in next iteration.

    Scheduled Pinned Locked Moved
    FOG Problems
    6
    48
    43.5k
    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.
    • D
      darthanubis
      last edited by

      [quote=“chad-bisd, post: 5310, member: 18”]ok. query the users table in the fog database in mysql and post the contents.
      [CODE]
      mysql -u root -ppassword fog
      mysql>select uName from users;
      [/CODE]

      That should list all logins available to the web interfaces.[/quote]

      [CODE]mysql> mysql>select uName from users;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘mysql>select uName from users’ at line 1[/CODE]

      1 Reply Last reply Reply Quote 0
      • C
        chad-bisd Moderator
        last edited by

        when you see it, you’ll be like WHOA!


        If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

        1 Reply Last reply Reply Quote 0
        • D
          darthanubis
          last edited by

          See it??

          1 Reply Last reply Reply Quote 0
          • C
            chad-bisd Moderator
            last edited by

            [CODE]mysql> mysql>[/CODE]

            I posted the command with the prompt in it so you’d know you need to run the script at the mysql> prompt.

            Remove “mysql>” from the query. Technically, I should have said. At the mysql> prompt, type “select uName from users;”


            If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

            1 Reply Last reply Reply Quote 0
            • D
              darthanubis
              last edited by

              [quote=“chad-bisd, post: 5330, member: 18”][CODE]mysql> mysql>[/CODE]

              I posted the command with the prompt in it so you’d know you need to run the script at the mysql> prompt.

              Remove “mysql>” from the query. Technically, I should have said. At the mysql> prompt, type “select uName from users;”[/quote]

              Jesus. :oops:

              [CODE]mysql> select uName from users;
              ±------+
              | uName |
              ±------+
              | root |
              ±------+
              1 row in set (0.00 sec)[/CODE]

              1 Reply Last reply Reply Quote 0
              • C
                chad-bisd Moderator
                last edited by

                ok. you show to only have user that can login to the fog web interface. The username is root.

                run this, as it will only update the root user that you use to login to the web interface and nothing else. You can change this after you get back into fog web ui if you want.

                run these commands from the “mysql>” prompt 😉 after connecting as root.
                [CODE]
                use fog;
                UPDATE users SET uPass = MD5(‘password’) where uName = ‘root’ limit 1;
                [/CODE]
                If you don’t get any errors then this should reset the password to “password” and let you login to the FOG web user interface with username “root” and password “password”.

                This DOES NOT change the root password for any other part of FOG or the operating system. This doesn’t even change the mysql root password, ONLY the username and password you put into the login box on the FOG server webpage.


                If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                1 Reply Last reply Reply Quote 0
                • D
                  darthanubis
                  last edited by

                  [quote=“chad-bisd, post: 5333, member: 18”]ok. you show to only have user that can login to the fog web interface. The username is root.

                  run this, as it will only update the root user that you use to login to the web interface and nothing else. You can change this after you get back into fog web ui if you want.

                  run these commands from the “mysql>” prompt 😉 after connecting as root.
                  [CODE]
                  use fog;
                  UPDATE users SET uPass = MD5(‘password’) where uName = ‘root’ limit 1;
                  [/CODE]
                  If you don’t get any errors then this should reset the password to “password” and let you login to the FOG web user interface with username “root” and password “password”.

                  This DOES NOT change the root password for any other part of FOG or the operating system. This doesn’t even change the mysql root password, ONLY the username and password you put into the login box on the FOG server webpage.[/quote]

                  😄 I’m IN! That fixed it! Thank you so much Chad. I really appreciate you having patience with me.

                  Now I will start another thread about why I can’t upload a Windows 7 image without getting that darn multi partition error from the pxe boot screen.😕

                  1 Reply Last reply Reply Quote 0
                  • D
                    darthanubis
                    last edited by

                    In my excitement to get back into the UI, I forgot that the original problem is still present. Still getting the error in the replicator log.

                    1 Reply Last reply Reply Quote 0
                    • C
                      chad-bisd Moderator
                      last edited by

                      edit /opt/fog/service/etc/config.php

                      update lines:
                      [CODE]
                      define( “MYSQL_USERNAME”, “root” );
                      define( “MYSQL_PASSWORD”, “” );
                      [/CODE]

                      to be:
                      [CODE]
                      define( “MYSQL_USERNAME”, “root” );
                      define( “MYSQL_PASSWORD”, “[whatever password you use at mysql -u root -p]” );
                      [/CODE]

                      then:
                      [CODE]
                      /etc/init.d/FOGImageReplicator restart
                      [/CODE]


                      If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                      1 Reply Last reply Reply Quote 0
                      • D
                        darthanubis
                        last edited by

                        [CODE] tail -10 /opt/fog/log/fogreplicator.log
                        [08-02-12 4:35:11 pm] [08-02-12 4:35:11 pm] Failed to connect to database server, will try again in next iteration.
                        [08-02-12 4:35:26 pm] * Starting FOG Image Replicator Service
                        [08-02-12 4:35:31 pm] * [08-02-12 4:35:31 pm] Checking for new tasks every 600 seconds.
                        [08-02-12 4:35:31 pm] * [08-02-12 4:35:31 pm] Starting service loop.
                        [08-02-12 4:35:31 pm] [08-02-12 4:35:31 pm] Failed to connect to database server, will try again in next iteration.
                        [08-02-12 4:37:57 pm] * Starting FOG Image Replicator Service
                        [08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Checking for new tasks every 600 seconds.
                        [08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Starting service loop.
                        [08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Checking if I am the group manager.
                        [08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] I don’t appear to be the group manager, I will check back later.[/CODE]

                        It worked!

                        Just the contents of these files which contain usernames and passwords are starting to all look alike.

                        1 Reply Last reply Reply Quote 0
                        • C
                          chad-bisd Moderator
                          last edited by

                          Yes. I have been updating the wiki a lot trying to clarify the user guide and troubleshooting articles. One of those changes in moving the non-empty mysql root password instructions into a template file and transcluding that into all the installation and troubleshooting articles.

                          And on top of all that, storage nodes use a different setting in the /opt/fog/service/etc/config.php file…


                          If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                          1 Reply Last reply Reply Quote 0
                          • D
                            darthanubis
                            last edited by

                            [quote=“darthanubis, post: 5407, member: 1659”][CODE] tail -10 /opt/fog/log/fogreplicator.log
                            [08-02-12 4:35:11 pm] [08-02-12 4:35:11 pm] Failed to connect to database server, will try again in next iteration.
                            [08-02-12 4:35:26 pm] * Starting FOG Image Replicator Service
                            [08-02-12 4:35:31 pm] * [08-02-12 4:35:31 pm] Checking for new tasks every 600 seconds.
                            [08-02-12 4:35:31 pm] * [08-02-12 4:35:31 pm] Starting service loop.
                            [08-02-12 4:35:31 pm] [08-02-12 4:35:31 pm] Failed to connect to database server, will try again in next iteration.
                            [08-02-12 4:37:57 pm] * Starting FOG Image Replicator Service
                            [08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Checking for new tasks every 600 seconds.
                            [08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Starting service loop.
                            [08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Checking if I am the group manager.
                            [08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] I don’t appear to be the group manager, I will check back later.[/CODE]

                            It worked!

                            Just the contents of these files which contain usernames and passwords are starting to all look alike.[/quote]

                            Am I to be worried about these group manager notices/errors?

                            1 Reply Last reply Reply Quote 0
                            • C
                              chad-bisd Moderator
                              last edited by

                              no. only matters when you add storage nodes.


                              If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                              1 Reply Last reply Reply Quote 0
                              • D
                                darthanubis
                                last edited by

                                [quote=“chad-bisd, post: 5413, member: 18”]no. only matters when you add storage nodes.[/quote]
                                I’ve already added one storage node already.

                                1 Reply Last reply Reply Quote 0
                                • C
                                  chad-bisd Moderator
                                  last edited by

                                  If you have a storage node in the same storage group, AND you have it configured properly, then the FOGImageReplicator service on the main server will push the image files to the storage nodes via ftp.

                                  there is a great storage nodes document on the wiki.


                                  If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    darthanubis
                                    last edited by

                                    [quote=“chad-bisd, post: 5415, member: 18”]If you have a storage node in the same storage group, AND you have it configured properly, then the FOGImageReplicator service on the main server will push the image files to the storage nodes via ftp.

                                    there is a great storage nodes document on the wiki.[/quote]

                                    So,I don’t have to make the added storage node master for the main server to make the push? Because that is what I did, since the added storage node has more disk space.

                                    1 Reply Last reply Reply Quote 0
                                    • C
                                      chad-bisd Moderator
                                      last edited by

                                      If you make the other storage node master, it replicates the contents of its /images to all other storage nodes in the group, including the main FOG server. This is dangerous because if you do it wrong, you will overwrite all your images with nothing, basically wiping out the images.

                                      If you add another storage node, wait for the images to replicate to it, then change it to master. You will probably need to adjust the my.cnf file on the main FOG server to allow connections from remote hosts, and you have to provide the storage node with the proper password for connecting back to the MySQL database on the main FOG server.

                                      On the storage nodes, edit the /opt/fog/service/etc/config.php file. The username is almost always “fogstorage” and the password is almost always “fs####” where #### is some random number. The password is available in the FOG WebUI under Other Information, FOG Settings, FOG Storage Nodes.


                                      If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        darthanubis
                                        last edited by

                                        [quote=“chad-bisd, post: 5420, member: 18”]If you make the other storage node master, it replicates the contents of its /images to all other storage nodes in the group, including the main FOG server. This is dangerous because if you do it wrong, you will overwrite all your images with nothing, basically wiping out the images.

                                        If you add another storage node, wait for the images to replicate to it, then change it to master. You will probably need to adjust the my.cnf file on the main FOG server to allow connections from remote hosts, and you have to provide the storage node with the proper password for connecting back to the MySQL database on the main FOG server.

                                        On the storage nodes, edit the /opt/fog/service/etc/config.php file. The username is almost always “fogstorage” and the password is almost always “fs####” where #### is some random number. The password is available in the FOG WebUI under Other Information, FOG Settings, FOG Storage Nodes.[/quote]

                                        Yeah, I got all of that from the wiki. I don’t remember the my.cnf editing though.

                                        1 Reply Last reply Reply Quote 0
                                        • C
                                          chad-bisd Moderator
                                          last edited by

                                          On some distributions, mysql will not allow connections from anything but localhost/127.0.0.1 because the Binding Address is set to 127.0.0.1 or localhost.

                                          There was a note about it under the installation section of the FOG User Guide, but I am in the process of moving it to a template file to transclude into the relevant articles. Look at the ubuntu 10.04 install article, near the bottom. gives instructions on mysql configuration.

                                          [url]http://www.fogproject.org/wiki/index.php/Ubuntu_10.04#MySQL_configuration[/url]


                                          If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                                          1 Reply Last reply Reply Quote 0
                                          • Boyan BiandovB
                                            Boyan Biandov
                                            last edited by

                                            The issue that fixed is stupid. In file:

                                            /opt/fog/service/etc/config.php make sure you specify under

                                            [CODE]define( “MYSQL_HOST”, “localhost” );
                                            [/CODE]
                                            NOT an IP address but rather localhost. If you specify IP even if it is the correct IP address the replication service will fail to connect to DB… Go figure

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

                                            182

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project