Yum Metadata Rebuild Failed - Sonatype Nexus Repository - Sonatype Community

Yum Metadata Rebuild Failed

post by SamJ on Feb 24

I’m running the latest version of nexus, nexus-3.89.1-02, and since recently removing an rpm from our custom yum repository we’ve been getting errors when rebuilding metadata. The rebuild task states our repository is null with our repository depth set to 2 on the repository settings and when browsing the UI I can see that the proper depth is set:

Error from “rebuild metadata task” in our logs:

2026-02-23 11:04:05,297-0600 ERROR [quartz-12-thread-7] *TASK org.sonatype.nexus.repository.yum.datastore.internal.createrepo.YumHostedMetadataFacet - Failed to rebuild metadata yum-isp-apps : /8/x86_64/ - null
2026-02-23 11:04:05,307-0600 ERROR [quartz-12-thread-7] *TASK org.sonatype.nexus.repository.yum.datastore.internal.createrepo.YumHostedMetadataFacet - Failed to rebuild metadata yum-isp-apps : /9/x86_64/ - null

UI:

repo settings with Repodata depth of 2 to reflect the // directory structure:

Is there a fix to be able to get our packages under /8/x86_64/ recognized again?


post by SamJ on Feb 26

Note a reversion back to our 3.87.0-03 build has fixed the issue with our metadata rebuild.

post by Jacob_Arcila_Cardenas on Feb 26

to identity if this is known issue with nexus-3.89.1-02 version

I will need to confirm what’s the exception, the current logging level set doesn’t give us enough information. could you please set the logging level for this class to DEBUG?

Steps

Go to settings → Support → Logging → create logger button inside the form fill the logger name as org.sonatype.nexus.repository.yum.datastore.internal.createrepo.YumHostedMetadataFacet and set the logging level to DEBUG. Run the rebuild metadata task again it should show the exception stack trace.

post by SamJ on Mar 2

Here is the full trace. It looks like the rebuild is attempting to remove packages from the directories.

Blockquote

2026-02-27 10:39:43,716-0600 DEBUG [quartz-12-thread-11] *TASK org.sonatype.nexus.repository.yum.datastore.internal.createrepo.YumHostedMetadataFacet - Trying to remove RPM /8/x86_64/bind-subscription-9.18.43-01WIN.el8.x86_64.rpm metadata if this file does not exist in repository 2026-02-27 10:39:43,717-0600 DEBUG [quartz-12-thread-11] *TASK org.sonatype.nexus.repository.yum.datastore.internal.createrepo.YumHostedMetadataFacet - Asset /8/x86_64/bind-subscription-9.18.43-01WIN.el8.x86_64.rpm found in the repository. Skip it. 2026-02-27 10:39:43,717-0600 DEBUG [quartz-12-thread-11] *TASK org.sonatype.nexus.repository.yum.datastore.internal.createrepo.YumHostedMetadataFacet - Rebuilding metadata yum-isp-apps:/8/x86_64/ 2026-02-27 10:39:43,717-0600 DEBUG [quartz-12-thread-11] *TASK org.sonatype.nexus.repository.yum.datastore.internal.createrepo.YumHostedMetadataFacet - Starting rebuilding metadata at yum-isp-apps : /8/x86_64/ 2026-02-27 10:39:43,780-0600 DEBUG [quartz-12-thread-11] *TASK org.sonatype.nexus.repository.yum.datastore.internal.createrepo.YumHostedMetadataFacet - Completed metadata rebuild in 63 2026-02-27 10:39:43,780-0600 ERROR [quartz-12-thread-11] *TASK org.sonatype.nexus.repository.yum.datastore.internal.createrepo.YumHostedMetadataFacet - Failed to rebuild metadata yum-isp-apps : /8/x86_64/ java.lang.NullPointerException: null


... (continued with the same format for rest of the posts)

## post by mpiggott on Apr 23

That error suggests that you have Nexus configured with a tmp directory it doesn’t have permission to write to.

## post by SamJ on Apr 23

Interesting, we’ve not adjusted any permissions since our initial install of sonatype 3.91-04 which the tarball deploys that directory again with permissions set to:

[root@lnclnekvm674 opt]# ll sonatype-work/nexus3/ total 55312 -rw-r--r-- 1 nexus nexus 36 Sep 4 2024 admin.password ...


## post by laurencet on Apr 23

Is it possible you mistakenly ran nexus as root/with sudo? This could cause some files to change ownership.

```bash
chown -R nexus:nexus /path/to/nexus-install-directory
chown -R nexus:nexus /path/to/nexus-data-directory