mohammed adbelhadi
mohammed adbelhadi

Reputation: 11

Upgrading rundeck from 4.16.0 to 5.9.0 cause a migration issue

am trying to upgrade rundeck from 4.16.0 to 5.9.0. once the new rundeck is up am getting this error:

[2025-02-18T06:01:15,362] INFO  liquibase.lockservice - Successfully released change log lock

[2025-02-18T06:01:16,187] ERROR boot.SpringApplication - Application run failed liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset core/Execution.groovy::4.x-add-uuid-and-job-uuid-indexes::rundeckdev: Reason: changelog.groovy : Index Exists Precondition: execution_uuid_idx on execution : Unknown column 'EXPRESSION' in 'field list'

here my rundeck-config.properties file:

    loglevel.default=INFO
    rdeck.base=/home/rundeck
    rss.enabled=false
    server.servlet.context-path=/
    rundeck.multiURL.enabled=false
    server.servlet.session.timeout=3600
    rundeck.security.authorization.preauthenticated.enabled=false
    rundeck.security.authorization.preauthenticated.attributeName=REMOTE_USER_GROUPS
    rundeck.security.authorization.preauthenticated.delimiter=,
    rundeck.security.authorization.preauthenticated.userNameHeader=X-Forwarded-Uuid
    rundeck.security.authorization.preauthenticated.userRolesHeader=X-Forwarded-Roles
    rundeck.security.authorization.preauthenticated.redirectLogout=false
    
 
 
 rundeck.security.authorization.preauthenticated.redirectUrl=/oauth2/sign_in
    rundeck.security.authorization.preauthenticated.userSyncEnabled=false
    rundeck.security.authorization.preauthenticated.userFirstNameHeader=X-Forwarded-User-FirstName
    rundeck.security.authorization.preauthenticated.userLastNameHeader=X-Forwarded-User-LastName
    rundeck.security.authorization.preauthenticated.userEmailHeader=X-Forwarded-User-Email
    rundeck.api.tokens.duration.max=30d 
rundeck.log4j.config.file=/home/rundeck/server/config/log4j.properties
    rundeck.gui.startpage=projectHome
    rundeck.clusterMode.enabled=true
    rundeck.metrics.enabled=false
    rundeck.metrics.jmxEnabled=false
    rundeck.security.httpHeaders.enabled=true
    rundeck.security.httpHeaders.provider.xcto.enabled=true
    rundeck.security.httpHeaders.provider.xxssp.enabled=true
    rundeck.security.httpHeaders.provider.xfo.enabled=true
    rundeck.security.httpHeaders.provider.csp.enabled=true
    rundeck.security.httpHeaders.provider.csp.config.include-xcsp- 
    header=false
    rundeck.security.httpHeaders.provider.csp.config.include- 
    xwkcsp-header=false
    rundeck.storage.provider.1.type=db
    rundeck.storage.provider.1.path=keys

==================================================================== New error appeared after applying the solution in [ stackoverflow.com/a/68629154/10426011] the Error: [2025-02-27T06:01:22,283] WARN quartzjobs.ExecutionJob - Execution 6024435 save result status: failed (attempts=6/10), retrying in 39415ms [2025-02-27T06:01:24,557] ERROR spi.SqlExceptionHelper - (conn=2895) Unknown column 'execution_uuid' in 'field list' [2025-02-27T06:01:24,564] ERROR quartzjobs.ExecutionJob - Execution 6024450 save result status: caught exception: Hibernate operation: could not execute statement; bad SQL grammar [n/a]; nested exception is java.sql.SQLSyntaxErrorException: (conn=2895) Unknown column 'execution_uuid' in 'field list' org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute statement; bad SQL grammar [n/a]; nested exception is java.sql.SQLSyntaxErrorException: (conn=2895) Unknown column 'execution_uuid' in 'field list'

Upvotes: 1

Views: 89

Answers (1)

MegaDrive68k
MegaDrive68k

Reputation: 4370

This instance needs a migration described here.

  1. Backup your rundeck database

  2. Add the following two properties in the rundeck-config.properties file:

dataSource.dbCreate=update
grails.plugin.databasemigration.updateOnStart=false
  1. Start the Rundeck service.
  2. Once Rundeck is fully started, Stop the Rundeck service.
  3. Remove the previously added dataSource.dbCreate=update setting from the rundeck-config.properties file.
  4. Change the grails.plugin.databasemigration.updateOnStart setting to =true.
  5. Restart the Rundeck service.

Upvotes: 0

Related Questions