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

    Storage Node: Database Connection Unavailable

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    6
    15
    2.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.
    • A
      atessin @Wayne Workman
      last edited by

      @Wayne-Workman I wasn’t aware that there is not an interface for the storage node, but that does make sense.

      I have not yet tried imaging to see if it’s working yet, but I can test that today.

      I did try the getversion.php for the storage node and it returns “A valid database connection could not be made"1.5.5”. That is the same data that is displayed for the storage node under Fog Configuration > Kernel Versions on the primary server.

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

        @atessin said in Storage Node: Database Connection Unavailable:

        I can manually connect to the database from the storage node using the mysql cli and the credentials found in the config.class.php file

        Sorry to say this but if you can connect from storage node to the master node using the mysql cli and settings from config.class.php then the storage node should also be able to connect through PHP. Have you used the fogstorage user for testing? Double check the information in the config again.

        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

        A 1 Reply Last reply Reply Quote 1
        • A
          atessin @Sebastian Roth
          last edited by

          @Sebastian-Roth Yes, I have used the fogstorage mysql user for all testing. I’ve checked those configs several times. Below are screenshots showing the configs and results:

          Storage Node config.class.php:
          0_1543511802071_config_class.png

          Storage Node CLI mysql connect:
          0_1543511821222_mysql_connect.png

          Primary FOG (FOG Configuration > Kernel Versions):
          0_1543511867172_error.png

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

            @atessin Ok you are right here! Can we do a remote session to try and find out what’s wrong. I’d suggest using tcpdump to see what exactly is going on but it’s not easy to explain all that here in the forums. See the chat bubble…

            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
              Sebastian Roth Moderator
              last edited by

              Turns out SELinux was enabled on the storage node and therefore it didn’t want to do the connection. This reminds me that we should add more detailed error output on DB errors. Would have been easy if it would just display the SQLSTATE[HY000] [2002] Permission denied it was running into.

              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

              george1421G 1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @Sebastian Roth
                last edited by george1421

                @Sebastian-Roth As part of the installer execution path, shouldn’t we check to see if selinux is currently enabled on the FOG server?

                I’m not a bash programmer but this seems to give me the answer if selinux is enabled or not under Centos 7.5 .

                sestatus|grep -e "SELinux status"| awk '{print $3}'
                

                At least if the installer can trap the incorrect setting, alert the installer and then abort the install until its fixed that would eliminate the follow on problems.

                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!

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

                  @george1421 IMHO, if SELinux is set to enforcing, I think the installer should set it to permissive mode and just inform the user of this. When somebody comes up with a working SELinux policy, then that can change.

                  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/

                  1 Reply Last reply Reply Quote 1
                  • J
                    Jeffrey Boulais
                    last edited by

                    I’m having the same issue as is show in atessin’s screenshot of the “FOG Configuration” screen, but SELinux doesn’t appear to be my issue. I’ve run the 'sestatus|grep -e “SELinux status”| awk ‘{print $3}’ and it returned “disabled”.

                    Jeffrey Boulais
                    Director of Information Technology
                    Salmon River Central School District
                    637 County Route 1
                    Fort Covington, NY 12937
                    (518) 358-6613

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

                      @Jeffrey-Boulais Well than probably the database credentials are not correct. Check /var/www/html/fog/lib/fog/config.class.php for the DB credentials and then try using those to connect with the command line client: mysql -u root -p

                      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
                        Sebastian Roth Moderator
                        last edited by Sebastian Roth

                        @george1421 @Wayne-Workman I just pushed a change to check for SELinux and firewall, inform the user and ask if it should be disabled. Hope we won’t see those issues anymore. Or at least then we can say… told you so. 😉

                        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

                        Wayne WorkmanW george1421G 2 Replies Last reply Reply Quote 2
                        • Wayne WorkmanW
                          Wayne Workman @Sebastian Roth
                          last edited by Wayne Workman

                          @Sebastian-Roth Will the installer’s -y switch ‘just do it’ ? The automated tests depend on this option.

                          EDIT: Nevermind, I see you have it taken care of.

                          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/

                          1 Reply Last reply Reply Quote 0
                          • george1421G
                            george1421 Moderator @Sebastian Roth
                            last edited by

                            @Sebastian-Roth Well done. If we can filter these issue out at the beginning it will make support easier trying to figure out why this isn’t working… 😉

                            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!

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

                              @george1421, @Sebastian-Roth the only thing I foresee and maybe missed. Selinux won’t automatically be disabled because you made the change to the config file, it would require a reboot of the machine first. I would also, suggest changing from disabled to permissive. Disabling forces the file system to be unsupported and require being reestablished should you turn selinux back on. Placing into permissive mode keeps the file system contexts active and does not hinder usage. Plus you enter the command setenforcing 0 to switch selinux into permissive mode for the current running session which doesn’t require immediate reboot.

                              DERP — Don’t mind me, I’m dumb. Looked again and see you do have it set to permissive and do run the setenforce command.

                              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
                              • 1 / 1
                              • First post
                                Last post

                              156

                              Online

                              12.0k

                              Users

                              17.3k

                              Topics

                              155.2k

                              Posts
                              Copyright © 2012-2024 FOG Project