FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Startup fails after Postgresql db upgrade

    Scheduled Pinned Locked Moved
    General Discussion
    2
    3
    41
    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
      atakan
      last edited by atakan

      Hi,

      We have upgraded our Azure managed DB from 13.x to 16.8, and our Docker system started to give an error during the boot. It looks like FusionAuth is trying to install or migrate to a new version and writes logs as it is creating already existing tables with data in them. We also gave it a try to set the Docker version from 1.51.1 to 1.53.2 with the hope of getting rid of that error, but with no luck.

      What would be the reason?

      ...
      ...
      -- Integrations
      INSERT INTO integrations(data)
        VALUES ('{}');
      
      -- Initialize the version of the BreachPasswords data set
      INSERT INTO data_sets (name, last_update_instant)
        VALUES ('BreachPasswords', 1581476456155);
      
      -- FusionAuth Connector
      INSERT INTO connectors (id, insert_instant, last_update_instant, data, name, type)
        VALUES ('-intentionally deleted-', (EXTRACT(EPOCH FROM (SELECT NOW() AT TIME ZONE 'UTC'))) * 1000, (EXTRACT(EPOCH FROM (SELECT NOW() AT TIME ZONE 'UTC'))) * 1000, '{}', 'Default', 0);
      
      -- Create a FusionAuth connector policy
      INSERT INTO connectors_tenants (tenants_id, connectors_id, sequence, data)
      SELECT id, '-intentionally deleted-', 0, '{"domains":["*"]}'
        FROM tenants;
      
      -- Initialize migrations so they don't run on new installs
      INSERT INTO migrations (name, run_instant)
        VALUES ('io.fusionauth.api.migration.guice.Migration_1_8_0', 0),
          ('io.fusionauth.api.migration.guice.Migration_1_9_2', 0),
          ('io.fusionauth.api.migration.guice.Migration_1_10_0', 0),
          ('io.fusionauth.api.migration.guice.Migration_1_13_0', 0),
          ('io.fusionauth.api.migration.guice.Migration_1_15_3', 0),
          ('io.fusionauth.api.migration.guice.Migration_1_30_0', 0);
      .  Cause: org.postgresql.util.PSQLException: ERROR: relation "email_templates" already exists
      2025-06-09 05:43:23.499 PM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [AUysOg] Attempting to unlock database to support multi-node configurations
      2025-06-09 05:43:23.503 PM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [AUysOg] Unlock completed
      2025-06-09 05:43:23.887 PM INFO  io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Loading FusionAuth configuration file [/usr/local/fusionauth/config/fusionauth.properties]
      2025-06-09 05:43:23.888 PM INFO  io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Set property [fusionauth-app.url] set to [https://login] using configured value.
      2025-06-09 05:43:23.889 PM INFO  com.inversoft.configuration.BasePropertiesFileInversoftConfiguration - 
        - Overriding default value of property [database.mysql.enforce-utf8mb4] with value [true]
        - Overriding default value of property [FUSIONAUTH_APP_RUNTIME_MODE] with value [production]
        - Overriding default value of property [SEARCH_TYPE] with value [database]
      

      Screenshot 2025-06-09 at 1.53.38 PM.png

      1 Reply Last reply Reply Quote 0
      • A
        atakan
        last edited by

        After disabling the silent mode, the error has changed to table ownership issues. We granted FusionAuth users to table owners db-wide, and it fixed the problem. Why it appeared after the Azure DB upgrade, we don't know yet.

        mark.robustelliM 1 Reply Last reply Reply Quote 0
        • mark.robustelliM
          mark.robustelli @atakan
          last edited by

          @atakan thanks for sharing the information.

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