【问题标题】:Sonatype nexus: unable to use http proxy after update from 2.2 to 2.10.0-02Sonatype nexus:从 2.2 更新到 2.10.0-02 后无法使用 http 代理
【发布时间】:2015-01-23 09:38:06
【问题描述】:

我们在 Windows Server 2008 R2 上使用 sonatype nexus。为了能够访问外部存储库,我们使用公司的 http 代理服务器。因此,我们在Nexus GUI->Server 中输入了值“代理主机”、“代理端口”、“用户名”和“密码”。从 Nexus 2.2 迁移到 2.10.0-02 后,nexus 服务器无法访问外部存储库。

如果我现在转到 Nexus GUI-> Repositories->Central->Browse Remote->Refresh 远程存储库不可见。 wrapper.log 包含以下日志条目(原始数据已替换为<proxyhost>:<proxyport> and <proxyuser>):

| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl - <proxyhost>:<proxyport> proxy authentication setup for remote storage with username '<proxyuser>'
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl - http proxy setup with host '<proxyhost>'
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.plugins.rrb.MavenRepositoryReader - remotePath=
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.plugins.rrb.MavenRepositoryReader - Requesting: GET http://repo1.maven.org/maven2/?delimiter=/ HTTP/1.1
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl$ManagedClientConnectionManager - Connection request: [route: {}->http://<proxyhost>:<proxyport>->http://repo1.maven.org:80][total kept alive: 1; route allocated: 1 of 20; total allocated: 2 of 200]
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl$ManagedClientConnectionManager - Connection leased: [id: 25][route: {}->http://<proxyhost>:<proxyport>->http://repo1.maven.org:80][total kept alive: 0; route allocated: 1 of 20; total allocated: 2 of 200]
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.plugins.rrb.MavenRepositoryReader - Status code: 407
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl$ManagedClientConnectionManager - Connection [id: 25][route: {}->http://<proxyhost>:<proxyport>->http://repo1.maven.org:80] can be kept alive for 30.0 seconds
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl$ManagedClientConnectionManager - Connection released: [id: 25][route: {}->http://<proxyhost>:<proxyport>->http://repo1.maven.org:80][total kept alive: 1; route allocated: 1 of 20; total allocated: 2 of 200]
| 2014-11-25 08:55:25 TRACE [qtp949677682-69] - org.sonatype.nexus.plugins.rrb.MavenRepositoryReader - <HEAD><TITLE>Proxy Authorization Required</TITLE></HEAD>
| <BODY BGCOLOR="white" FGCOLOR="black"><H1>Proxy Authorization Required</H1><HR>
| <FONT FACE="Helvetica,Arial"><B>
| Description: Authorization is required for access to this proxy</B></FONT>
| <HR>
| <!-- default "Proxy Authorization Required" response (407) -->
| </BODY>

Wireshark 捕获如下所示:

43  1.803445000 <nexus> <proxyhost> HTTP    278 GET http://repo1.maven.org/maven2/?delimiter=/ HTTP/1.1 
51  1.814045000 <nexus> <proxyhost> HTTP    278 GET http://repo1.maven.org/maven2/?delimiter=/ HTTP/1.1 
55  1.819731000 <proxyhost> <nexus> HTTP    1014    HTTP/1.1 407 Proxy Authorization Required  (text/html)

所有 GET 请求都没有任何身份验证标头。 为什么 Nexus 在 HTTP 407 之后不使用凭据重复 GET 请求?

有人有类似的问题吗?

【问题讨论】:

    标签: http proxy nexus sonatype


    【解决方案1】:

    听起来代理服务器可能配置为使用 NTLM 身份验证?尝试在代理验证中也输入“NT LAN Manager Domain”。

    【讨论】:

    • 谢谢,我进入了“NT LAN Manager 域”,现在可以正常使用了。
    猜你喜欢
    • 2015-05-18
    • 1970-01-01
    • 2021-04-11
    • 2015-02-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-21
    • 2016-08-03
    相关资源
    最近更新 更多