Raw proxy repository that is linked/proxy to a raw group repo of a different nexus instance

Skip to first unread message

Anastasia Matienzo

unread,
Jun 8, 2017, 3:32:36 PM6/8/17
to Nexus Users
I tried to create a raw proxy repository on a nexus instance (nexusA) that's proxying a raw group repo of a different nexus instance (nexusB).

In nexusA instance, I created this repository:
name: raw-proxy
format: raw
type: proxy
remote storage: http://nexusB:port/nexus/repository/raw-group/
Http authentication check box is checked.
Authentication type: Username
Username: admin username
Password admin password

When I try to download artifacts using this proxy (tried both curl and wget. both using admin credentials for downloading), i get the following message:
HTTP request sent, awaiting response... 503 Service Unavailable
2017-06-08 14:27:38 ERROR 503: Service Unavailable.

And in the logs:
org.sonatype.nexus.repository.raw.internal.RawProxyFacet - Failed to fetch: test.rpm
org.sonatype.nexus.repository.proxy.ProxyServiceException: HTTP/1.1 401 Unauthorized
        at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.mayThrowProxyServiceException(ProxyFacetSupport.java:280) [org.sonatype.nexus.repository:3.2.0.01]
        at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:254) [org.sonatype.nexus.repository:3.2.0.01]
        at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:210) [org.sonatype.nexus.repository:3.2.0.01]
        at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:166) [org.sonatype.nexus.repository:3.2.0.01]
 
Any thought about this issue and/or creating a raw proxy repository that is proxying to a raw group repo of a different nexus instance?

Jeffry Hesse

unread,
Jun 9, 2017, 2:06:38 PM6/9/17
to Anastasia Matienzo, Nexus Users
I'm curious (because I see rpm in here), are you trying to proxy a Yum repo?

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/15b174b8-4150-4d5f-81c7-732dae89c003%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Anastasia Matienzo

unread,
Jun 9, 2017, 3:31:26 PM6/9/17
to Nexus Users, astma...@gmail.com
Not a yum repo. Just a regular raw group repo that has different files (e.g. .rpm, .html, .txt, .war).
I have two nexus instance, nexusA and nexusB.
nexusB has a raw-group repository with different files on it.. Now, i want to create a raw-proxy repo in nexusA that will proxy the raw-group repo of nexusB.
So when i download files from raw-proxy repo in nexusA, it will pull the artfacts from nexusB and cache it to nexusA..
But with this setup, i get the errors:

Jeffry Hesse

unread,
Jun 9, 2017, 4:30:52 PM6/9/17
to Anastasia Matienzo, Nexus Users
Hmmmm,

I went ahead and setup something pretty similar:

Nexus Repo A: 3.4.0-SNAPSHOT
raw-proxy
http auth: admin, admin123

Nexus Repo B: 3.1.0
raw-group

Turned off anon access to Nexus Repo B, as well. I was able to run: curl -O http://localhost:8081/repository/raw-proxy/repodata/repomd.xml

That gets me the xml file, no log spam like you are seeing. 

Our setups are likely off in some way (versions for one), mind elaborating a bit more though? Is the group on the Nexus Repo B side also sending http auth to something?

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.

Anastasia Matienzo

unread,
Jun 9, 2017, 5:28:24 PM6/9/17
to Nexus Users, astma...@gmail.com
I'm using version 3.2.0-01 for both nexusA and nexusB instances.

Setup is something like this:
raw-proxy
http auth: admin, admin123

raw-group
member:
raw-hosted (http://hostnameb:8093/nexus/repository/raw-hosted)

Tried: curl -v --user admin --password admin123 -O http://hostnamea:8093/nexus/repository/raw-proxy/test.rpm
Result: HTTP request sent, awaiting response... 503 Service Unavailable

Jeffry Hesse

unread,
Jun 9, 2017, 5:45:46 PM6/9/17
to Anastasia Matienzo, Nexus Users
If the http auth is setup on the raw-proxy, you shouldn't have to specify it via curl, unless you've also made auth a requirement on the raw-proxy on Nexus Repo A. Is that the case? Even if I remove anon access on Nexus Repo A, it works fine for me, adding the user and password on.

Also trying to replicate your curl command. Shouldn't it be curl -v -u admin:admin123 ?


I'll give it a shot with the raw-hosted in a bit. I'm hesitant to say the version should matter at all, but maybe give it a shot with a newer version of Nexus Repo as well? 

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.

praveen kurrra

unread,
Jun 11, 2017, 1:00:07 PM6/11/17
to Jeffry Hesse, Anastasia Matienzo, Nexus Users
Hi All, I have small question.

1) I upgraded from 2.14.03 to 3.2.1 . In 2.14.03 , I have lot of xml files in the repository but Xml files are not upgraded to 3.2.01. Can you please advise me how to get xml file in 3.2.01 version of sonatype nexus. Thanks

Thanks
Praveen

Jeffry Hesse

unread,
Jun 12, 2017, 1:24:13 PM6/12/17
to praveen kurrra, Anastasia Matienzo, Nexus Users
Interesting. Just for complete clarity, what repo types are you using on both ends?
Reply all
Reply to author
Forward
0 new messages