sonatype-nexus-community / nexus-repository-composer

Composer support for the Nexus Repository Manager (work in progress!)
Eclipse Public License 1.0
222 stars 87 forks source link

Index rebuild won't finish successfully #138

Open githoober opened 1 year ago

githoober commented 1 year ago

After requesting the rebuilding composer-hosted index, the scheduled process failed to succeed with an error No facet of type ContentFacet attached to repository composer-hosted

2023-03-21 01:26:28,176+0000 INFO  [qtp379212480-786]  admin org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Repair - Rebuild repository search' [repository.rebuild-index] : state=RUNNING
2023-03-21 01:26:28,180+0000 INFO  [qtp379212480-786]  admin org.sonatype.nexus.scheduling.TaskSchedulerImpl - Task 'Repair - Rebuild repository search' [repository.rebuild-index] scheduled: now
2023-03-21 01:26:28,190+0000 INFO  [quartz-12-thread-20]  *SYSTEM org.sonatype.nexus.repository.search.index.RebuildIndexTask - Task log: /nexus-data/log/tasks/repository.rebuild-index-20230321012628187.log
2023-03-21 01:26:28,190+0000 INFO  [quartz-12-thread-20]  *SYSTEM org.sonatype.nexus.repository.content.search.elasticsearch.SearchFacetImpl - Rebuilding index of repository composer-hosted
2023-03-21 01:26:28,206+0000 INFO  [elasticsearch[07F99811-705924FF-7743F00F-F183D49A-CA3B7148][clusterService#updateTask][T#1]]  *SYSTEM org.elasticsearch.cluster.metadata - [07F99811-705924FF-7743F00F-F183D49A-CA3B7148] [18ffb221aedff62e98e358427548207a2dbfebc7] creating index, cause [api], templates [], shards [1]/[0], mappings [component]
2023-03-21 01:26:28,218+0000 ERROR [quartz-12-thread-20]  *SYSTEM org.sonatype.nexus.repository.content.search.elasticsearch.SearchFacetImpl - Unable to rebuild search index for repository composer-hosted
org.sonatype.nexus.repository.MissingFacetException: No facet of type ContentFacet attached to repository composer-hosted
    at org.sonatype.nexus.repository.manager.internal.RepositoryImpl.facet(RepositoryImpl.java:327)
    at org.sonatype.nexus.repository.content.search.elasticsearch.SearchFacetImpl.rebuildComponentIndex(SearchFacetImpl.java:156)
    at org.sonatype.nexus.repository.content.search.elasticsearch.SearchFacetImpl.rebuildIndex(SearchFacetImpl.java:147)
    at org.sonatype.nexus.repository.content.search.elasticsearch.SearchFacetImpl$$EnhancerByGuice$$436432073.GUICE$TRAMPOLINE(<generated>)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:74)
    at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
    at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
    at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:54)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
    at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)
    at org.sonatype.nexus.repository.content.search.elasticsearch.SearchFacetImpl$$EnhancerByGuice$$436432073.rebuildIndex(<generated>)
    at org.sonatype.nexus.repository.search.index.RebuildIndexTask.execute(RebuildIndexTask.java:33)
    at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:79)
    at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
    at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
    at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:145)
    at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
    at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
    at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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:750)
2023-03-21 01:26:28,220+0000 INFO  [quartz-12-thread-20]  *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Repair - Rebuild repository search' [repository.rebuild-index] state change RUNNING -> OK
2023-03-21 01:26:28,228+0000 INFO  [elasticsearch[07F99811-705924FF-7743F00F-F183D49A-CA3B7148][clusterService#updateTask][T#1]]  *SYSTEM org.elasticsearch.cluster.routing.allocation - [07F99811-705924FF-7743F00F-F183D49A-CA3B7148] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[18ffb221aedff62e98e358427548207a2dbfebc7][0]] ...]).
bsnarski-CKPL commented 1 year ago

I have the same problem. Did you manage to solve this problem? @githoober

githoober commented 1 year ago

@bsnarski

No, unfortunately, I could not find a solution to this problem.

A few tickets describe different problems related to the missing ContentFacet facet implementation. The only solution is to implement this missing functionality.

131, #117, #109

bsnarski-CKPL commented 1 year ago

@githoober Do you have implementations of this functionality ?You could share this code?

githoober commented 1 year ago

@bsnarski I don't.

Whoever created the plugin has a profound knowledge of the plugin and the Nexus application to make such an improvement.

Unfortunately, I don't have time to investigate and implement it right now.

githoober commented 1 year ago

Even if I find time and try to improve this plugin, it's not clear if there will be anyone who can approve and merge it. The development here seems dead.

pju51 commented 10 months ago

hello any news on this issue ?