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

    FOG 1.5.7 Update Database Issue

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    6
    29
    5.2k
    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.
    • C
      chaonatic
      last edited by

      On Ubuntu 18.04.2, when upgrading FOG from 1.5.6 to 1.5.7, I get the following error:

       * Installing package: mariadb-client..........................Failed! (Will try later)
      

      Then the install hangs for quite some time here:

       * Setting up and starting MySQL........................
      

      When the installer asks to hit the web interface to setup the database schema we are just left with the “Database connection unavailable” dialogue.

      I’m not sure what’s amiss here so any direction would be totally welcome. Thanks!

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

        @chaonatic said in FOG 1.5.7 Update Database Issue:

        mariadb-client

        If I remember right (I should look it up), but I think the repo changed the case of the package to something like MariaDB-Client as well as for the server.

        Edit: I found the post I was thinking about, but its related to centos and not ubuntu: https://forums.fogproject.org/topic/13470/cannot-upgrade-fog-1-5-4-to-1-5-6-maria-db-issue

        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!

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

          From the fog server linux command prompt what do you get when you key in sudo apt-get install mariadb-client?

          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!

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

            @chaonatic Manually edit /opt/fog/.fogproject and change the line starting with packages=.... Make the parts with “mariadb…” to read like this: MariaDB-client MariaDB-server (yeah, upper case M …)

            If that doesn’t work we need the installer log that you find in the same directory where you run the installer - e.g. fogproject/bin/error_logs/...!

            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

            C 1 Reply Last reply Reply Quote 0
            • C
              chaonatic @Sebastian Roth
              last edited by

              @Sebastian-Roth said in FOG 1.5.7 Update Database Issue:

              @chaonatic Manually edit /opt/fog/.fogproject and change the line starting with packages=.... Make the parts with “mariadb…” to read like this: MariaDB-client MariaDB-server (yeah, upper case M …)

              I don’t see the .fogproject file, only .fogsettings. I did attempt to change the two database entries in the settings file from mysql-client and mysql-server (note that they were generically named) to MariaDB-client and MariaDB-server but I got the same installation results. To be clear, I need to modify these entries prior to installing the update, right?

              @george1421 said in FOG 1.5.7 Update Database Issue:

              From the fog server linux command prompt what do you get when you key in sudo apt-get install mariadb-client?

              I get the following:

              Reading package lists... Done
              Building dependency tree
              Reading state information... Done
              Some packages could not be installed. This may mean that you have
              requested an impossible situation or if you are using the unstable
              distribution that some required packages have not yet been created
              or been moved out of Incoming.
              The following information may help to resolve the situation:
              
              The following packages have unmet dependencies:
               mariadb-client : Depends: mariadb-client-10.1 (>= 1:10.1.40-0ubuntu0.18.04.1) but it is not going to be installed
              E: Unable to correct problems, you have held broken packages.
              

              If I try sudo apt-get install MariaDB-client I get:

              Reading package lists... Done
              Building dependency tree
              Reading state information... Done
              E: Unable to locate package MariaDB-client
              
              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @chaonatic Ok, obviously I was totally on the wrong track. So you seem to have a different situation than what we saw in the other topic.

                mariadb-client : Depends: mariadb-client-10.1 (>= 1:10.1.40-0ubuntu0.18.04.1) but it is not going to be installed
                

                This error message is pretty interesting. I see that there are indeed two packages in Ubuntu one mariadb-client and one mariadb-client-10.1 - both the exact same version 10.1.40-0ubuntu0.18.04.1.

                Doesn’t make sense to me. What happens if you run sudo apt-get install mariadb-client-10.1??

                As well try sudo apt-get -f install - post output here.

                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

                C 1 Reply Last reply Reply Quote 0
                • C
                  chaonatic @Sebastian Roth
                  last edited by

                  @Sebastian-Roth said in FOG 1.5.7 Update Database Issue:

                  What happens if you run sudo apt-get install mariadb-client-10.1??

                  Reading package lists... Done
                  Building dependency tree
                  Reading state information... Done
                  The following packages were automatically installed and are no longer required:
                    libevent-core-2.1-6 mysql-server-core-5.7
                  Use 'apt autoremove' to remove them.
                  The following additional packages will be installed:
                    libconfig-inifiles-perl libjemalloc1 mariadb-client-core-10.1 mariadb-common
                  The following packages will be REMOVED:
                    mysql-client mysql-client-5.7 mysql-client-core-5.7 mysql-server mysql-server-5.7
                  The following NEW packages will be installed:
                    libconfig-inifiles-perl libjemalloc1 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common
                  0 upgraded, 5 newly installed, 5 to remove and 120 not upgraded.
                  Need to get 10.5 MB of archives.
                  After this operation, 44.0 MB disk space will be freed.
                  Do you want to continue? [Y/n] y
                  Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libconfig-inifiles-perl all 2.94-1 [40.4 kB]
                  Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 mariadb-common all 1:10.1.40-0ubuntu0.18.04.1 [16.2 kB]
                  Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 mariadb-client-core-10.1 amd64 1:10.1.40-0ubuntu0.18.04.1 [4,745 kB]
                  Get:4 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 libjemalloc1 amd64 3.6.0-11 [82.4 kB]
                  Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 mariadb-client-10.1 amd64 1:10.1.40-0ubuntu0.18.04.1 [5,646 kB]
                  Fetched 10.5 MB in 3s (4,077 kB/s)
                  (Reading database ... 114360 files and directories currently installed.)
                  Removing mysql-client (5.7.26-0ubuntu0.18.04.1) ...
                  Removing mysql-server (5.7.26-0ubuntu0.18.04.1) ...
                  Removing mysql-server-5.7 (5.7.26-0ubuntu0.18.04.1) ...
                  Removing mysql-client-5.7 (5.7.26-0ubuntu0.18.04.1) ...
                  Removing mysql-client-core-5.7 (5.7.26-0ubuntu0.18.04.1) ...
                  Selecting previously unselected package libconfig-inifiles-perl.
                  (Reading database ... 114235 files and directories currently installed.)
                  Preparing to unpack .../libconfig-inifiles-perl_2.94-1_all.deb ...
                  Unpacking libconfig-inifiles-perl (2.94-1) ...
                  Selecting previously unselected package mariadb-common.
                  Preparing to unpack .../mariadb-common_1%3a10.1.40-0ubuntu0.18.04.1_all.deb ...
                  Unpacking mariadb-common (1:10.1.40-0ubuntu0.18.04.1) ...
                  Selecting previously unselected package mariadb-client-core-10.1.
                  Preparing to unpack .../mariadb-client-core-10.1_1%3a10.1.40-0ubuntu0.18.04.1_amd64.deb ...
                  Unpacking mariadb-client-core-10.1 (1:10.1.40-0ubuntu0.18.04.1) ...
                  Selecting previously unselected package libjemalloc1.
                  Preparing to unpack .../libjemalloc1_3.6.0-11_amd64.deb ...
                  Unpacking libjemalloc1 (3.6.0-11) ...
                  Selecting previously unselected package mariadb-client-10.1.
                  Preparing to unpack .../mariadb-client-10.1_1%3a10.1.40-0ubuntu0.18.04.1_amd64.deb ...
                  Unpacking mariadb-client-10.1 (1:10.1.40-0ubuntu0.18.04.1) ...
                  Setting up mariadb-common (1:10.1.40-0ubuntu0.18.04.1) ...
                  Setting up libconfig-inifiles-perl (2.94-1) ...
                  Setting up libjemalloc1 (3.6.0-11) ...
                  Setting up mariadb-client-core-10.1 (1:10.1.40-0ubuntu0.18.04.1) ...
                  Processing triggers for libc-bin (2.27-3ubuntu1) ...
                  Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
                  Setting up mariadb-client-10.1 (1:10.1.40-0ubuntu0.18.04.1) ...
                  

                  @Sebastian-Roth said in FOG 1.5.7 Update Database Issue:

                  As well try sudo apt-get -f install - post output here.

                  Reading package lists... Done
                  Building dependency tree
                  Reading state information... Done
                  The following packages were automatically installed and are no longer required:
                    libevent-core-2.1-6 mysql-server-core-5.7
                  Use 'apt autoremove' to remove them.
                  0 upgraded, 0 newly installed, 0 to remove and 120 not upgraded.
                  
                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by

                    @chaonatic Well that might have fixed it. But I am still not sure how you got into this situation or if this is something every Ubuntu user will face sooner or later?! As far as I know we have not seen this issue in the forums before.

                    So now I’d suggest you run sudo apt-get install mariadb-server-10.1, then change the packages=.... line in /opt/fog/.fogsettings (got the name wrong last time) back to mariadb-client mariadb-server and re-run the FOG installer script.

                    Keeping my fingers crossed this is not something we’ll see on every Ubuntu update now. Still can’t really see what’s going on here and why this is happening.

                    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

                    C 1 Reply Last reply Reply Quote 0
                    • C
                      chaonatic @Sebastian Roth
                      last edited by

                      @Sebastian-Roth Well we’re definitely closer. The installer doesn’t fail when installing the databases but when you get to updating the database I’m still getting the Database connection unavailable error. Is this something to do with the blank vs not blank password (I mean, I’ve not yet set a DB pass)?

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

                        @chaonatic Try to manually connect to the DB and see if that works: mysql -u root -p (just hit ENTER when it asks for a password if yours is empty)

                        As well you might want to read this one: https://forums.fogproject.org/topic/10006/ubuntu-is-fog-s-enemy

                        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
                        • N
                          notverypunny
                          last edited by

                          My apologies if this ends up as a duplicate post, tried to register and the confirmation email wasn’t getting through the work address… anyways

                          I’ve got the same issue: Running 1.5.6, trying to upgrade to 1.5.7 on Ubuntu 18.04.2.

                          Just tried manually installing the appropriate mariadb packages ( -common, -client and -server)

                          Here’s the problem:
                          fog-mysql2mariadb.PNG

                          Looks like the script isn’t set up to handle the migration from mysql 5.7 to mariadb given the exception that the package manager throws so it scraps the existing install.

                          Not sure what avenue you want to take with the script, but it looks like it’s going to break any existing ubuntu installs that are trying to go from mysql to mariadb.

                          Ping me if you need any more info, I’ll post back if if make any headway on my install.

                          1 Reply Last reply Reply Quote 0
                          • N
                            notverypunny
                            last edited by

                            So for anyone else running into this, or if the devs want to make this work in the script, here’s what I had to do to get this upgrade to work:

                            • backup fog db
                            • perform manual install of mariadb-common, mariadb-server and mariadb-client
                            • reboot (services wouldn’t start and play nice, this was the simplest thing, should also be possible without restarting but I didn’t go there)
                            • manually create fog db
                            • restore fog db from backup
                            • git pull and run bin/installfog.sh

                            knock wood things are now working as expected and the web interface seems snappier (could just be in my head).

                            Cheers

                            1 Reply Last reply Reply Quote 0
                            • N
                              notverypunny
                              last edited by

                              Aaand it looks like the same bug is present when updating storage nodes…

                              Similar process as far as a workaround goes, but without the backup and restore of the fog db as it isn’t part of the storage node.

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

                                @notverypunny Really great you managed to work your way out of this. We had one other user some days ago who ran into the same issue - see here.

                                Not sure what avenue you want to take with the script, but it looks like it’s going to break any existing ubuntu installs that are trying to go from mysql to mariadb.

                                Not exactly true. Only if you move from a MySQL version 5.7 and earlier up to a newer version - I guess even if you update from MySQL 5.7 to 5.8 you’d run into this on any Ubuntu installation. Can you please let us know which version of Ubuntu you had before going to 18.04.2??

                                EDIT: Sorry, I was under the impression that Ubuntu 18.04 did use MySQL later than 5.7 already. I was wrong! Just figured that it was me who caused this in the first place when I added Debian 10 support! https://github.com/FOGProject/fogproject/commit/fddac44877ebabbf6f01d38d39361179bc6ec04d

                                Probably the only thing we can do within the installer is check if MySQL 5.7 is installed and tell people to manually follow the steps outlined. I would not fancy doing this in an automated way within the installer scripts.

                                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

                                N 1 Reply Last reply Reply Quote 0
                                • N
                                  notverypunny @Sebastian Roth
                                  last edited by

                                  @Sebastian-Roth

                                  With 18.04 being a LTS, I expect that they’ll keep mysql alive and well in their repos, or provide migration / upgrade within the distro’s framework. As such, the project’s (fogproject that is) best track might be to keep existing 18.04 installs on mysql unless there’s a compelling reason to force the migration.

                                  I’m lucky that my fog servers aren’t hosting anything else, but migrating databases if someone has other workloads on the same servers might not be a simple task.

                                  Cheers

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

                                    @notverypunny said in FOG 1.5.7 Update Database Issue:

                                    With 18.04 being a LTS, I expect that they’ll keep mysql alive and well in their repos, or provide migration / upgrade within the distro’s framework. As such, the project’s (fogproject that is) best track might be to keep existing 18.04 installs on mysql unless there’s a compelling reason to force the migration.

                                    You are absolutely right here. I just setup a test environment and confirmed the commit posted below is actually causing the issue. Shouldn’t have done that in the first place. I’d happily revert that change back to what it was. But that would mean that you and some others will be reverted back to MySQL 5.7 on the next FOG release again. Very ugly I suppose. I will try to do some testing on what happens when I do this.

                                    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

                                      @notverypunny In a test setup I was able to revert back to mysql 5.7 without much trouble. It seems to be able to use the database that mariadb used as well. The only issue I see is that the systemd service files seemed corrupted on my test system:

                                      ls -lah /etc/systemd/system/ | grep -e maria -e mysql
                                      lrwxrwxrwx  1 root root   35 Jul 22 20:10 mysqld.service -> /lib/systemd/system/mariadb.service
                                      lrwxrwxrwx  1 root root   27 Jul 22 21:16 mysql.service -> /lib/systemd/system/mariadb
                                      

                                      So I am still wondering if it’s a good idea to simply revert the change back to mysql-client mysql-server or if I need to add a check and if someone is on MariaDB already I just leave it alone?!?

                                      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

                                      N 1 Reply Last reply Reply Quote 0
                                      • N
                                        notverypunny @Sebastian Roth
                                        last edited by

                                        @Sebastian-Roth said in FOG 1.5.7 Update Database Issue:

                                        @notverypunny In a test setup I was able to revert back to mysql 5.7 without much trouble. It seems to be able to use the database that mariadb used as well. The only issue I see is that the systemd service files seemed corrupted on my test system:

                                        ls -lah /etc/systemd/system/ | grep -e maria -e mysql
                                        lrwxrwxrwx  1 root root   35 Jul 22 20:10 mysqld.service -> /lib/systemd/system/mariadb.service
                                        lrwxrwxrwx  1 root root   27 Jul 22 21:16 mysql.service -> /lib/systemd/system/mariadb
                                        

                                        So I am still wondering if it’s a good idea to simply revert the change back to mysql-client mysql-server or if I need to add a check and if someone is on MariaDB already I just leave it alone?!?

                                        I would add a check, assuming that the logic isn’t too much to code. MariaDB is the better db at this point from what I can see and I should think that most people would prefer it, especially on a new install.

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          FlangeMonkey
                                          last edited by

                                          Did you guys find a fix for this? I’ve just upgraded from 1.5.6 to 1.5.7 and the MariaDB service won’t start.

                                          Thanks,

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

                                            @FlangeMonkey When releasing 1.5.7 we did not expect this to be an issue but it turned out that moving from MySQL 5.7 to MariaDB is not yet properly supported by Ubuntu. It doesn’t do a merge of the DB over to the new version but simply shuts down the old MySQL DB (usually find that in /var/lib/mysql-5.7/) and creates a fresh empty new one for MariaDB.

                                            and the MariaDB service won’t start.

                                            While this sounds a bit different I can still imagine this being a similar case. Please run sudo systemstl status mariadb and post output here. As well run ls -al /var/lib | grep mysql and post here.

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

                                            193

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project