我一直在sha256_migration.log中遇到以下错误消息。失败后它不会重新启动,但是,如果我重新启动工件服务,它将从中断处开始进行SHA256迁移,直到再次失败。
2018-11-13 10:24:35,060 [art-exec-3] [ERROR] (o.a.s.j.m.s.Sha256MigrationJob:78) - Caught unexpected exception during SHA256 Migration job, operation will break.
org.springframework.core.task.TaskRejectedException: Executor [org.artifactory.schedule.ArtifactoryConcurrentExecutor@70a2137a] did not accept task: org.artifactory.schedule.aop.AsyncAdvice$$Lambda$654/1640835804@7dbf55d3
at org.springframework.core.task.support.TaskExecutorAdapter.submit(TaskExecutorAdapter.java:93)
at org.springframework.scheduling.concurrent.ConcurrentTaskExecutor.submit(ConcurrentTaskExecutor.java:143)
at org.artifactory.schedule.aop.AsyncAdvice.submitWorkQueueTask(AsyncAdvice.java:235)
at org.artifactory.schedule.aop.AsyncAdvice.submit(AsyncAdvice.java:217)
at org.artifactory.schedule.aop.AsyncAdvice.executeInvocation(AsyncAdvice.java:146)
at org.artifactory.schedule.aop.AsyncAdvice.invoke(AsyncAdvice.java:124)
at org.artifactory.schedule.aop.AsyncAdvice.invoke(AsyncAdvice.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy144.updateSha2(Unknown Source)
at org.artifactory.storage.jobs.migration.sha256.Sha256MigrationJob.migrationLogic(Sha256MigrationJob.java:134)
at org.artifactory.storage.jobs.migration.MigrationJobBase.migrationLoop(MigrationJobBase.java:106)
at org.artifactory.storage.jobs.migration.MigrationJobBase.runMigration(MigrationJobBase.java:83)
at org.artifactory.storage.jobs.migration.MigrationJobBase.onExecute(MigrationJobBase.java:73)
at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:48)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:30)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.RejectedExecutionException: Task org.artifactory.concurrent.ArtifactoryRunnable@4afb003 rejected from java.util.concurrent.ThreadPoolExecutor@33daf5aa[Running, pool size = 64, active threads = 64, queued tasks = 10000, completed tasks = 120723]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
at org.artifactory.schedule.ArtifactoryConcurrentExecutor.execute(ArtifactoryConcurrentExecutor.java:69)
at org.springframework.core.task.support.TaskExecutorAdapter.submit(TaskExecutorAdapter.java:88)
... 19 common frames omitted
关于sha256migration的我artifactory.system.properties
##SHA2 Migration block
artifactory.sha2.migration.job.enabled=true
artifactory.sha2.migration.job.queue.workers=100
我的设置:
我没有运气尝试过的事情:
我所知道的:
我的问题:
-解决方法-
我最终创建了一个新的VM,并安装了完整副本Artifactory 6.5.3(以及最新的Oracle Java 8 Server-JRE)。在上述问题中,我只是在一个新文件夹中进行了就地升级。
我将etc中的必要文件移至了新的VM;例如master.key,binarystore.xml,db.properties等。然后执行bin / installService.sh [user] [group],这将创建/ etc / opt / jfrog / artifactory配置symlink / folder移动。我的文件存储和工件数据库在不同的VM上运行,因此仅需要移植Artifactory及其文件配置。
新的Artifactory 6.5.3版本启动没有问题。
sha256migrationjob实际上正在运行,没有任何问题。我上次执行升级时,运行正常,而且没有死光。
注意:我也确实调整了队列工作器上的配置值。 https://www.jfrog.com/confluence/display/RTF/Checksum-Based+Storage#Checksum-BasedStorage-ConfiguringtheMigrationProcess
答案 0 :(得分:0)
tl; dr将artifactory.sha2.migration.job.queue.workers
减少到大约2 * 2 *内核数。
您正在经历的是ThreadPoolExecutor的耗尽。 默认情况下,线程池的大小为4 * [核数]。 在您的情况下为64(16核* 4)
但是,为sha256迁移作业配置的线程数限制为100。
在没有任何负载的人工实例上,这不会导致任何失败,因为有一个队列在备份线程拉取(在您的情况下,大小为10000)。
在您的情况下,线程提取和队列已满。
如果我理解正确,那么您已经解决了这个问题。但是对于其他陷入该线程的人,我建议将artifactory.sha2.migration.job.queue.workers
的值减小到不超过线程拉线程数的一半。
所以在您的情况下,是32:(16 * 4)/ 2