Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-34254

After DB migration, Nexus does not start with "Error attempting to get column 'destination_instance_password' from result set"

    Details

    • Notability:
      3

      Description

      SYMPTOM:

      After completing the DB migrator without any ERROR and starting Nexus, it stops immediately with the following error:

      2022-07-21 17:45:25,336+1000 ERROR [FelixStartLevel] *SYSTEM com.sonatype.nexus.replication.internal.ReplicationConnectionManagerImpl - Failed transition: NEW -> STARTED
      org.sonatype.nexus.datastore.api.DataAccessException:
      ### Error querying database.  Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'destination_instance_password' from result set.  Cause: java.lang.IllegalArgumentException: Illegal character '{' (code 0x7b) in base64 content
      ### The error may exist in com/sonatype/nexus/replication/db/datastore/ReplicationConnectionDAO.xml
      ### The error may involve com.sonatype.nexus.replication.db.datastore.ReplicationConnectionDAO.list
      ### The error occurred while handling results
      ### SQL: SELECT * FROM replication_connection;
      ### Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'destination_instance_password' from result set.  Cause: java.lang.IllegalArgumentException: Illegal character '{' (code 0x7b) in base64 content
      	at org.sonatype.nexus.datastore.mybatis.DataAccessSqlSession.unwrapMyBatisException(DataAccessSqlSession.java:125)
      	at org.sonatype.nexus.datastore.mybatis.DataAccessSqlSession.selectList(DataAccessSqlSession.java:76)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
      	at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
      	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
      	at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
      	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
      	at com.sun.proxy.$Proxy282.list(Unknown Source)
      	at com.sonatype.nexus.replication.internal.db.datastore.ReplicationConnectionStoreImpl.list(ReplicationConnectionStoreImpl.java:66)
      	at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:58)
      	at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66)
      	at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
      	at com.sonatype.nexus.replication.internal.ReplicationConnectionManagerImpl.doStart(ReplicationConnectionManagerImpl.java:62)
      	at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:69)
      	at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      	at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
      	at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:57)
      	at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:199)
      	at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:111)
      	at org.sonatype.nexus.extender.NexusContextListener.moveToPhase(NexusContextListener.java:319)
      	at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:216)
      	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1597)
      	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'destination_instance_password' from result set.  Cause: java.lang.IllegalArgumentException: Illegal character '{' (code 0x7b) in base64 content
      	at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:87)
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getPropertyMappingValue(DefaultResultSetHandler.java:512)
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.applyPropertyMappings(DefaultResultSetHandler.java:481)
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:405)
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(DefaultResultSetHandler.java:355)
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:329)
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:302)
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:195)
      	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65)
      	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
      	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
      	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
      	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89)
      	at org.sonatype.nexus.datastore.mybatis.EntityExecutor.query(EntityExecutor.java:112)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
      	at org.sonatype.nexus.datastore.mybatis.DataAccessSqlSession.selectList(DataAccessSqlSession.java:73)
      	... 22 common frames omitted
      Caused by: java.lang.IllegalArgumentException: Illegal character '{' (code 0x7b) in base64 content
      	at com.fasterxml.jackson.core.Base64Variant._reportInvalidBase64(Base64Variant.java:850)
      	at com.fasterxml.jackson.core.Base64Variant.decode(Base64Variant.java:713)
      	at com.fasterxml.jackson.core.Base64Variant.decode(Base64Variant.java:676)
      	at org.sonatype.nexus.datastore.mybatis.handlers.EncryptedStringTypeHandler.decrypt(EncryptedStringTypeHandler.java:83)
      	at org.sonatype.nexus.datastore.mybatis.handlers.EncryptedStringTypeHandler.getNullableResult(EncryptedStringTypeHandler.java:59)
      	at org.sonatype.nexus.datastore.mybatis.handlers.EncryptedStringTypeHandler.getNullableResult(EncryptedStringTypeHandler.java:1)
      	at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:85)
      	... 40 common frames omitted
      

      REPRODUCE STEPS:

      1. Install NXRM 3.40.1 with OrientDB
      2. Create some repository and setup the Repository Replication (eg: create "raw-hosted" and "raw-repl-hosted", and use "http://localhost:8081/" for target URL)
      3. Shutdown Nexus and run the DB migrator for H2 (or PostgreSQL)
      4. Confirm no error logged in DB migrator
      5. Start this migrated Nexus normally

      EXPECTED:

      If the Repository Replication is not supported with NewDB, then:

      • The document in the DB migration page and Repository Replication page should mention that
      • Either DB migrator should fail with clear error, or remove (or not migrate) the replication related records

      If the Repository Replication is supported, then DB migrator should convert the replicator user password properly.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            hosako Hajime Osako
            Last Updated By:
            Hajime Osako Hajime Osako
            Team:
            NXRM - Neo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title