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

System import from Artifactory < 5.4 to Arifactory > 5.4 running in HA mode fails

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.4.0, 5.4.1, 5.4.2, 5.4.3, 5.4.4, 5.4.5
    • Fix Version/s: 5.6.0
    • Component/s: Import/export
    • Labels:
      None

      Description

      The following list includes HA (tested) system exports and imports that work and range of versions that do not work, contrary to the past:

      Successful imports:

      5.4.5 -> 5.4.5 works
      5.4.0 -> 5.4.5 works
      5.4.0 -> 5.4.0 works

      Failing:

      5.2.1, 5.3.2 -> 5.4.0 ,5.4.5 fails

      Evident exception (Access related) in the artifactory.log:

      2017-07-26 13:35:11,129 [http-nio-8081-exec-10] [INFO ] (o.a.u.r.s.a.i.i.ImportSystemService:163) - Importing from directory...
      2017-07-26 13:35:11,136 [http-nio-8081-exec-10] [INFO ] (o.a.s.ArtifactoryApplicationContext:481) - ### Beginning full system import ###
      2017-07-26 13:35:11,147 [http-nio-8081-exec-10] [WARN ] (o.a.v.ArtifactoryVersionReader:84) - Closest matched version: 5.3.2
      ...
      2017-07-26 13:35:11,322 [http-nio-8081-exec-10] [INFO ] (o.a.d.r.CentralConfigReader:78) - The current Artifactory config schema namespace is 'http://artifactory.jfrog.org/xsd/2.0.5' The provided config does not seem to be compliant with it.
      2017-07-26 13:35:11,324 [http-nio-8081-exec-10] [INFO ] (o.a.d.r.CentralConfigReader:58) - Converting artifactory.config.xml version from 'v203' to 'v205'
      ...
      2017-07-26 13:35:13,936 [http-nio-8081-exec-10] [INFO ] (o.a.s.ArtifactoryApplicationContext:433) - Artifactory application context set to NOT READY by reload
      2017-07-26 13:35:14,003 [http-nio-8081-exec-10] [INFO ] (o.a.a.h.p.HaPropagationServiceImpl:119) - Recovering from an invalid communication token in file '/opt/jfrog/artifactory/etc/security/communication.token' (token failed verification) - deleting the existing token file and generating a new token.
      2017-07-26 13:35:14,020 [http-nio-8081-exec-10] [ERROR] (o.a.s.a.AccessServiceImpl:322) - Failed to create token for subject 'jf-artifactory@54cec804-e78f-48b1-947f-002299fb33f4/nodes/node-f8eb00e73fe4': HTTP response status 401:{
        "errors" : [ {
          "code" : "UNAUTHORIZED",
          "message" : "Authentication required"
        } ]
      }
      2017-07-26 13:35:14,036 [http-nio-8081-exec-10] [INFO ] (o.a.s.ArtifactoryApplicationContext:433) - Artifactory application context set to READY by reload on error: Failed to create token for subject 'jf-artifactory@54cec804-e78f-48b1-947f-002299fb33f4/nodes/node-f8eb00e73fe4'.
      2017-07-26 13:35:14,050 [http-nio-8081-exec-10] [ERROR] (o.a.c.CentralConfigServiceImpl:449) - Failed to reload configuration: Failed to create token for subject 'jf-artifactory@54cec804-e78f-48b1-947f-002299fb33f4/nodes/node-f8eb00e73fe4'.
      java.lang.RuntimeException: Failed to create token for subject 'jf-artifactory@54cec804-e78f-48b1-947f-002299fb33f4/nodes/node-f8eb00e73fe4'.
      	at org.artifactory.security.access.AccessServiceImpl.createToken(AccessServiceImpl.java:324) ~[artifactory-core-5.4.5.jar:na]
      ...
      2017-07-26 13:35:14,060 [http-nio-8081-exec-10] [ERROR] (o.a.s.ArtifactoryApplicationContext:525) - Failed system import
      java.lang.RuntimeException: Failed to generate service admin token using bootstrap credentials.
      ...
      Caused by: java.lang.RuntimeException: Failed to reload configuration: Failed to create token for subject 'jf-artifactory@54cec804-e78f-48b1-947f-002299fb33f4/nodes/node-f8eb00e73fe4'.
      ...
      2017-07-26 13:35:14,062 [http-nio-8081-exec-10] [ERROR] (o.a.u.r.s.a.i.i.ImportSystemService:146) - Error while importing system from '/var/opt/jfrog/artifactory/export/20170726.132019': Failed system import
      

      Cause:
      Access Http Client is not re-initialized with the imported credentials.
      Therefore the next time Artifactory needs to generate communication.token it is failing.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                galba Gal Ben Ami
                Reporter:
                andreik Andrei Komarov
                Assigned QA:
                Anastasiya Muntyan
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: