我们运行tomcat只运行artifactory.war,它们都运行良好,我们也使用Active Directory。但是,在将战争升级到版本5.4.6
后,无法加载。
我们使用Python工具(https://github.com/JFrogDev/artifactory-scripts/blob/master/4.x-migration/packageCheck.py
)检查了它是否具有单一存储库类型。我们在Windows上使用apache-tomcat-8.5.20
,jdk1.8.0_144
和jfrog-artifactory-oss-5.4.6.zip
(7和2008有相同的结果)
Tomcat已修改为使用正确的%JDK_HOME%
和%ARTIFACTORY_HOME%
此外,<Host>
元素已在startStopThreads="2"
中使用server.xml
进行了更新。
%TOMCAT_HOME%\lib
文件夹包含derby-10.11.1.1.jar
,
artifactory.war
和access.war
被复制到Tomcat的webapps
文件夹
当我们启动Tomcat时,迁移发生并且所有repos都被转换而没有错误,失败的是:
artifactory.log
2017-09-25 17:04:09,772 [art-init] [INFO ] (o.a.s.a.ArtifactoryAccessClientConfigStore:472) - Using Access Server URL: http://localhost:8080/access (bundled) source: detected
2017-09-25 17:04:11,484 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:233) - Waiting for access server...
2017-09-25 17:04:21,406 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:243) - Got response from Access server after 9921 ms, continuing.
2017-09-25 17:04:21,636 [art-init] [WARN ] (o.j.a.c.AccessClientBootstrap:92) - Access admin credentials not found, using default admin credentials.
2017-09-25 17:04:21,985 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:97) - Application could not be initialized: HTTP response status 401:{"errors":[{"code":"UNAUTHORIZED","detail":"Bad credentials","message":"HTTP 401 Unauthorized"}]}
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_144]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_144]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_144]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_144]
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:222) ~[artifactory-web-application-5.4.6.jar:na]
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access$2(ArtifactoryContextConfigListener.java:184) ~[artifactory-web-application-5.4.6.jar:na]
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener$1.run(ArtifactoryContextConfigListener.java:93) ~[artifactory-web-application-5.4.6.jar:na]
Caused by: org.springframework.beans.factory.BeanInitializationException: Failed to initialize bean 'org.artifactory.security.access.AccessService'.; nested exception is java.lang.RuntimeException: Failed to generate service admin token using bootstrap credentials.
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:230) ~[artifactory-core-5.4.6.jar:na]
at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:114) ~[artifactory-core-5.4.6.jar:na]
... 7 common frames omitted
Caused by: 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]
我们从jFrog到jFrog和Aaron已经建议可能是因为这个bug。 https://www.jfrog.com/jira/browse/RTFACT-14839
因此,我们按照建议使用admin
中的嵌入式Derby JDBC驱动程序从access_users
表中删除了%HOME%/.jfrog-access/data/derby
条目。我们还在bootstrap.creds
。{/ p>中放置了%HOME%/.jfrog-access/etc
个文件
bootstrap.creds
admin=plaintextadminpasswordhere
稍后我们还向artifactory.system.properties
artifactory.system.properties
artifactory.access.server.bundled=true
artifactory.access.client.serverUrl.override=http://localhost:8080/access
正如相关问题https://www.jfrog.com/jira/browse/RTFACT-14477中所建议的那样(尽管似乎不是问题)
当我们再次开始处理bootstrap.creds
文件时(它消失了),并在admin
表中创建了新的access_users
条目。然而,结果几乎完全相同:
2017-09-25 18:25:42,689 [art-init] [INFO ] (o.a.s.a.ArtifactoryAccessClientConfigStore:472) - Using Access Server URL: http://localhost:8080/access (bundled) source: system property
2017-09-25 18:25:43,600 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:233) - Waiting for access server...
2017-09-25 18:25:54,667 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:243) - Got response from Access server after 11065 ms, continuing.
2017-09-25 18:25:55,434 [art-init] [WARN ] (o.j.a.c.AccessClientBootstrap:92) - Access admin credentials not found, using default admin credentials.
2017-09-25 18:25:55,980 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:97) - Application could not be initialized: HTTP response status 401:{"errors":[{"code":"UNAUTHORIZED","detail":"Bad credentials","message":"HTTP 401 Unauthorized"}]}
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_144]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_144]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_144]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_144]
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:222) ~[artifactory-web-application-5.4.6.jar:na]
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access$2(ArtifactoryContextConfigListener.java:184) ~[artifactory-web-application-5.4.6.jar:na]
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener$1.run(ArtifactoryContextConfigListener.java:93) ~[artifactory-web-application-5.4.6.jar:na]
Caused by: org.springframework.beans.factory.BeanInitializationException: Failed to initialize bean 'org.artifactory.security.access.AccessService'.; nested exception is java.lang.RuntimeException: Failed to generate service admin token using bootstrap credentials.
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:230) ~[artifactory-core-5.4.6.jar:na]
at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:114) ~[artifactory-core-5.4.6.jar:na]
... 7 common frames omitted
Caused by: 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.6.jar:na]
at org.artifactory.security.access.AccessServiceImpl.initIfNeeded(AccessServiceImpl.java:216) ~[artifactory-core-5.4.6.jar:na]
at org.artifactory.security.access.AccessServiceImpl.init(AccessServiceImpl.java:211) ~[artifactory-core-5.4.6.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
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.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:76) ~[artifactory-storage-common-5.4.6.jar:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at com.sun.proxy.$Proxy89.init(Unknown Source) ~[na:na]
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:228) ~[artifactory-core-5.4.6.jar:na]
... 8 common frames omitted
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]
... 28 common frames omitted
2017-09-25 18:25:56,687 [http-nio-8080-exec-5] [ERROR] (o.a.w.s.ArtifactoryFilter:188) - Artifactory failed to initialize: Context is null
我们接下来应该尝试什么建议? 提前谢谢!
答案 0 :(得分:2)
我们在工作场所迁移到Artifactory 5.4时遇到了一些问题:RTFACT-14690
我的(有限的)理解是,从5.4.0开始,从artifactory.war到artifactory.war和access.war的重构和拆分为迁移开辟了很多问题。
您可以分两步进行迁移吗?
这对我们有用,很好地解决了我们的升级问题。