Discussion:
Nexus repository inaccessible by Maven, but by HTTP-Browser and wget
Kay
2011-03-02 10:59:40 UTC
Permalink
Hello!

I have set up an internal Nexus repository from the bundle
nexus-oss-webapp-1.9.0.1-bundle.tar.gz.

I have added proxy repositories as well as hosted ones and address the
Nexus instance via the entry (the port 8081 had to be changed to 8181
due to concurrency)


nexus-central
Internal Nexus
http://repo-host:8181/nexus/content/groups/public
*


There are no additional repositories or mirrors configured in
settings.xml. The Nexus-repository connects to the net via a
http-proxy.

I can use the repository to build on repo-host.

On another host "sec-host", which can access repo-host without a
http-proxy, using the same settings.xml as on repo-host, I am running
into problems right at Maven's first attempt to access the Nexus
instance:

------------------------------------------------------------------------
$ mvn

[...]

Downloading:
http://repo-host:8181/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom

[WARNING] Unable to get resource
'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' from repository
central (http://repo1.maven.org/maven2): Error transferring file: Server
returned HTTP response code: 504 for URL:
http://repo-host:8181/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom
------------------------------------------------------------------------

I can administer and browse the Nexus server from a http-browser
started on sec-host via the URL http://repo-host:8181/nexus. Also, on
sec-host I can successfully issue

wget
http://repo-host:8181/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom

and download the file.

There are no proxies configured in /etc/wgetrc, and, as already
mentioned, the connection between the two machines does not need an
http-Proxy. I have verified this by deactivating http-Proxies in the
Browser on sec-host: no connection to external http-addresses (as
expected), but I can still browse http://repo-host:8181/nexus.

So it does not seem to be a network problem. Is there some access
control on the Nexus level which causes the inaccessibility? I could
not find a related entry in the documentation.

Thanks for hints!
Kay


--
View this message in context: http://maven.40175.n5.nabble.com/Nexus-repository-inaccessible-by-Maven-but-by-HTTP-Browser-and-wget-tp3406368p3406368.html
Sent from the Nexus Maven Repository Manager Users List mailing list archive at Nabble.com.
Kay
2011-03-02 11:02:41 UTC
Permalink
Sorry for the broken formatting. This is the properly cited entry in the
settings.xml:




nex-central
Internal Nexus
http://repo-host:8181/nexus/content/groups/public
*




--
View this message in context: http://maven.40175.n5.nabble.com/Nexus-repository-inaccessible-by-Maven-but-by-HTTP-Browser-and-wget-tp3406368p3406371.html
Sent from the Nexus Maven Repository Manager Users List mailing list archive at Nabble.com.
Kay
2011-03-02 12:47:51 UTC
Permalink
Hello again!

Here is the log outout (I did not find it, because I was looking for the
file

${plexus.nexus-work}/logs/nexus.log

from the log-configuration-window. It is wrapper.log, anyway.

So at last here's the log output after trying to access from sec-host:

jvm 1 | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
uri=
jvm 1 | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
fields=

jvm 1 |
jvm 1 | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
EXCEPTION
jvm 1 | HttpException(400,null,null)
jvm 1 | at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:361)
jvm 1 | at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
jvm 1 | at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
jvm 1 | at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
jvm 1 | at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
jvm 1 | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
BAD
jvm 1 | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
uri=
jvm 1 | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
fields=

jvm 1 |
jvm 1 | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
EXCEPTION
jvm 1 | HttpException(400,null,null)
jvm 1 | at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:361)
jvm 1 | at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
jvm 1 | at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
jvm 1 | at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
jvm 1 | at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
jvm 1 | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
BAD

--
View this message in context: http://maven.40175.n5.nabble.com/Nexus-repository-inaccessible-by-Maven-but-by-HTTP-Browser-and-wget-tp3406368p3406492.html
Sent from the Nexus Maven Repository Manager Users List mailing list archive at Nabble.com.
Brian Demers
2011-03-03 19:52:39 UTC
Permalink
A 504 means your connecting through a proxy but the connection timed
out. It sounds like your saying your connection should not be going
through a reverse proxy, take a look and see why it is first. If you
can access Nexus directly and still get an error, let us know.
Post by Kay
Hello again!
Here is the log outout (I did not find it, because I was looking for the
file
${plexus.nexus-work}/logs/nexus.log
from the log-configuration-window. It is wrapper.log, anyway.
jvm 1    | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
uri=
jvm 1    | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
fields=
jvm 1    |
jvm 1    | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
EXCEPTION
jvm 1    | HttpException(400,null,null)
jvm 1    |      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:361)
jvm 1    |      at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
jvm 1    |      at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
jvm 1    |      at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
jvm 1    |      at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
jvm 1    | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
BAD
jvm 1    | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
uri=
jvm 1    | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
fields=
jvm 1    |
jvm 1    | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
EXCEPTION
jvm 1    | HttpException(400,null,null)
jvm 1    |      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:361)
jvm 1    |      at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
jvm 1    |      at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
jvm 1    |      at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
jvm 1    |      at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
jvm 1    | 2011-03-02 13:44:02 DEBUG [qtp-755799207-0] - org.mortbay.log -
BAD
--
View this message in context: http://maven.40175.n5.nabble.com/Nexus-repository-inaccessible-by-Maven-but-by-HTTP-Browser-and-wget-tp3406368p3406492.html
Sent from the Nexus Maven Repository Manager Users List mailing list archive at Nabble.com.
---------------------------------------------------------------------
Kay
2011-03-04 10:47:17 UTC
Permalink
Hello!

The problem is solved. Contrary to my assumption and quite as you
said, a proxy is used. The problem occurred only on Windows clients
(this was established after my initial report). I thought, the use of a
proxy was deactivated in settings.xml



------------------------------------------------------------------------
1) Excerpts from settings.xml
------------------------------------------------------------------------



true
http
123.456.789.123
81
localhost|repo-host.mydomain.com






my-nexus
Nexus
http://repo-host:8181/nexus/content/groups/public
*



------------------------------------------------------------------------

1) does not work

------------------------------------------------------------------------
2) Excerpts from settings.xml
------------------------------------------------------------------------



true
http
123.456.789.123
81
localhost|repo-host.mydomain.com





my-nexus
Nexus
http://repo-host.mydomain.com:8181/nexus/content/groups/public
*



------------------------------------------------------------------------

2) does work.



So the hostname in has to be exactly the same as in
the link. When setting both to repo-host, it works, too.

Interesting, that this does not happen under Linux.

Great thanks for forcing me to go on looking in a direction I thought
to be eliminated!

Kay

--
View this message in context: http://maven.40175.n5.nabble.com/Nexus-repository-inaccessible-by-Maven-but-by-HTTP-Browser-and-wget-tp3406368p3409263.html
Sent from the Nexus Maven Repository Manager Users List mailing list archive at Nabble.com.
Loading...