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

    Error 1396 while upgrading

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    18
    1.6k
    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.
    • S
      Sebastian Roth Moderator
      last edited by Sebastian Roth

      @xburnerx00 I still am very much at a loss on why the DB username is empty while it shouldn’t be. I will go through the installer code again and see what I can find.

      Did you extract the installer from ZIP or tar.gz or is this a repo clone from GitHub?

      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

      X 1 Reply Last reply Reply Quote 0
      • X
        xburnerx00 @Sebastian Roth
        last edited by

        @sebastian-roth

        I have done an update before. I forget what the beginning version for me was, but I believe I may have done that install with tar.gz. I was following the installation instructions from the wiki. When I updated to 1.5.9RC1, just before last summer I believe, I did that one through github. I only say that because I remember asking to have that site open since our firewall was blocking it. Now I am using github to update. I ran these commands for the update I am attempting now from another post.

        cd /root/fogproject
        git checkout master
        git pull
        cd bin
        ./installfog.sh

        Separate thing I noticed was that I was trying to use the GUI to navigate to the .sql file but it has an X on the root folder.

        5679690e-e136-46b4-8cb5-6ee8d73eb33b-image.png

        Not sure if that means anything. I cannot open it. Forgive me for not being more in depth if needed, I am new to linux.

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

          @xburnerx00 said in Error 1396 while upgrading:

          [root@fogserver bin]# grep snmysqluser /opt/fog/.fogsettings
          snmysqluser=‘fogstorage’

          I went over this too quickly because at first I expected the variable to be empty and so I didn’t quite notice it to be set to fogstorage which is not the default on a FOG master node but usually on a FOG storage node. Do you remember manually adjusting the DB username in /opt/fog/.fogsettings at some point?

          While I still don’t understand why this would cause this exact error I am wondering what you get when running grep DATABASE_USERNAME /var/www/html/fog/lib/fog/config.class.php

          As well run git status to see if you have any local modifications in the repo. If the output is empty, it’s all fine.

          The git commands used seem fine and /root not being accessible in the GUI is right too.

          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

          X 1 Reply Last reply Reply Quote 0
          • X
            xburnerx00 @Sebastian Roth
            last edited by

            @sebastian-roth

            I may have changed something during that first update, I vaguely remember changing a username.

            [root@fogserver bin]# grep DATABASE_USERNAME /var/www/html/fog/lib/fog/config.class.php
                    define('DATABASE_USERNAME', '');
            You have new mail in /var/spool/mail/root
            [root@fogserver bin]# 
            
            [root@fogserver fogproject]# git status
            # On branch master
            nothing to commit, working directory clean
            
            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by

              @xburnerx00 Please try the following: Edit /opt/fog/.fogsettings (as root) and set snmysqluser='fogmaster'. Then re-run the installer.

              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

              X 1 Reply Last reply Reply Quote 0
              • X
                xburnerx00 @Sebastian Roth
                last edited by

                @sebastian-roth
                I changed snmysqluser to ‘fogmaster’. It was previously ‘foguser’. Re-ran installer. It stopped at same error.

                Failed!
                
                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                !! The installer was not able to run all the way to the end as   !!
                !! something has caused it to fail. The following few lines are  !!
                !! from the error log file which might help us figure out what's !!
                !! wrong. Please add this information when reporting an error.   !!
                !! As well you might want to take a look at the full error log   !!
                !! in /root/fogproject/bin/error_logs/fog_error_1.5.9.log !!
                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                
                chsh: Shell not changed.
                Changing shell for fogproject.
                New password: Retype new password: Changing password for user fogproject.
                passwd: all authentication tokens updated successfully.
                ERROR 1396 (HY000) at line 31: Operation CREATE USER failed for ''@'localhost'
                [root@fogserver bin]# 
                
                
                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by

                  @xburnerx00 said in Error 1396 while upgrading:

                  I changed snmysqluser to ‘fogmaster’. It was previously ‘foguser’.

                  I thought it was ‘fogstorage’?! Something is very strange here.

                  Now let’s see if we can get your FOG web UI back up by manually editing /var/www/html/fog/lib/fog/config.class.php. We saw the DATABASE_USERNAME was empty too. Put in fogstorage (as we had that in fogsettings initially I think), make sure a non-empty password is defined the line below the username, save the file and try to open the FOG web UI URL in your browser. No restart of services needed.

                  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

                  X 1 Reply Last reply Reply Quote 0
                  • X
                    xburnerx00 @Sebastian Roth
                    last edited by

                    @sebastian-roth
                    I set the name ‘fogstorage’. There was already a randomly generated password in the line below.

                    No success opening WebUI.

                    private static function _dbSettings()
                        {
                            define('DATABASE_TYPE', 'mysql'); // mysql or oracle
                            define('DATABASE_HOST', 'localhost');
                            define('DATABASE_NAME', 'fog');
                            define('DATABASE_USERNAME', 'fogstorage');
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by Sebastian Roth

                      @xburnerx00 Do you know the DB root password? Can you login to the database in the console? mysql -u root -p (if you don’t know the DB root password try just ENTER for an empty password - but the 1.5.9-RC1 installer should have forced you to set one on CentOS I think)

                      You can also try out different usernames in config.class.php… fogmaster, root - see if any of those works.

                      I am still scratching my head in what happened 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

                      X 1 Reply Last reply Reply Quote 0
                      • X
                        xburnerx00 @Sebastian Roth
                        last edited by

                        @sebastian-roth

                        Yes, I know the root password.

                        [root@fogserver ~]# mysql -u root -p
                        Enter password: 
                        Welcome to the MariaDB monitor.  Commands end with ; or \g.
                        Your MariaDB connection id is 14
                        Server version: 5.5.68-MariaDB MariaDB Server
                        
                        Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
                        
                        Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
                        
                        MariaDB [(none)]> 
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • S
                          Sebastian Roth Moderator
                          last edited by

                          @xburnerx00 From the mysql root shell run this query and post results here: SELECT * FROM mysql.user;

                          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

                          X 1 Reply Last reply Reply Quote 0
                          • X
                            xburnerx00 @Sebastian Roth
                            last edited by

                            @sebastian-roth
                            I changed the passwords for this post.

                            MariaDB [(none)]> SELECT * FROM mysql.user;
                            +-----------+------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-----------------------+
                            | Host      | User       | Password                                  | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin                | authentication_string |
                            +-----------+------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-----------------------+
                            | localhost | root       | *7FB1F1B8AD1B4CFD57ERT8E761B6ADFF70D04FA0 | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 |                       |                       |
                            | 127.0.0.1 | root       |                                           | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 | mysql_native_password |                       |
                            | ::1       | root       |                                           | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 | mysql_native_password |                       |
                            | %         | fogstorage | *35C8661957485DE278FFGH9B7C348770BB41AD4C | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                | N                | N              | N                   | N                  | N                | N          | N            | N                      |          |            |             |              |             0 |           0 |               0 |                    0 |                       |                       |
                            +-----------+------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-----------------------+
                            4 rows in set (0.00 sec)
                            
                            MariaDB [(none)]> 
                            
                            
                            1 Reply Last reply Reply Quote 0
                            • S
                              Sebastian Roth Moderator
                              last edited by

                              Found and fixed - the .fogsettings file was clearly corrupted causing this issue. Very sure this was due to manual editing.

                              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

                              249

                              Online

                              12.0k

                              Users

                              17.3k

                              Topics

                              155.2k

                              Posts
                              Copyright © 2012-2024 FOG Project