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

Can't get FOG to replicate to storage node

Scheduled Pinned Locked Moved
FOG Problems
4
26
11.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.
  • T
    Tom Elliott
    last edited by Feb 10, 2014, 4:18 PM

    So i’d recommend changing the FOG user to root and use the mysql root password if you have one set.

    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
    • S
      seq-nate
      last edited by Feb 10, 2014, 4:40 PM

      Changed to use root and still have same results.

      1 Reply Last reply Reply Quote 0
      • S
        seq-nate
        last edited by Feb 18, 2014, 11:27 PM

        I don’t know if it makes a difference but my storage node is located at a different site connected back to my main site where my main FOG server is located.

        1 Reply Last reply Reply Quote 0
        • L
          Lee Rowlett Developer
          last edited by Feb 19, 2014, 12:35 AM

          [FONT=arial][SIZE=3]a way to try and troubleshoot (Everything in red in the commands you need to change before running command.)[/SIZE][/FONT]

          [FONT=arial][SIZE=3]first off - run the below command on your [U][B]main server[/B][/U]:[/SIZE][/FONT]
          [FONT=arial][SIZE=3]mysql -u fog fog -p[COLOR=#ff0000]PASSWORD_GIVEN_AFTER_INSTALLING_FOG_ON_THE_NODE[/COLOR] -h[COLOR=#ff0000]IP_OF_NODE[/COLOR][/SIZE][/FONT]

          [FONT=arial][SIZE=3]this command above will just confirm your main server can connect to mysql database on your node.[/SIZE][/FONT]

          [FONT=arial][SIZE=3]then run on your [U][B]node[/B][/U]:[/SIZE][/FONT]
          [FONT=arial][SIZE=3]mysql -u fogstorage fog -p[COLOR=#ff0000]whatever is set in fog settings under FOG_STORAGENODE_MYSQLPASS[/COLOR] -h[COLOR=#ff0000]IP_OF_MAIN_SERVER[/COLOR][/SIZE][/FONT]

          [FONT=arial][SIZE=3]from what you are saying the above command, you should get “Access Denied”[/SIZE][/FONT]

          [FONT=arial][SIZE=3]then run on your [U][B]main server[/B][/U]:[/SIZE][/FONT]
          [FONT=arial][SIZE=3]mysql -u fogstoage fog -p[/SIZE][/FONT][SIZE=3][FONT=arial][COLOR=#ff0000]whatever is set in fog settings under FOG_STORAGENODE_MYSQLPASS[/COLOR][/FONT][/SIZE]

          [FONT=arial][SIZE=3][COLOR=#000000]the above command is connecting locally using fogstorage mysql user account (the one your nodes trying to use)[/COLOR][/SIZE][/FONT]
          [FONT=arial][SIZE=3][COLOR=#000000]if it does connect - you have an issue with connecting remotely to your mysql database on your main server, if it doesn’t connect then it’s more likely an mysql user issue.[/COLOR][/SIZE][/FONT]

          [FONT=arial][SIZE=3][COLOR=#000000]and if so you could reset the password for the fogstorage account on mainserver.[/COLOR][/SIZE][/FONT]

          [FONT=arial][SIZE=3][COLOR=#000000]on [U][B]main server[/B][/U] do this:[/COLOR][/SIZE][/FONT]
          [FONT=arial][SIZE=3]mysql -u root fog (if you set a pw when installing mysql specifiy it with -p[COLOR=#ff0000]THE_PASSWORD[/COLOR])[/SIZE][/FONT]
          [FONT=arial][SIZE=3]then run:[/SIZE][/FONT]
          [FONT=arial][SIZE=3]SET PASSWORD FOR ‘fogstorage’ = PASSWORD(‘[COLOR=#ff0000]whatever is set in fog settings under FOG_STORAGENODE_MYSQLPASS[/COLOR]’);[/SIZE][/FONT]

          [FONT=arial][SIZE=3]then try the command above that you run before on your node.[/SIZE][/FONT]

          [FONT=arial][SIZE=3]hope this helps/makes sense[/SIZE][/FONT]

          1 Reply Last reply Reply Quote 0
          • S
            seq-nate
            last edited by Feb 19, 2014, 2:57 PM

            I can’t get past step one

            I entered:

            mysql -u fog fog -p <password from storage node> -h <IP of storage node>

            and it didn’t go through

            I then entered:

            mysql -u fog fog -p --host=<IP of storage node>
            Enter password: (entered <password from storage node> )
            ERROR 2003 (HY000): Can’t connect to MySQL server on ‘<IP of storage node>’ (111)

            1 Reply Last reply Reply Quote 0
            • L
              Lee Rowlett Developer
              last edited by Feb 19, 2014, 3:42 PM

              Ok well lets get the node connecting to the main server so do the local command to on main server to reset/set password:

              Btw ur commands looking similar to this?
              I.e. mysql -u fogstorage fog -pfs9345 -h192.168.169.212

              You may need to reset the node user account aswell so connecting local to node mysql database.

              1 Reply Last reply Reply Quote 0
              • S
                seq-nate
                last edited by Feb 19, 2014, 3:58 PM

                So, I need to change the fog and mysql user’s password to match what? If I am changing the mysql fog user on the master node that would not allow me to connect to my web ui.

                1 Reply Last reply Reply Quote 0
                • S
                  seq-nate
                  last edited by Feb 19, 2014, 4:00 PM

                  mysql -u fogstorage fog -pfs123456 -h10.24.1.2
                  ERROR 2003 (HY000): Can’t connect to MySQL server on ‘10.24.1.2’ (111)

                  1 Reply Last reply Reply Quote 0
                  • L
                    Lee Rowlett Developer
                    last edited by Feb 19, 2014, 4:55 PM

                    no sorry, you need to reset the fogstorage user on the main server (once you’re connected locally to mysql)

                    [SIZE=3][FONT=arial]SET PASSWORD FOR ‘fogstorage’ = PASSWORD(‘fs123456’)[/FONT][/SIZE][SIZE=3][FONT=arial]; and do the same on your node (only diff will be the password will be the one under storage management for your node)[/FONT][/SIZE]

                    just so you can rule out an account issue

                    1 Reply Last reply Reply Quote 0
                    • L
                      Lee Rowlett Developer
                      last edited by Feb 19, 2014, 4:58 PM

                      the error you’ve posted is connection issue, try this (on 10.24.1.2):

                      [LIST=1]
                      []nano /etc/mysql/my.cnf
                      [
                      ]comment the quoted content “bind-address = 127.0.0.1” use # symbol
                      [*]restart server or mysql service
                      [/LIST]

                      1 Reply Last reply Reply Quote 0
                      • S
                        seq-nate
                        last edited by Feb 21, 2014, 11:35 PM

                        Sorry for the delay in posting. Since my last post, I did something to my database and locked myself completely out. I purged everything and reloaded. My main fog server is running great (actually better, I had another unrelated issue that is now gone) and I just installed the storage node and followed step by step instructions on the web and got nothing. I retried the instructions to try to connect to the storage node through the main server

                        [CODE]first off - run the below command on your main server:
                        mysql -u fog fog -pPASSWORD_GIVEN_AFTER_INSTALLING_FOG_ON_THE_NODE -hIP_OF_NODE[/CODE]

                        and once again got

                        [CODE]ERROR 2003 (HY000): Can’t connect to MySQL server on ‘10.24.1.2’ (111)
                        [/CODE]

                        I commented out the bind-address line on my node and restarted with no change.

                        1 Reply Last reply Reply Quote 0
                        • Jaymes DriverJ
                          Jaymes Driver Developer
                          last edited by Feb 24, 2014, 3:09 PM

                          I have found that the 13.10 Ubuntu revision has issues when installing fog.

                          I had to manually restart the Mysql and apache2 services after a complete install (the install reported no errors, however when trying to access the Web GUI or the database I received error messages).

                          After manually enabling the service I was able to use the server.

                          I Would still spend some time trying to troubleshoot the issue incase you can get it working, or incase the issue actually lies else where, Lee’s troubleshooting steps are recommended.

                          In the even that you are unsuccessful, if you’re not opposed, a complete wipe and re-install would not be a bad idea. After completing the ./installfog.sh type
                          [code]
                          sudo service mysql restart
                          sudo service apache2 restart
                          [/code]

                          WARNING TO USERS: My comments are written completely devoid of emotion, do not mistake my concise to the point manner as a personal insult or attack.

                          1 Reply Last reply Reply Quote 0
                          • S
                            seq-nate
                            last edited by Feb 24, 2014, 9:42 PM

                            Jaymes, I have completely reinstalled both my main FOG and the storage node and started from scratch. This did resolve a different issue with searching for hosts but did not resolve the issue of communication between my main and node.

                            1 Reply Last reply Reply Quote 0
                            • T
                              Tom Elliott
                              last edited by Feb 24, 2014, 10:58 PM

                              The communication issue, I think, is because of two possible (maybe even both) scenarios.

                              First things first, I’m assuming you’ve removed the bind-address = 127.0.0.1 from the my.cnf files on both storage-node and server as Lee stated above?

                              Second, did you create the fogstorage user on both the server and the node with the same username and password?

                              Are both system without firewall?

                              Next,

                              When you created the FOGUser, did you just create them as ‘fogstorage’@‘localhost’?

                              For now I would attempt using the root user and password for both as you can troubleshoot the fogstorage user later on. We want to see both the node connect to the server AND the server connect to the node. This way you know communication happens between both.

                              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
                              • S
                                seq-nate
                                last edited by Feb 27, 2014, 7:37 PM

                                I removed the bind address on both server and node, and both systems do not have a firewall. I checked mysql on the server and made sure the password was set. On node, mysql-server is not installed so there is no user to create or check.

                                I have set the node to try using root user, which I can log into the server from node with, and restarted FOGImageReplicator and Im still getting.

                                [CODE][02-27-14 7:32:54 pm] * Starting FOG Image Replicator Service
                                [02-27-14 7:32:59 pm] * [02-27-14 7:32:59 pm] Checking for new tasks every 600 seconds.
                                [02-27-14 7:32:59 pm] * [02-27-14 7:32:59 pm] Starting service loop.
                                [02-27-14 7:32:59 pm] [02-27-14 7:32:59 pm] Failed to connect to database server, will try again in next iteration.[/CODE]

                                1 Reply Last reply Reply Quote 0
                                • S
                                  seq-nate
                                  last edited by Feb 27, 2014, 9:41 PM

                                  Looking back over the posts still trying to understand what is needed. I looked at Lee’s post, troubleshooting connections between the two machines and realized something, there is no Mysql database on the node mysql-server does not install when installing a node.

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    seq-nate
                                    last edited by Feb 28, 2014, 5:15 PM

                                    After an experience I had yesterday, I don’t think a storage node is what I am wanting to use. I was pushing out an image to a machine and noticed that it was connecting to my storage node to try to pull the image (it errored out because the image still has not replicated.)

                                    The problem I have with this is that my intent was to have a master node at my main school and a storage node at various campuses but what I found yesterday was that if I am imaging a machine at campus A it may pull an image from Campus B which would take up precious bandwidth.

                                    Someone correct me if I am wrong but what I believe the storage nodes are most useful for is multi-casting and in my particular set-up it would be better to have individual master nodes at each campus and copy any new images manually to each campus.

                                    1 Reply Last reply Reply Quote 0
                                    • L
                                      Lee Rowlett Developer
                                      last edited by Feb 28, 2014, 5:52 PM

                                      Thats exactly why i devloped the location patch and Tom has now recoded it as a plugin. You set the location as Campus A for the host and it will only pull the image from that node that uve assigned to location campus A and if u dnt slecify a node u can set it to a storage group also.

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        seq-nate
                                        last edited by Feb 28, 2014, 7:40 PM

                                        Good to know. I did some searching around and it looks like the patch is available for .31 and will be in .33 but currently not in .32. Is that right?

                                        1 Reply Last reply Reply Quote 0
                                        • L
                                          Lee Rowlett Developer
                                          last edited by Feb 28, 2014, 7:43 PM

                                          Yes i never released the re-coded version for 0.32 and it already is available in 0.33b 🙂

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

                                          154

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project