Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-28921

Browse page is empty after migrating to the New DB because Rebuild repository browse tree task fails to be stored due to long name

    XMLWordPrintable

    Details

    • Story Points:
      2
    • Sprint:
      NXRM Sentinels Sprint 19, NXRM Sentinels Sprint 20
    • Notability:
      2

      Description

      SYMPTOM:

      After successful DB migrator execution and starting the Nexus, the Browse page does not show any components/assets.
      nexus.log shows below:

      2021-09-15 10:30:32,067+1000 INFO  [FelixStartLevel]  *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Rebuild repository browse tree - (npm-group,EcommReleaseSDK,A0563-Adobe-AEM,docker,EcomReleaseCandidates,npm-registry,central,maven-central,public,AppsReleaseCandidates,A0539-Gradle,releases,EcomFeatureCandidates,snapshots,AppsReleases,jcenter,npm-private,oracle-jdk)' [create.browse.nodes] : state=RUNNING
      2021-09-15 10:30:32,073+1000 ERROR [FelixStartLevel]  *SYSTEM org.sonatype.nexus.repository.content.browse.RebuildBrowseNodesManager - Failed to determine if the browse nodes need to be rebuilt for any repositories
      java.lang.RuntimeException: org.quartz.JobPersistenceException: Couldn't store job: ERROR: value too long for type character varying(250) [See nested exception: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(250)]
              at org.sonatype.nexus.quartz.internal.QuartzSchedulerSPI.scheduleTask(QuartzSchedulerSPI.java:671)
              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 org.sonatype.nexus.scheduling.TaskSchedulerImpl.scheduleTask(TaskSchedulerImpl.java:150)
              at org.sonatype.nexus.scheduling.TaskSchedulerImpl.submit(TaskSchedulerImpl.java:123)
              at org.sonatype.nexus.repository.content.browse.RebuildBrowseNodesManager.launchNewTask(RebuildBrowseNodesManager.java:104)
              at org.sonatype.nexus.repository.content.browse.RebuildBrowseNodesManager.doStart(RebuildBrowseNodesManager.java:85)
              at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:69)
              at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
              at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
              at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:57)
              at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:199)
              at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:111)
              at org.sonatype.nexus.extender.NexusContextListener.moveToPhase(NexusContextListener.java:319)
              at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:242)
              at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1597)
              at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: org.quartz.JobPersistenceException: Couldn't store job: ERROR: value too long for type character varying(250)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1123)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport$2.executeVoid(JobStoreSupport.java:1067)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3780)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3778)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864)
              at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1063)
              at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:855)
              at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249)
              at org.sonatype.nexus.quartz.internal.QuartzSchedulerSPI.scheduleTask(QuartzSchedulerSPI.java:661)
              ... 18 common frames omitted
      Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(250)
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
              at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481)
              at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401)
              at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)
              at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:130)
              at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
              at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
              at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.insertJobDetail(StdJDBCDelegate.java:624)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1117)
              ... 27 common frames omitted
      

      CAUSE:

      The Job description max length is set to 250 characters, but Nexus tries to create a job with the description: "Rebuild repository browse tree - (repo-name1, repo-name2,...)", which can exceed 250 length limit.

      Expected

      Do not schedule a task with a name that could exceed allowed limits. There is no functional reason the task name need to include all repo names in an instance.

      WORKAROUND:

      After starting the Nexus, schedule and run the "Repair - Rebuild repository browse"

        Attachments

          Activity

            People

            Assignee:
            spryhoda Sergii Pryhoda
            Reporter:
            hosako Hajime Osako
            Last Updated By:
            Oleksii Rudyk Oleksii Rudyk
            Team:
            NXRM - Sentinels
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title