nexus-public icon indicating copy to clipboard operation
nexus-public copied to clipboard

Proxy Error when downloading package from group repository

Open NickRafRGA opened this issue 1 year ago • 6 comments

I have a group repo called “chocolatey-all” which contains 2 members a hosted repository called “chocolatey-hosted” and a proxy repo called “chocolatey-proxy” which is a proxy for https://community.chocolatey.org/api/v2/.

When I attempt to download the latest vmware-tools package from the chocolatey-all group repository using the following url

http://my-nexus-instance.net/repository/chocolatey-all/Packages()?$filter=(tolower(Id)%20eq%20%27vmware-tools%27)%20and%20IsLatestVersion&semVerLevel=2.0.0

I get the error below 90% of the time and the cpu on the server I’m hosting nexus on spikes

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request [GET /repository/chocolatey-all/Packages()](https://nexus.rgare.net/repository/chocolatey-all/Packages()).

Reason: Error reading from remote server

However when I run the same command against the proxy repository it works as expected.

http://my-nexus-instance.net/repository/chocolatey-proxy/Packages()?$filter=(tolower(Id)%20eq%20%27vmware-tools%27)%20and%20IsLatestVersion&semVerLevel=2.0.0

I’ve tried invalidating the cache on the group repo with no luck.

Version: nexus OSS 3.64.0-04 OS: RHEL7 Database: OrientDB

NickRafRGA avatar Feb 07 '24 19:02 NickRafRGA

I can't reproduce your error, but as a very stupid suggestion, could you drop the trailing / off of https://community.chocolatey.org/api/v2 and try your test again please? I'm wondering if it's cloudflare doing weird things with the traffic because of the trailing slash.

steviecoaster avatar Feb 08 '24 01:02 steviecoaster

@steviecoaster Thanks for the suggestion. We just had a chance to try and saw the same issue. Worked fine when we ran the query against the proxy repo, but failed on on the grouped nuget repo.

mtaul-RGA avatar Feb 09 '24 14:02 mtaul-RGA

I will add as well that when I remove our hosted Nuget repo from the group, the queries succeed with no problem. It only seems to occur when the Chocolatey proxy repo and hosted repo are in the same group.

mtaul-RGA avatar Feb 09 '24 14:02 mtaul-RGA

@nblair @mrprescott does NEXUS-39665 pertain to this issue?

mtaul-RGA avatar Feb 14 '24 15:02 mtaul-RGA

@mtaul-RGA NEXUS-39665 was marked as being fixed in release 3.65.0; can you try an upgrade to latest to see if it's resolved for you?

nblair avatar May 21 '24 20:05 nblair

Jumping in here for @mtaul-RGA and @NickRafRGA...

We have Apache httpd sitting in front of our NXRM install. The HTTP 502 error is being returned by Apache httpd, not by NXRM. If you bypass Apache and hit NXRM directly the error goes away.

Short term it seems the fix is to increase the timeout in Apache httpd. We've not yet migrated to Postgres for our NXRM DB which I'm assuming would help speed up these transactions.

I think it is fair to close this issue at this time. If we update our NXRM architecture and continue to have performance issues we'll open a new issue / support case.

rgajason avatar Jun 06 '24 14:06 rgajason

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Aug 06 '24 01:08 github-actions[bot]