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

    [Fresh new installation] Your database connection appears to be invalid

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    14
    2.4k
    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.
    • george1421G
      george1421 Moderator @HaRD
      last edited by george1421

      @HaRD Well these commands tell centos/rhel to start the web server on every reboot. That is the enable command.

      This command tells centos to set the http server to auto start.
      systemctl enable httpd

      and this command tells centos to restart the service now.
      systemctl restart httpd

      this command tells centos to stop the http start now.
      systemctl start httpd

      This command tells centos to stop the http service
      systemctl stop httpd

      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!

      HaRDH 1 Reply Last reply Reply Quote 0
      • HaRDH
        HaRD @george1421
        last edited by HaRD

        @george1421 Ohh, that is nice. Sorry for the lame-ish question 🙂 I will give it a try and then report back - hopefully with my problem solved.

        Thank you and good night!

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

          @HaRD Just be aware that it may not be the http (web server) that’s at fault, it may be instead the database server. In that case you would want to do a systemctl enable mysql and systemctl start mysql

          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!

          HaRDH 1 Reply Last reply Reply Quote 1
          • HaRDH
            HaRD @george1421
            last edited by

            @george1421 We’ll see. If it won’t work, then we can try something else. In any case, I will give a feedback; and either my problem will be succesfully solved, or not - and in that case I will humbly ask for another solution.

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

              @HaRD said in [Fresh new installation] Your database connection appears to be invalid:

              when OS boots up, web management does not work anymore and I get the “Your database connection appears to be invalid”

              That means apache is running fine because this message is delivered through the web interface.

              First thing to try is to restart mysql with systemctl restart mysql see if that fixes it. If so, you have a timing issue. All you need to do is delay mysql’s startup by maybe 30 seconds. There’s a writeup on how to do that in CentOS 7 for other services here, just put mysql into the list. https://wiki.fogproject.org/wiki/index.php?title=CentOS_7#Post_Config_.28Optional.29

              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/

              HaRDH 1 Reply Last reply Reply Quote 0
              • HaRDH
                HaRD @Wayne Workman
                last edited by HaRD

                @Wayne-Workman Thank you for your reply; I just got to work and tried your advice as first step - an seems like you were right. After typing command for MySQL restart, web GUI works.

                Which means that I’ve done something wrong with that startup delay script you mentioned (I’ve said in the first post, that I’ve followed wiki instructions - including Post Config).

                I tried to follow those instructions again, doing this:

                I log in, open terminal, and then type this:

                sudo su
                <type in root pwd>
                

                Then I copy/paste from wiki these commands:

                systemctl disable FOG{MulticastManager,Scheduler,SnapinReplicator,ImageReplicator}
                systemctl disable nfs-server
                systemctl disable rpcbind
                

                I already have created script, which is mentioned in wiki, so I don’t bother with re-creating it anew and then I just put in:

                chmod +x /etc/rc.d/rc.local
                

                Then I close the terminal and reboot the system. And now system is stuck at booting with this (seems like script wasn’t running at all previously):
                1_1488454569610_Scr02.jpg 0_1488454569610_Scr01.jpg

                So, what went wrong this time?

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

                  @HaRD The steps to delay those services don’t include mysql, you would just add it into those steps.

                  Read what the lines say. First one disables FOGMulticastManager, FOGSheduler, FOGSnapinReplicator, and FOGImageReplicator. The next line disables nfs-server, next one disables rpcbind. You just need to add mysql to the list.

                  Same goes for /etc/rc.d/rc.local Just modify it to start mysql after 30 seconds too.

                  Also, this would be the first time I’ve ever heard of a timing issue with MySQL on CentOS 7.

                  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/

                  george1421G 1 Reply Last reply Reply Quote 1
                  • george1421G
                    george1421 Moderator @Wayne Workman
                    last edited by george1421

                    @Wayne-Workman I would say I never heard of a timing issue for mysql (mariadb) with centos. My fog server is running on centos 7.3 as a VM and I didn’t have to do any of this delay start stuff (unless the installer is doing it behind the scenes).

                    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 Right. Generally CentOS 7 has been rock solid. The installer does no such delay-magic. The delay stuff is only needed when services fail to start on boot.

                      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
                      • HaRDH
                        HaRD
                        last edited by

                        Thank you guys, it seems like you kicked me in to the right direction. I remade whole server to be sure, reinstalled FOG using wiki guide and as far as the startup script go, I just needed to write this:

                        #!/bin/bash
                        sleep 30
                        touch /var/lock/subsys/local
                        systemctl start mysql
                        exit 0
                        

                        I was just dumb enough to not realize, that you need to write this script only in case, when something does not work. Well, sorry about that 🙂

                        Now everything seems to run fine - I don’t need to do a damn thing even after a reboot. Nice!

                        As to why I needed to do these timing stuff in the first place - since you all claim that CentOS is otherwise rockstable - I seriously don’t know myself. If you want to look into it, I don’t mind to cooperate with you guys.

                        Thank you guys!

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

                        126

                        Online

                        12.1k

                        Users

                        17.3k

                        Topics

                        155.3k

                        Posts
                        Copyright © 2012-2024 FOG Project