Dears,
我正在尝试将artifactory 6.16.2升级到7.12.6(最终(,升级到最新(或更高版本(也是一种选择。
我曾尝试从6.16.2升级到7.8.8,但出现以下错误:
这是artifactory-service.err.log中出现的第一个错误:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/access]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1822)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jerseyConfig' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-application-5.7.8.jar!/org/jfrog/access/rest/config/JerseyConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'httpServiceImpl' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-core-5.7.8.jar!/org/jfrog/access/server/service/http/HttpServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'internalConfigurationServiceImpl' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-core-5.7.8.jar!/org/jfrog/access/server/service/configuration/InternalConfigurationServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessConfigurationStorageServiceImpl' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-core-5.7.8.jar!/org/jfrog/access/server/service/db/AccessConfigurationStorageServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessConfigsDao' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-core-5.7.8.jar!/org/jfrog/access/server/db/dao/AccessConfigsDao.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accessJdbcHelperImpl': Invocation of init method failed; nested exception is org.flywaydb.core.internal.dbsupport.FlywaySqlException:
Unable to insert row for version '3.15' in metadata table [dbo].[access_schema_version]
---------------------------------------------------------------------------------------
SQL State : 23000
Error Code : 515
Message : Cannot insert the value NULL into column 'installed_on', table 'artifactory_backup.dbo.access_schema_version'; column does not allow nulls. INSERT fails.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5144)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 10 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jerseyConfig' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-application-5.7.8.jar!/org/jfrog/access/rest/config/JerseyConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'httpServiceImpl' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-core-5.7.8.jar!/org/jfrog/access/server/service/http/HttpServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'internalConfigurationServiceImpl' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-core-5.7.8.jar!/org/jfrog/access/server/service/configuration/InternalConfigurationServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessConfigurationStorageServiceImpl' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-core-5.7.8.jar!/org/jfrog/access/server/service/db/AccessConfigurationStorageServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessConfigsDao' defined in URL [jar:file:/C:/tools/jfrog/artifactory/artifactory-pro-7.7.8/app/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-core-5.7.8.jar!/org/jfrog/access/server/db/dao/AccessConfigsDao.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accessJdbcHelperImpl': Invocation of init method failed; nested exception is org.flywaydb.core.internal.dbsupport.FlywaySqlException:
Unable to insert row for version '3.15' in metadata table [dbo].[access_schema_version]
---------------------------------------------------------------------------------------
SQL State : 23000
Error Code : 515
Message : Cannot insert the value NULL into column 'installed_on', table 'artifactory_backup.dbo.access_schema_version'; column does not allow nulls. INSERT fails.
有(很多(类似的
如果需要,我可以提供其他日志,我并不是真的经常升级artifactory,所以帮助解决问题也很好。。。
这是迁移日志:
2021-04-07T14:35:08 [INFO ] [migrate.bat ] [main]- Detected artifactory 6.16.2, initiating migration
*************************** STARTING MIGRATION *******************************
2021-04-07T14:35:09 [INFO ] [migrate.bat ] [main]- system.yaml will be created in path [C:toolsjfrogartifactoryartifactory-pro-7.7.8varetcsystem.yaml]
*************************** PROCESSING MIGRATION OF PROPERTY FILES *******************************
*************** Processing Migration of dbProperty ******************
2021-04-07T14:35:09 [INFO ] [migrate.bat ] [main]- File [db.properties] found in path [C:toolsjfrogartifactoryartifactory-pro-7.7.8varetcartifactoryold]
2021-04-07T14:35:10 [INFO ] [migrate.bat ] [main]- Setting [shared.database.type] with value of the property [type] in system.yaml
2021-04-07T14:35:11 [INFO ] [migrate.bat ] [main]- Setting [shared.database.driver] with value of the property [driver] in system.yaml
2021-04-07T14:35:11 [INFO ] [migrate.bat ] [main]- Setting [shared.database.url] with value of the property [url] in system.yaml
2021-04-07T14:35:12 [INFO ] [migrate.bat ] [main]- Setting [shared.database.username] with value of the property [username] in system.yaml
2021-04-07T14:35:12 [INFO ] [migrate.bat ] [main]- Setting [shared.database.password] with value of the property [password] in system.yaml
2021-04-07T14:35:12 [INFO ] [migrate.bat ] [main]- Property [pool.type] not found in the file [db.properties]
2021-04-07T14:35:13 [INFO ] [migrate.bat ] [main]- Property [pool.max.active] not found in the file [db.properties]
2021-04-07T14:35:13 [INFO ] [migrate.bat ] [main]- Property [pool.max.idle] not found in the file [db.properties]
2021-04-07T14:35:13 [INFO ] [migrate.bat ] [main]- Property [lockingdb.username] not found in the file [db.properties]
2021-04-07T14:35:13 [INFO ] [migrate.bat ] [main]- Property [lockingdb.password] not found in the file [db.properties]
2021-04-07T14:35:14 [INFO ] [migrate.bat ] [main]- Property [lockingdb.type] not found in the file [db.properties]
2021-04-07T14:35:14 [INFO ] [migrate.bat ] [main]- Property [lockingdb.url] not found in the file [db.properties]
2021-04-07T14:35:14 [INFO ] [migrate.bat ] [main]- Property [lockingdb.driver] not found in the file [db.properties]
*************** Processing Migration of haNodeProperty ******************
2021-04-07T14:35:15 [INFO ] [migrate.bat ] [main]- File [ha-node.properties] was not found in path [C:toolsjfrogartifactoryartifactory-pro-7.7.8varetcartifactoryold] to migrate
*************** Processing Migration of accessDbProperty ******************
2021-04-07T14:35:15 [INFO ] [migrate.bat ] [main]- File [db.properties] was not found in path [C:toolsjfrogartifactoryartifactory-pro-7.7.8varetcaccessold] to migrate
*************************** PROCESSING MIGRATION OF YAML FILES *******************************
*************** Processing Migration of replicatorYaml ******************
2021-04-07T14:35:16 [INFO ] [migrate.bat ] [main]- File [replicator.yaml] was not found in path [C:toolsjfrogartifactoryartifactory-pro-7.7.8varetcreplicatorold] to migrate
*************** PROCESSING MIGRATION OF XML FILES ******************
*************** Processing Migration of server.xml ******************
2021-04-07T14:35:17 [INFO ] [migrate.bat ] [main]- File [server.xml] found in path [C:toolsjfrogartifactoryartifactory-pro-7.7.8varworkold]
2021-04-07T14:35:19 [INFO ] [migrate.bat ] [main]- Setting [artifactory.port] with value [8081] in system.yaml
2021-04-07T14:35:20 [INFO ] [migrate.bat ] [main]- Setting [artifactory.tomcat.connector.maxThreads] with value [200] in system.yaml
2021-04-07T14:35:21 [INFO ] [migrate.bat ] [main]- Setting [artifactory.tomcat.connector.sendReasonPhrase] with value [true] in system.yaml
2021-04-07T14:35:22 [INFO ] [migrate.bat ] [main]- Setting [artifactory.tomcat.connector.relaxedPathChars] with value ["""[]"""] in system.yaml
2021-04-07T14:35:22 [INFO ] [migrate.bat ] [main]- Setting [artifactory.tomcat.connector.relaxedQueryChars] with value ["""[]"""] in system.yaml
2021-04-07T14:35:24 [INFO ] [migrate.bat ] [main]- Setting [artifactory.tomcat.connector.extraConfig] with connector attributes in system.yaml
2021-04-07T14:35:25 [INFO ] [migrate.bat ] [main]- Setting [access.http.port] with value [8040] in system.yaml
2021-04-07T14:35:26 [INFO ] [migrate.bat ] [main]- Setting [access.tomcat.connector.maxThreads] with value [50] in system.yaml
2021-04-07T14:35:27 [INFO ] [migrate.bat ] [main]- Setting [access.tomcat.connector.sendReasonPhrase] with value [true] in system.yaml
2021-04-07T14:35:29 [INFO ] [migrate.bat ] [main]- Artifactory 8081 and Access 8040 default port are found
*************************** MIGRATION COMPLETED SUCCESSFULLY *******************************
它最终失败了:
2021-04-07T13:08:28.578Z [1;32m[jfrt ][0;39m [1;31m[ERROR][0;39m [4a86b1b8681e3d99] [actoryContextConfigListener:91] [ocalhost-startStop-2] - Failed initializing Artifactory context: Artifactory home not initialized.
非常感谢您的帮助!!!
编辑:它在windows系统上(带有microsoft sql数据库(
编辑2:
这也是升级脚本报告的一个问题:
SQL State : S0004
Error Code : 2705
Message : Column names in each table must be unique. Column name 'router_id' in table 'access_topology' is specified more than once.
Location : db/mssql/migration/V3_15__Topology_add_router_id.sql (C:toolsjfrogartifactoryartifactory-pro-7.7.8appbinfile:C:toolsjfrogartifactoryartifactory-pro-7.7.8appartifactorytomcatwebappsaccessWEB-INFlibaccess-server-core-5.7.8.jar!dbmssqlmigrationV3_15__Topology_add_router_id.sql)
Line : 1
Statement : ALTER TABLE access_topology ADD router_id VARCHAR(255);
这两个错误是实际发生的错误(两者都多次发生(。
你能为第二个错误提供一个解决方案吗?
您可以简单地调整sql server上的模式。
更改"artifactory_backup.dbo.access_schema_version"并从"installed_on"列中删除非null约束(最适合使用sqlgui(。
或者你可以使用sql(我不能100%确定数据类型"datetime"是否正确(:
ALTER TABLE 'artifactory_backup.dbo.access_schema_version'
ALTER COLUMN installed_on datetime NULL;
这种情况发生在相当多的升级脚本中,而一些历史列会干扰这些脚本。(不仅在工艺品厂(
至于你的第二个问题:
Statement : ALTER TABLE access_topology ADD router_id VARCHAR(255);
只需从表中删除该列(再次通过mssql工具(或通过:
ALTER TABLE 'artifactory_backup.dbo.access_topology'
DROP COLUMN router_id;
这将修复该错误。