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

    MySQL Failed

    Scheduled Pinned Locked Moved Solved
    Bug Reports
    4
    16
    1.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.
    • R
      rets34
      last edited by

      @Tom-Elliott

      Attached output below.

      mariadb.txt

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

        @rets34 I’m not seeing anything that stands out as problemattic.

        It appears mariadb started okay, though I’m unsure.

        Can you also provide systemctl -l status mariadb

        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

        R 1 Reply Last reply Reply Quote 0
        • R
          rets34 @Tom Elliott
          last edited by

          @Tom-Elliott

          root@fog-desktop:/home/admin# systemctl -l status mariadb
          ● mariadb.service - MariaDB database server
             Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
             Active: activating (start) since Thu 2020-07-30 12:16:53 CDT; 34s ago
            Process: 30832 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_rec
            Process: 30829 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=
            Process: 30828 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0
           Main PID: 30916 (mysqld)
              Tasks: 26 (limit: 4915)
             CGroup: /system.slice/mariadb.service
                     └─30916 /usr/sbin/mysqld
          
          Jul 30 12:16:53 fog-desktop systemd[1]: Starting MariaDB database server...
          Jul 30 12:16:53 fog-desktop mysqld[30916]: 2020-07-30 12:16:53 139648654302336 [Note] /usr/sbin/mysqld (mysqld 1
          root@fog-desktop:/home/admin# ^C
          root@fog-desktop:/home/admin# systemctl -l status mariadb
          ● mariadb.service - MariaDB database server
             Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
             Active: failed (Result: timeout) since Thu 2020-07-30 12:18:26 CDT; 50min ago
            Process: 30916 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited
            Process: 30832 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_rec
            Process: 30829 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=
            Process: 30828 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0
           Main PID: 30916 (code=exited, status=0/SUCCESS)
          
          Jul 30 12:16:53 fog-desktop systemd[1]: Starting MariaDB database server...
          Jul 30 12:16:53 fog-desktop mysqld[30916]: 2020-07-30 12:16:53 139648654302336 [Note] /usr/sbin/mysqld (mysqld 1
          Jul 30 12:18:23 fog-desktop systemd[1]: mariadb.service: Start operation timed out. Terminating.
          Jul 30 12:18:26 fog-desktop systemd[1]: mariadb.service: Failed with result 'timeout'.
          Jul 30 12:18:26 fog-desktop systemd[1]: Failed to start MariaDB database server.
          root@fog-desktop:/home/admin#
          
          
          Tom ElliottT 1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott @rets34
            last edited by

            @rets34 said in MySQL Failed:

            systemd[1]: mariadb.service: Failed with result ‘timeout’.

            Please follow this information:
            https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263

            The gist:

            echo "/usr/sbin/mysqld { }" > /etc/apparmor.d/usr.sbin.mysqld
            apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld
            systemctl restart mariadb
            

            Then wait a couple of seconds and do the systemctl -l status mariadb

            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
            • R
              rets34
              last edited by

              root@fog-desktop:/home/admin# systemctl -l status mariadb
              ● mariadb.service - MariaDB database server
                 Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
                 Active: active (running) since Thu 2020-07-30 13:37:37 CDT; 17s ago
                Process: 23218 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status
                Process: 23215 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
                Process: 23104 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_rec
                Process: 23102 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=
                Process: 23101 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0
               Main PID: 23188 (mysqld)
                 Status: "Taking your SQL requests now..."
                  Tasks: 29 (limit: 4915)
                 CGroup: /system.slice/mariadb.service
                         └─23188 /usr/sbin/mysqld
              
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: Processing databases
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: information_schema
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: mysql
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: performance_schema
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: Phase 6/7: Checking and upgrading tables
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: Processing databases
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: information_schema
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: performance_schema
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: Phase 7/7: Running 'FLUSH PRIVILEGES'
              Jul 30 13:37:39 fog-desktop /etc/mysql/debian-start[23221]: OK
              
              

              That fixed it, however after a reboot I got ‘database connection unavailable’ again.
              And back to square one with:

               Setting up and starting MySQL...............................Failed!
              
              Tom ElliottT 1 Reply Last reply Reply Quote 0
              • Tom ElliottT
                Tom Elliott @rets34
                last edited by Sebastian Roth

                @rets34 you probably need to remove MySQL proper. apt-get remove --purge mysql-server

                Followed by the commands I gave below.

                I gave the gist to get you up and running right away. Why you would reboot again, when that broke this the first time, seems strange. This is a server and should not need to be restarted every time you want to update fog.

                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

                R 1 Reply Last reply Reply Quote 0
                • R
                  rets34 @Tom Elliott
                  last edited by

                  @Tom-Elliott I was just if I had to reboot the machine for whatever reason that I wouldn’t have to worry about it failing. But the solution you posted has worked to get it working.
                  Now I just need to figure out how to get all my images to show up in the WebUI, got them all on the machine but don’t have an exported CSV from prior to database dying.

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

                    @rets34 said in MySQL Failed:

                    Now I just need to figure out how to get all my images to show up in the WebUI, got them all on the machine but don’t have an exported CSV from prior to database dying.

                    You can simply re-create the image definitions in the web UI and make sure they are pointed to the existing directories. They won’t be overwritten unless you re-capture the image! It’s always good to keep a full daily database backup or at least pull a CSV dump every now and then.

                    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

                    R 1 Reply Last reply Reply Quote 0
                    • R
                      rets34 @Sebastian Roth
                      last edited by

                      @Sebastian-Roth ae704a82-1291-4430-b12f-a0137743b969-image.png

                      I went through and pointed a couple to the old location, and it’s not showing Size?

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

                        @rets34 Size on client is only being updated when re-capturing the image. Don’t worry about it.

                        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

                        R 1 Reply Last reply Reply Quote 0
                        • R
                          rets34 @Sebastian Roth
                          last edited by

                          @Sebastian-Roth Makes sense to me.
                          Solved for me

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

                          243

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project