Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-15667

sha256 migration for mssql is broken after upgrade to Artifactory => 5.8.0

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.3.2
    • Fix Version/s: 5.9.0
    • Component/s: None
    • Labels:
      None

      Description

      sha256 migration for mssql is broken after upgrade to Artifactory => 5.8.0

      Once upgrading to Artifactory => 5.8.0 and enabling the sha256 migration, the below error is thrown:

      2018-01-16 17:44:21,443 [art-exec-3] [ERROR] (o.a.s.j.m.s.Sha256MigrationJob:418) - Failed to finalize SHA256 migration:
      java.lang.RuntimeException: Could not convert DB using v550d converter
      at org.artifactory.storage.db.version.converter.DbSqlConverterUtil.convert(DbSqlConverterUtil.java:36) ~[artifactory-common-5.8.3.jar:na]
      at org.artifactory.storage.db.version.converter.DBSqlConverter.convert(DBSqlConverter.java:49) ~[artifactory-storage-db-5.8.3.jar:na]
      at org.artifactory.storage.jobs.migration.MigrationJobBase.executeDbConversion(MigrationJobBase.java:343) [artifactory-core-5.8.3.jar:na]
      at org.artifactory.storage.jobs.migration.sha256.Sha256MigrationJob.finalizeMigrationIfNeeded(Sha256MigrationJob.java:412) [artifactory-core-5.8.3.jar:na]
      at org.artifactory.storage.jobs.migration.sha256.Sha256MigrationJob.markCompletion(Sha256MigrationJob.java:335) [artifactory-core-5.8.3.jar:na]
      at org.artifactory.storage.jobs.migration.MigrationJobBase.runMigration(MigrationJobBase.java:87) [artifactory-core-5.8.3.jar:na]
      at org.artifactory.storage.jobs.migration.MigrationJobBase.onExecute(MigrationJobBase.java:72) [artifactory-core-5.8.3.jar:na]
      at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:48) [artifactory-storage-common-5.8.3.jar:na]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.1.jar:na]
      at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:30) [artifactory-common-5.8.3.jar:na]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The index 'binaries_sha256_idx' is dependent on column 'sha256'.
      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217) ~[sqljdbc42.jar:na]
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1655) ~[sqljdbc42.jar:na]
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:885) ~[sqljdbc42.jar:na]
      at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:778) ~[sqljdbc42.jar:na]
      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505) ~[sqljdbc42.jar:na]
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2445) ~[sqljdbc42.jar:na]
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:191) ~[sqljdbc42.jar:na]
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:166) ~[sqljdbc42.jar:na]
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:703) ~[sqljdbc42.jar:na]
      at org.jfrog.storage.util.DbStatementUtils.executeSqlStream(DbStatementUtils.java:51) ~[jfrog-db-infra-1.3.14.jar:na]
      at org.artifactory.storage.db.version.converter.DbSqlConverterUtil.convert(DbSqlConverterUtil.java:31) ~[artifactory-common-5.8.3.jar:na]
      ... 12 common frames omitted
      2018-01-16 17:44:21,445 [art-exec-3] [ERROR] (o.a.s.j.m.s.Sha256MigrationJob:343) - Failed to finalize the SHA256 migration process, re-running this job (by restarting this node) may be required.

      Steps to reproduce:
      1. Configure Artifactory 5.3.2 with msssql
      2. Upload a couple of files
      3. Upgrade to 5.8.3
      4. Enable sha256 by adding the below to artifactory system properties:
      artifactory.sha2.migration.job.enabled=true
      5. You will notice the above error in the log

        Attachments

          Activity

            People

            • Assignee:
              danf Dan Feldman
              Reporter:
              mohammadt Mohammad Tibi
              Assigned QA:
              Dudi Morad
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: