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

My database connection appears to be invalid?

Scheduled Pinned Locked Moved Solved
Bug Reports
5
25
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.
  • A
    AngryScientist
    last edited by Nov 8, 2016, 4:21 PM

    To reiterate, I followed the install guide on the wiki exactly.

    selinux is set to permissive:

    SELinux status:                 enabled
    SELinuxfs mount:                /sys/fs/selinux
    SELinux root directory:         /etc/selinux
    Loaded policy name:             targeted
    Current mode:                   permissive
    Mode from config file:          permissive
    Policy MLS status:              enabled
    Policy deny_unknown status:     allowed
    Max kernel policy version:      28
    

    Status of firewalld:

     firewalld.service - firewalld - dynamic firewall daemon
       Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
       Active: active (running) since Tue 2016-11-08 09:43:44 EST; 1h 30min ago
     Main PID: 831 (firewalld)
       CGroup: /system.slice/firewalld.service
               └─831 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
    
    Nov 08 09:43:39 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
    Nov 08 09:43:44 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
    

    And now for IPtables, this one is long!

    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
    INPUT_direct  all  --  0.0.0.0/0            0.0.0.0/0           
    INPUT_ZONES_SOURCE  all  --  0.0.0.0/0            0.0.0.0/0           
    INPUT_ZONES  all  --  0.0.0.0/0            0.0.0.0/0           
    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
    REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
    FORWARD_direct  all  --  0.0.0.0/0            0.0.0.0/0           
    FORWARD_IN_ZONES_SOURCE  all  --  0.0.0.0/0            0.0.0.0/0           
    FORWARD_IN_ZONES  all  --  0.0.0.0/0            0.0.0.0/0           
    FORWARD_OUT_ZONES_SOURCE  all  --  0.0.0.0/0            0.0.0.0/0           
    FORWARD_OUT_ZONES  all  --  0.0.0.0/0            0.0.0.0/0           
    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
    REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    OUTPUT_direct  all  --  0.0.0.0/0            0.0.0.0/0           
    
    Chain FORWARD_IN_ZONES (1 references)
    target     prot opt source               destination         
    FWDI_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto] 
    FWDI_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto] 
    FWDI_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto] 
    
    Chain FORWARD_IN_ZONES_SOURCE (1 references)
    target     prot opt source               destination         
    
    Chain FORWARD_OUT_ZONES (1 references)
    target     prot opt source               destination         
    FWDO_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto] 
    FWDO_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto] 
    FWDO_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto] 
    
    Chain FORWARD_OUT_ZONES_SOURCE (1 references)
    target     prot opt source               destination         
    
    Chain FORWARD_direct (1 references)
    target     prot opt source               destination         
    
    Chain FWDI_public (3 references)
    target     prot opt source               destination         
    FWDI_public_log  all  --  0.0.0.0/0            0.0.0.0/0           
    FWDI_public_deny  all  --  0.0.0.0/0            0.0.0.0/0           
    FWDI_public_allow  all  --  0.0.0.0/0            0.0.0.0/0           
    
    Chain FWDI_public_allow (1 references)
    target     prot opt source               destination         
    
    Chain FWDI_public_deny (1 references)
    target     prot opt source               destination         
    
    Chain FWDI_public_log (1 references)
    target     prot opt source               destination         
    
    Chain FWDO_public (3 references)
    target     prot opt source               destination         
    FWDO_public_log  all  --  0.0.0.0/0            0.0.0.0/0           
    FWDO_public_deny  all  --  0.0.0.0/0            0.0.0.0/0           
    FWDO_public_allow  all  --  0.0.0.0/0            0.0.0.0/0           
    
    Chain FWDO_public_allow (1 references)
    target     prot opt source               destination         
    
    Chain FWDO_public_deny (1 references)
    target     prot opt source               destination         
    
    Chain FWDO_public_log (1 references)
    target     prot opt source               destination         
    
    Chain INPUT_ZONES (1 references)
    target     prot opt source               destination         
    IN_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto] 
    IN_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto] 
    IN_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto] 
    
    Chain INPUT_ZONES_SOURCE (1 references)
    target     prot opt source               destination         
    
    Chain INPUT_direct (1 references)
    target     prot opt source               destination         
    ACCEPT     2    --  0.0.0.0/0            0.0.0.0/0           
    
    Chain IN_public (3 references)
    target     prot opt source               destination         
    IN_public_log  all  --  0.0.0.0/0            0.0.0.0/0           
    IN_public_deny  all  --  0.0.0.0/0            0.0.0.0/0           
    IN_public_allow  all  --  0.0.0.0/0            0.0.0.0/0           
    
    Chain IN_public_allow (1 references)
    target     prot opt source               destination         
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:21 ctstate NEW
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:137 ctstate NEW
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:138 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:139 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:445 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:443 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:111 ctstate NEW
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:111 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:20048 ctstate NEW
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:20048 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:2049 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:53 ctstate NEW
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:53 ctstate NEW
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:3306 ctstate NEW
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:67 ctstate NEW
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:69 ctstate NEW
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:4011 ctstate NEW
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpts:49152:65532 ctstate NEW
    
    Chain IN_public_deny (1 references)
    target     prot opt source               destination         
    
    Chain IN_public_log (1 references)
    target     prot opt source               destination         
    
    Chain OUTPUT_direct (1 references)
    target     prot opt source               destination  
    
    1 Reply Last reply Reply Quote 0
    • W
      Wayne Workman
      last edited by Nov 8, 2016, 5:31 PM

      Try to access the db manually.

      mysql -D fog

      1 Reply Last reply Reply Quote 0
      • A
        AngryScientist
        last edited by AngryScientist Nov 8, 2016, 11:52 AM Nov 8, 2016, 5:33 PM

        Pulled from git for RC21, Fixed errors in the fogsettings file. During installation, a selinux alert was generated:

        SELinux is preventing /usr/bin/passwd from ioctl access on the file /home/ullsadmin/git/fogproject/bin/error_logs/fog_error_1.3.0-RC-21.log.
        
        *****  Plugin catchall (100. confidence) suggests   **************************
        
        If you believe that passwd should be allowed ioctl access on the fog_error_1.3.0-RC-21.log file by default.
        Then you should report this as a bug.
        You can generate a local policy module to allow this access.
        Do
        allow this access for now by executing:
        # grep passwd /var/log/audit/audit.log | audit2allow -M mypol
        # semodule -i mypol.pp
        
        Additional Information:
        Source Context                unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023
        Target Context                unconfined_u:object_r:user_home_t:s0
        Target Objects                /home/ullsadmin/git/fogproject/bin/error_logs/fog_
                                      error_1.3.0-RC-21.log [ file ]
        Source                        passwd
        Source Path                   /usr/bin/passwd
        Port                          <Unknown>
        Host                          localhost.localdomain
        Source RPM Packages           passwd-0.79-4.el7.x86_64
        Target RPM Packages           
        Policy RPM                    selinux-policy-3.13.1-60.el7_2.9.noarch
        Selinux Enabled               True
        Policy Type                   targeted
        Enforcing Mode                Permissive
        Host Name                     localhost.localdomain
        Platform                      Linux localhost.localdomain
                                      3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24
                                      16:09:20 UTC 2016 x86_64 x86_64
        Alert Count                   2
        First Seen                    2016-11-05 22:11:37 EDT
        Last Seen                     2016-11-08 12:24:57 EST
        Local ID                      b2bddb79-8259-42e5-b4d2-2b432292d6b6
        
        Raw Audit Messages
        type=AVC msg=audit(1478625897.821:682): avc:  denied  { ioctl } for  pid=5594 comm="passwd" path="/home/ullsadmin/git/fogproject/bin/error_logs/fog_error_1.3.0-RC-21.log" dev="dm-0" ino=35560553 scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file
        
        
        type=SYSCALL msg=audit(1478625897.821:682): arch=x86_64 syscall=ioctl success=no exit=ENOTTY a0=1 a1=5401 a2=7ffd1070e6e0 a3=7ffd1070e670 items=0 ppid=5118 pid=5594 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=1 comm=passwd exe=/usr/bin/passwd subj=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 key=(null)
        
        Hash: passwd,passwd_t,user_home_t,file,ioctl
        

        The file was still written however, and the last few entries indicate a problem with the database as well…

        --2016-11-08 12:49:27--  (try: 5)  http://10.6.6.6//fog//maintenance/backup_db.php
        Connecting to 10.6.6.6:80... connected.
        HTTP request sent, awaiting response... 
        
        W 1 Reply Last reply Nov 8, 2016, 5:35 PM Reply Quote 0
        • W
          Wayne Workman @AngryScientist
          last edited by Nov 8, 2016, 5:35 PM

          @AngryScientist In permissive mode, SELinux generates messages as it would in enforcing, but it doesn’t take any action to block anything whatsoever. Please try what I posted below.

          A 1 Reply Last reply Nov 8, 2016, 7:46 PM Reply Quote 0
          • A
            AngryScientist @Wayne Workman
            last edited by AngryScientist Nov 8, 2016, 2:32 PM Nov 8, 2016, 7:46 PM

            @Wayne-Workman
            Okay, sorry Wayne, your post got lost in my text walls.

            [ullsadmin@localhost ~]$ mysql -D fog
            ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
            

            This is beyond my knowledge…
            EDIT: Restarting mysqld fixed the issue. Now I will see if it stays after reboot…
            EDIT2: It does not stay, boooo.

            W 2 Replies Last reply Nov 8, 2016, 9:30 PM Reply Quote 0
            • W
              Wayne Workman @AngryScientist
              last edited by Nov 8, 2016, 9:30 PM

              @AngryScientist When it throws the error again, try these and see if one works:

              mysql -D fog -u root -h localhost

              mysql -D fog -u root -h 127.0.0.1

              1 Reply Last reply Reply Quote 0
              • W
                Wayne Workman @AngryScientist
                last edited by Wayne Workman Nov 8, 2016, 3:54 PM Nov 8, 2016, 9:53 PM

                @AngryScientist said in My database connection appears to be invalid?:

                @Wayne-Workman
                Okay, sorry Wayne, your post got lost in my text walls.

                [ullsadmin@localhost ~]$ mysql -D fog
                ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
                

                This is beyond my knowledge…
                EDIT: Restarting mysqld fixed the issue. Now I will see if it stays after reboot…
                EDIT2: It does not stay, boooo.

                I have the exact same error now… great.

                @Tom-Elliott Moving this to bug reports.

                1 Reply Last reply Reply Quote 0
                • W
                  Wayne Workman
                  last edited by Nov 8, 2016, 10:02 PM

                  This post is deleted!
                  JJ FullmerJ 1 Reply Last reply Nov 8, 2016, 10:36 PM Reply Quote 0
                  • JJ FullmerJ
                    JJ Fullmer Testers
                    last edited by Nov 8, 2016, 10:35 PM

                    This sounds like a mariaDB (aka mySql) issue. And it sounds like it’s just not configured to start on startup if systemctl start mysqld.service fixes it. This article might could help.
                    https://mariadb.com/kb/en/mariadb/starting-and-stopping-mariadb-automatically/

                    I thought that the database got configured to automatically start on the apt-get/yum install.
                    I have cent os 7 and have never had to do any sort of configuration for fog services to run on startup.

                    W 1 Reply Last reply Nov 8, 2016, 11:41 PM Reply Quote 0
                    • JJ FullmerJ
                      JJ Fullmer Testers @Wayne Workman
                      last edited by Nov 8, 2016, 10:36 PM

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • W
                        Wayne Workman @JJ Fullmer
                        last edited by Nov 8, 2016, 11:41 PM

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • W
                          Wayne Workman
                          last edited by Nov 8, 2016, 11:47 PM

                          In centos 7 the way to start maridadb on boot is probably:
                          systemctl eanble mysqld

                          I’m still waiting to hear back on the commands I posted.

                          A 1 Reply Last reply Nov 9, 2016, 1:36 PM Reply Quote 0
                          • A
                            AngryScientist @Wayne Workman
                            last edited by Nov 9, 2016, 1:36 PM

                            @Wayne-Workman

                            systemctl enable mysqld
                            

                            Typo correction!

                            I will reboot my FOG server later today and give you the results of your suggestions. Right now I am reveling in the wonders of 5GBps imagine speed. 1.2.0 on my old hardware topped out at 1.2GBps

                            W 1 Reply Last reply Nov 9, 2016, 2:33 PM Reply Quote 1
                            • W
                              Wayne Workman @AngryScientist
                              last edited by Nov 9, 2016, 2:33 PM

                              @AngryScientist said in My database connection appears to be invalid?:

                              Right now I am reveling in the wonders of 5GBps imagine speed. 1.2.0 on my old hardware topped out at 1.2GBps

                              A lot of that has to do with the performance improvements of FOG 1.3.0 RC, a change was made to how the images are compressed and decompressed for imaging and some people reported 50 to 100% speed increases.

                              1 Reply Last reply Reply Quote 1
                              • Tom ElliottT
                                Tom Elliott
                                last edited by Nov 9, 2016, 6:50 PM

                                RC-22 Officially released.

                                Please update and hopefully you’ll see all the latest goodies and what not. (Hopefully this will be fixed for you too.)

                                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

                                A 1 Reply Last reply Nov 9, 2016, 9:10 PM Reply Quote 0
                                • A
                                  AngryScientist @Tom Elliott
                                  last edited by Nov 9, 2016, 9:10 PM

                                  @Tom-Elliott
                                  I know how to do a git pull, but what is the official upgrade procedure?

                                  W 1 Reply Last reply Nov 10, 2016, 2:43 AM Reply Quote 0
                                  • W
                                    Wayne Workman @AngryScientist
                                    last edited by Nov 10, 2016, 2:43 AM

                                    @AngryScientist here:

                                    https://wiki.fogproject.org/wiki/index.php?title=Upgrade_to_trunk

                                    1 Reply Last reply Reply Quote 0
                                    • Tom ElliottT
                                      Tom Elliott
                                      last edited by Nov 10, 2016, 11:37 AM

                                      In very simple terms:

                                      https://wiki.fogproject.org/wiki/index.php?title=Upgrade_to_trunk

                                      Essentially, open a terminal.

                                      Cd to the installer directory.

                                      If you loaded the repo from git, make sure you’re on the dev-branch:

                                      git checkout dev-branch

                                      Ensure you’re environment is setup without customizations:

                                      git reset --hard

                                      Pull the latest:

                                      git pull

                                      Cd to the BIN directory:

                                      cd bin

                                      Install as normal.

                                      ./installfog.sh -y

                                      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

                                      A 1 Reply Last reply Dec 15, 2016, 7:01 PM Reply Quote 1
                                      • A
                                        AngryScientist @Tom Elliott
                                        last edited by Dec 15, 2016, 7:01 PM

                                        @Tom-Elliott

                                        Time to un-zombie the thread.

                                        I updated to RC-36, and same same. I had to sudo systemctl start mysqld to get the database connection running.

                                        Tom ElliottT george1421G 2 Replies Last reply Dec 15, 2016, 9:50 PM Reply Quote 0
                                        • Tom ElliottT
                                          Tom Elliott @AngryScientist
                                          last edited by Dec 15, 2016, 9:50 PM

                                          @AngryScientist Are you sure it wasn’t:

                                          systemctl start mysql or even systemctl start mariadb?

                                          I’m trying to validate what the problem is here, and I’m fairly sure we’d have seen a bunch of issues with this operationally speaking. (We have a bunch of people using 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! 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
                                          • 2
                                          • 1 / 2
                                          • First post
                                            Last post

                                          107

                                          Online

                                          12.2k

                                          Users

                                          17.4k

                                          Topics

                                          155.5k

                                          Posts
                                          Copyright © 2012-2024 FOG Project