Community
Participate
Working Groups
Version 0.13.0.201102141205 We have a nexus repository that requires authentication that is accessible only via SSL and all artifacts downloaded are empty. Turning on javax.net debugging shows that the initial request to the server does not include credentials and the server responds with a 401. The connection is then dropped. Is there any way to enable pre-emptive authentication when the async http client is being used? It looks like you could do this with the old wagon transport.
Could you please tell me if the same issue occurs with the M5 build (http://download.eclipse.org/technology/m2e/updates/M) Thx
I am not able to reproduce the problem locally. In addition to the test requested by Pascal, can you provide the following * *obfuscated* settings.xml where we can see how <server> and <mirror> and/or <repository> elements are related, but not actual hostnames and passwords (obviously) * Relevant parts of AHC debug log. In my environment I have logback configured to print to STDOUT, which is default eclipse logback configuration, but you may need to do something special (we are currently working on logging infrastructure, so I am not sure what your exact build has). As a point of reference, here is my (obfuscated) test settings.xml I used to verify ssl with username/password authentication <settings> <servers> <server> <id>nexus</id> <username>XXX</username> <password>YYY</password> </server> </servers> <mirrors> <mirror> <id>nexus</id> <mirrorOf>external:*</mirrorOf> <url>https://repository.sonatype.org/content/groups/A-PRIVATE-GROUP</url> </mirror> </mirrors> </settings> Here is corresponding AHC debug log that shows auth challenge and subsequent basic auth request Request DefaultHttpRequest(chunked: false) GET /content/groups/A-PRIVATE-GROUP/org/apache/maven/archetypes/maven-archetype-quickstart/maven-metadata.xml HTTP/1.1 Host: repository.sonatype.org Pragma: no-cache Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Accept-Encoding: gzip Connection: keep-alive User-Agent: Aether Response DefaultHttpResponse(chunked: true) HTTP/1.1 401 Unauthorized Server: nginx/0.8.40 Date: Tue, 15 Feb 2011 02:22:37 GMT Transfer-Encoding: chunked Connection: keep-alive Set-Cookie: JSESSIONID=612d0c2d-f125-442f-870d-ec111f3d95f7; Path=/; HttpOnly Set-Cookie: rememberMe=deleteMe; Path=/; Expires=Mon, 14-Feb-2011 02:22:37 GMT Set-Cookie: rememberMe=deleteMe; Path=/; Expires=Mon, 14-Feb-2011 02:22:37 GMT Set-Cookie: JSESSIONID=deleteMe; Path=/; Expires=Mon, 14-Feb-2011 02:22:37 GMT WWW-Authenticate: BASIC realm="Sonatype Nexus Repository Manager" 21:22:30.203 [New I/O client worker #4-1] DEBUG c.n.h.c.p.n.NettyAsyncHttpProvider - Sending authentication to https://repository.sonatype.org/content/groups/A-PRIVATE-GROUP/org/apache/maven/archetypes/maven-archetype-quickstart/maven-metadata.xml 21:22:30.204 [New I/O client worker #4-1] DEBUG c.n.h.c.p.n.NettyAsyncHttpProvider - Cached Request [id: 0x7ec2adcb, /192.168.2.101:33667 => repository.sonatype.org/63.246.20.88:443] 21:22:35.477 [New I/O client worker #4-1] DEBUG c.n.h.c.p.n.NettyAsyncHttpProvider - Request DefaultHttpRequest(chunked: false) GET /content/groups/A-PRIVATE-GROUP/org/apache/maven/archetypes/maven-archetype-quickstart/maven-metadata.xml HTTP/1.1 Host: repository.sonatype.org Pragma: no-cache Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Accept-Encoding: gzip Authorization: Basic XXXXXXXXXXXXX Connection: keep-alive User-Agent: Aether Response DefaultHttpResponse(chunked: false) HTTP/1.1 200 OK Server: nginx/0.8.40 Date: Tue, 15 Feb 2011 02:22:43 GMT Content-Type: application/xml Connection: keep-alive Set-Cookie: JSESSIONID=9fb95d0e-c180-47ba-a8ee-4ac51ddbf6a7; Path=/; HttpOnly Set-Cookie: rememberMe=deleteMe; Path=/; Expires=Mon, 14-Feb-2011 02:22:37 GMT Last-Modified: Mon, 01 Nov 2010 00:08:09 GMT Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept Content-Length: 606
Created attachment 188973 [details] log from workspace Attached is a sample from my workspace log. It does seem to show the authentication challenge working, but failing to log in. I am pretty sure i have the correct credentials though as it works from the commandline
My settings aren't that interesting: <settings> <mirrors> <mirror> <!--This sends everything else to /public --> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>https://nexus.gbst.com/nexus/content/groups/public/</url> </mirror> </mirrors> <servers> <server> <id>nexus</id> <username>gbst</username> <password>password</password> </server> </servers> <proxies> <proxy> <id>webproxy</id> <active>true</active> <protocol>https</protocol> <host>web-proxy.gbst.net</host> <port>8080</port> </proxy> </proxies> </settings> basically, we h ave a local mirror of everything that we access via a proxy over HTTPS.
I introduced squid http proxy, I can confirm traffic flows through the proxy but still can't reproduce the problem. What is your http(s) proxy server software? Is there anything special about http proxy server configuration?
I think we are using sophos web appliance or something like that. Although we go though a proxy, the repository is on our internal network. Can you provide instructions on how to setup better logging? I don't seem to be getting that much when running the embedded maven launches. -X and -Djavax.net.debug=all is the best i can do. I am not getting any logging from maven internals.
(In reply to comment #6) > I think we are using sophos web appliance or something like that. Although we > go though a proxy, the repository is on our internal network. > > Can you provide instructions on how to setup better logging? I don't seem to > be getting that much when running the embedded maven launches. -X and > -Djavax.net.debug=all is the best i can do. I am not getting any logging from > maven internals. Do you think you can get a dump of the bytes between the client and the proxy. For a reason I can't explain the proxy seems to close the connection before AHC have chance to push the bytes. If you can't, drop me an email at jfarcand [at] apache [dot] org and I will send you an ahc version with more debug statement. Thanks!!
Where are we at on this?
(In reply to comment #8) > Where are we at on this? Hi Pascal, I sent Jean-francois the information offline as it contained some sensitive information. He provided debug builds of async http client and the aether connector. I tried replacing thejars in my installation, but it didn't seem to help. It would be great if someone could provide more details on how to enable detailed logging for the embedded maven launcher. I have just updated to M2e version 0.13.0.201102231405 (from the nightly update site)
To enable more logging, go in your workspace, navigate to .metadata/.plugins/org.eclipse.m2e.logback.configuration/, edit the most recent logback.<someNumber>.xml to change <logger name="com.ning.http.client" level="INFO" /> to <logger name="com.ning.http.client" level="DEBUG" /> I think this should do the trick to generate more data about the transport.
Thanks Pascal, it worked, but i think there is another issue. My embedded maven is displaying an error which indicates it isn't using the logger :( SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Make sure that you have the m2e logging support installed: Maven Integration for Eclipse - slf4j over logback logging (Optional) 0.13.0.201102250406 org.eclipse.m2e.logback.feature.feature.group You can get it from our Nightly repo.
Closing old/stale bugreports.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/