将 artifactory 6.x 升级到 7.12/最新版本(中间步骤 (7.8/7.5)?)?
Upgrading artifactory 6.x to 7.12/latest (with intermediate step (7.8/7.5)?)?
亲爱的,
我正在尝试将 artifactory 6.16.2 升级到 7.12.6(最终),升级到最新(或更高版本)版本也是一个选项。
我尝试从 6.16.2 升级到 7.8.8,但出现以下错误:
这是工件中出现的第一个错误-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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\system.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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\artifactory\old]
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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\artifactory\old] to migrate
*************** Processing Migration of accessDbProperty ******************
2021-04-07T14:35:15 [INFO ] [migrate.bat ] [main]- File [db.properties] was not found in path [C:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\access\old] 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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\replicator\old] 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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\work\old]
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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\app\bin\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!\db\mssql\migration\V3_15__Topology_add_router_id.sql)
Line : 1
Statement : ALTER TABLE access_topology ADD router_id VARCHAR(255);
这两个错误是实际发生的错误(都是多次)。
第二个错误你也能提供解决方案吗?
您可以简单地调整 sql 服务器上的架构。
更改 'artifactory_backup.dbo.access_schema_version' 并从 'installed_on' 列中删除非空约束(最适合 sql gui)。
或者你可以使用 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);
只需从 table 中删除列(再次通过 mssql 工具)或通过:
ALTER TABLE 'artifactory_backup.dbo.access_topology'
DROP COLUMN router_id;
这将修复该错误。
亲爱的,
我正在尝试将 artifactory 6.16.2 升级到 7.12.6(最终),升级到最新(或更高版本)版本也是一个选项。
我尝试从 6.16.2 升级到 7.8.8,但出现以下错误:
这是工件中出现的第一个错误-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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\system.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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\artifactory\old]
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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\artifactory\old] to migrate
*************** Processing Migration of accessDbProperty ******************
2021-04-07T14:35:15 [INFO ] [migrate.bat ] [main]- File [db.properties] was not found in path [C:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\access\old] 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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\etc\replicator\old] 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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\var\work\old]
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:\tools\jfrog\artifactory\artifactory-pro-7.7.8\app\bin\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!\db\mssql\migration\V3_15__Topology_add_router_id.sql)
Line : 1
Statement : ALTER TABLE access_topology ADD router_id VARCHAR(255);
这两个错误是实际发生的错误(都是多次)。
第二个错误你也能提供解决方案吗?
您可以简单地调整 sql 服务器上的架构。
更改 'artifactory_backup.dbo.access_schema_version' 并从 'installed_on' 列中删除非空约束(最适合 sql gui)。
或者你可以使用 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);
只需从 table 中删除列(再次通过 mssql 工具)或通过:
ALTER TABLE 'artifactory_backup.dbo.access_topology'
DROP COLUMN router_id;
这将修复该错误。