Nexus proxyrepo not syncing with remote hosted-repo

We have 2 Nexus OSS repositories (NEXUS-SITE-1 and NEXUS-SITE-2) with each having it’s own hosted-snapshot repository & proxy-snapshot repository to the other remote host. Having a problem with the proxy-snapshot repository not syncing with the remote hosted snapshot repository whenever a new artifact-snapshot version is uploaded the to remote hosted repository

For example:

NEXUS-SITE-1 (OSS 3.15.2.0.1)
hosted: site-1-snapshot
proxy: site-2-snapshot-proxy

NEXUS-SITE-2 (OSS 3.15.2.0.1)
hosted: site-2-snapshot
proxy: site-1-snapshot-proxy

SITE-1 Maven builds new artifact-version-SNAPSHOT and uploads it to NEXUS-SITE-1 hosted repo “site-1-snapshot”.

SITE-2 Maven build attempts to download dependent new artifact-version-SNAPSHOT from proxy repo “site-1-snapshot-proxy” but fails with error “Unable to resolve artifact. Could not transfer artifact”

To resolve this issue, I have to log-in to NEXUS and manually access the SITE-2 repo “site-1-snapshot-proxy” settings and select “Invalidate cache” and “Rebuild index”.

Am I missing something in the proxy settings: This is how it’s configured:

PROXY

  • Maximum component age: 0
  • Maximum metadata age: 0

Negative Cache

  • [unchecked] Cache resposes for content not present in the proxied repository
  • [0] How long to cache the fact that a file was not found.

Did you ever get this figured out? I’m having the same issue with npm.

Hi Ryan,

Not resolved at this time.

Thanksm

David

See the discussion in Npm proxy not getting new packages
I thought setting -1 in the metadata field would work, but perhaps not…? I set it to 1 and it’s better.

Ryan

Mine was initially set to 0. Going to change it to 1 and see what happens.

Today had the issue twice with the proxy repo settings were set to the following:

  • Maximum component age = 5
  • Maximum metadata age = 1

Changed the metadata age to 0, did not resolve the issue either.

  • Maximum component age = 5
  • Maximum metadata age = 0

Clicking on “Invalidate cache” only, did not resolve it.
To sync from the remote, had to clicked on “Rebuild index”

Not sure what else to try. No solutions found in the community for this.

Upgrade, there is a bug in 3.15.2 which is likely the problem: https://issues.sonatype.org/browse/NEXUS-19384

Hi Rich,

Will upgrade.

Thanks,

David