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

System export of 4.14.2 cannot be imported onto 5.4.5

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 5.4.4
    • Fix Version/s: None
    • Component/s: Import/export
    • Labels:
      None
    • Regression:
      Yes

      Description

      While trying to migrate our production server from 4.14.2 to 5.4.5 (ZIP install), we did a clean reinstall (rather than an upgrade). IOW the following steps

      1. Install a Pro instance with 5.4.5 (called Pro-545)
      2. System export on Pro instance with 4.14.2 (called Pro-4142)
      3. Stop Pro-4142
      4. Start Pro-545
      5. System import on Pro-545 with export from step 2

      This fails at the beginning of the import with a scary stacktrace (see at the bottom).

      This seems to be a regression with 5.4.x and the new access.war. As a workaround and to proceed with our migration, we did the slightly more complicated steps below:

      1. Install a Pro instance with 5.2.1 (called Pro-521)
      2. System export on Pro instance with 4.14.2 (called Pro-4142)
      3. Stop Pro-4142
      4. Start Pro-521
      5. System import on Pro-521 with export from step 2
      6. In-place upgrade of Pro-521 to version 5.4.5 (as per https://www.jfrog.com/confluence/display/RTF/Upgrading+Artifactory#UpgradingArtifactory-ZIPInstallation)

      This worked well so our production environment is OK.

      But I fully expected the first set of steps to work, and I think this shows a recent regression with the export / import from 4.14.x to 5.4.x.
      Note that we also managed to reproduce the problem on a test environment...

      2017-07-30 14:05:07,851 [http-nio-8081-exec-8] [INFO ] (o.a.s.a.AccessServiceImpl:750) - Triggering import in access server...
      2017-07-30 14:05:07,854 [Thread-5] [INFO ] (o.a.c.c.ConfigurationManagerImpl:350) - [Node ID: 7e493b53fb907b27:-25607f21:15d935edac2:-8000] detected local modify for config 'artifactory.security.access/keys/access.creds'
      2017-07-30 14:05:07,863 [http-nio-8081-exec-8] [INFO ] (o.a.s.a.ArtifactoryAccessClientConfigStore:472) - Using Access Server URL: http://localhost:8081/access (bundled) source: detected
      2017-07-30 14:05:07,866 [http-nio-8081-exec-8] [INFO ] (o.a.s.a.AccessServiceImpl:233) - Waiting for access server...
      2017-07-30 14:05:07,926 [http-nio-8081-exec-8] [INFO ] (o.a.s.a.AccessServiceImpl:243) - Got response from Access server after 60 ms, continuing.
      2017-07-30 14:05:07,936 [http-nio-8081-exec-8] [INFO ] (o.j.a.c.AccessClientBootstrap:55) - *** Detected root certificate changed ***
      2017-07-30 14:05:08,162 [http-nio-8081-exec-8] [ERROR] (o.a.s.ArtifactoryApplicationContext:525) - Failed system import
      java.lang.RuntimeException: Failed to generate service admin token using bootstrap credentials.
      	at org.jfrog.access.client.AccessClientBootstrap.createAndStoreServiceAdminToken(AccessClientBootstrap.java:110) ~[access-client-core-2.0.2.jar:na]
      	at org.jfrog.access.client.AccessClientBootstrap.bootstrapServiceAdminToken(AccessClientBootstrap.java:79) ~[access-client-core-2.0.2.jar:na]
      	at org.jfrog.access.client.AccessClientBootstrap.<init>(AccessClientBootstrap.java:42) ~[access-client-core-2.0.2.jar:na]
      	at org.artifactory.security.access.AccessServiceImpl.initAccessService(AccessServiceImpl.java:227) ~[artifactory-core-5.4.5.jar:na]
      	at org.artifactory.security.access.AccessServiceImpl.importFrom(AccessServiceImpl.java:742) ~[artifactory-core-5.4.5.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_74]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_74]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_74]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_74]
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at com.sun.proxy.$Proxy168.importFrom(Unknown Source) ~[na:na]
      	at org.artifactory.spring.ArtifactoryApplicationContext.importFrom(ArtifactoryApplicationContext.java:518) ~[artifactory-core-5.4.5.jar:na]
      	at org.artifactory.ui.rest.service.admin.importexport.importdata.ImportSystemService.importSystem(ImportSystemService.java:176) [artifactory-rest-ui-5.4.5.jar:na]
      	at org.artifactory.ui.rest.service.admin.importexport.importdata.ImportSystemService.execute(ImportSystemService.java:95) [artifactory-rest-ui-5.4.5.jar:na]
      	at org.artifactory.rest.common.service.ServiceExecutor.process(ServiceExecutor.java:38) [artifactory-rest-common-5.4.5.jar:na]
      	at org.artifactory.rest.common.resource.BaseResource.runService(BaseResource.java:92) [artifactory-rest-common-5.4.5.jar:na]
      	at org.artifactory.ui.rest.resource.admin.importexport.ImportArtifactResource.importSystem(ImportArtifactResource.java:79) [artifactory-rest-ui-5.4.5.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_74]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_74]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_74]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_74]
      	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) [jersey-servlet-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) [jersey-servlet-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) [jersey-servlet-1.19.jar:1.19]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:185) [artifactory-web-application-5.4.5.jar:na]
      	at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:94) [artifactory-web-application-5.4.5.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:399) [artifactory-web-application-5.4.5.jar:na]
      	at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:211) [artifactory-web-application-5.4.5.jar:na]
      	at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:165) [artifactory-web-application-5.4.5.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:67) [artifactory-web-application-5.4.5.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164) [spring-session-1.2.2.RELEASE.jar:na]
      	at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) [spring-session-1.2.2.RELEASE.jar:na]
      	at org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62) [artifactory-web-application-5.4.5.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:116) [artifactory-web-application-5.4.5.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.41]
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.41]
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509) [catalina.jar:8.0.41]
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) [tomcat-coyote.jar:8.0.41]
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) [tomcat-coyote.jar:8.0.41]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524) [tomcat-coyote.jar:8.0.41]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480) [tomcat-coyote.jar:8.0.41]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_74]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_74]
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.41]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]
      Caused by: org.jfrog.access.client.AccessClientHttpException: HTTP response status 401:{"errors":[{"code":"UNAUTHORIZED","detail":"Bad credentials","message":"HTTP 401 Unauthorized"}]}
      	at org.jfrog.access.client.http.AccessHttpClient.createRestResponse(AccessHttpClient.java:312) ~[access-client-core-2.0.2.jar:na]
      	at org.jfrog.access.client.http.AccessHttpClient.restCall(AccessHttpClient.java:299) ~[access-client-core-2.0.2.jar:na]
      	at org.jfrog.access.client.http.AccessHttpClient.createToken(AccessHttpClient.java:133) ~[access-client-core-2.0.2.jar:na]
      	at org.jfrog.access.client.token.TokenClientImpl.create(TokenClientImpl.java:36) ~[access-client-core-2.0.2.jar:na]
      	at org.jfrog.access.client.AccessClientBootstrap.createAndStoreServiceAdminToken(AccessClientBootstrap.java:103) ~[access-client-core-2.0.2.jar:na]
      	... 73 common frames omitted
      2017-07-30 14:05:08,163 [http-nio-8081-exec-8] [ERROR] (o.a.u.r.s.a.i.i.ImportSystemService:146) - Error while importing system from '/projets/CASEATM/artifactory/daily/artifactory/20170729.190000': Failed system import
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              arnaud.jeansen Arnaud Jeansen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: