Nexus proxyrepo not syncing with remote hosted-repo


#1

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.

#2

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


#3

Hi Ryan,

Not resolved at this time.

Thanksm

David


#4

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.


#5

Ryan

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


#6

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.


#7

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


#8

Hi Rich,

Will upgrade.

Thanks,

David