Filr upgrade error: "Failed to set up database or migration of database"

  • 7023905
  • 29-May-2019
  • 25-Oct-2019

Environment

Filr All-In-One appliance upgrade from 3.4 to 4.0

Situation

On a Small (All-In-One) deployment, the possible symptoms include:

1. After running the pre-upgrade script to prepare the MySQL database for migration to PostgreSQL, and following the steps to upgrade the Filr appliance, upon logging into the port 8443 administration console, the error "Failed to set up database or migration of database" is seen.

2. Upon completion of the upgrade, the "Configure PostgreSQL" icon does not appear.

3. The /var/opt/novell/va/logs/update.log on the Filr 4.0 appliance will include an error such as:

com.novell.admin.filr.datamodel.services.impl.ConfigServiceImpl - Error creating database,Error code org.postgresql.util.PSQLException: FATAL: password authentication failed for user "root"

In this example, the MySQL user is "root".

Resolution

Fixed in Filr 4.1 update. Upon encountering this problem after upgrading to Filr 4.0, follow these steps:

1. Use Online Update to install the Filr 4.1 update.

2. In the Port 9443 administration console:
   - In the address bar change the link to https://<hostname/ip of filr>:9443/phpPgAdmin/
   - Click on Servers > PostgreSQL > Login as username "postgres" and password - "<old mysql user password used for filr database>"
   - Click on roles. Delete the newly created user (user used for old filr-mysql database)
   - Click on "alter" of user "postgres". Change the password to "postgres". Enter the password 2 times and click "alter".

3. Return to the Filr Port 9443 administration console and click on the "Configuration" tile. There on the upgrade error page, click "finish".


Previous to Filr 4.1, the fix is as follows:

If you encounter this problem, the upgrade has failed, and will need to be re-done. Delete the failed Filr 4.0 appliance and complete the following steps to create a "filr" user in the MySQL database, then re-do the upgrade. These steps require that you be able to access the Filr appliance console using an SSH session or other hypervisor tool. From the Filr console:

1. Log into MySQL as the root database user:
    ~#: mysql -uroot -p<root's password>

2. Verify if the 'filr'@'localhost' database user exists:
    mysql> select user,host from mysql.user;

3. If the filr database user exists, reset the password:
    mysql> SET PASSWORD FOR 'filr'@'localhost' = PASSWORD('<some password>');

4. If the filr database user does not (or does no longer exist), (re-)create the filr database user:
    mysql> CREATE USER 'filr'@'localhost' IDENTIFIED BY '<some password>';
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'filr'@'localhost' WITH GRANT OPTION;
    mysql> FLUSH PRIVILEGES;

5. Login to MySQL using the filr database user and verify this succeeds:
    mysql> exit
    ~#: mysql -ufilr -p<some password>
    mysql> exit

6. In the Filr port 9443 administration console, click on the "Database" configuration option. Change the User Name to "filr" and enter the User Password established in step 3 or 4, above. Click the "OK" button.

7. Reconfigure the appliance by clicking the "Reconfigure Filr Server" button, so it uses the filr database user for the local MySQL instance.

After the completion of these steps, start the upgrade process again.

Cause

The upgrade to Filr 4.0 requires the use of the "filr" user to upgrade the MySQL database to PostgreSQL. If the 'filr' user is not present or not configured, the upgrade will fail.