为什么nexus在缓存文件时戳远远程存储库

时间:2014-08-14 20:48:08

标签: maven nexus sonatype

我安装了nexus服务器并配置为连接到多个远程存储库。其中一个是http://www.hibernatespatial.org/repository/因为我们依赖

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-spatial</artifactId>
  <version>4.0</version>
  <type>jar</type>
</dependency>

依赖关系已解决,已下载到nexus并缓存在磁盘上。但是,即使在初始请求之后,nexus对文件的服务也很慢。我确认它是在nexus服务器上的磁盘上写的。

我启用了调试日志并跟踪了网络活动,它仍然尝试连接以删除repo:

192.168.116.040.39206-199.019.214.133.00080: GET /org/hibernate/hibernate-

spatial/4.0/hibernate-spatial-4.0.pom HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip,deflate,identity
Cache-Control: no-cache
Host: maven.jdkcn.com
Connection: Keep-Alive
User-Agent: Nexus/2.6.4-02 (OSS; Linux; 2.6.32-26-pve; i386; 1.7.0_45) apacheHttpClient4x/2.6.4-02
Cookie: JSESSIONID=3B558A150F45899EFC9B59A10665AE2A
Cookie2: $Version=1


**199.019.214.133.00080-192.168.116.040.39206: HTTP/1.0 404 Not Found**
Server: nginx/1.4.7
Date: Wed, 13 Aug 2014 21:11:56 GMT
Content-Type: text/html;charset=UTF-8
X-Cache: MISS from felicitas.8d.com
X-Cache-Lookup: MISS from felicitas.8d.com:3128
Via: 1.1 felicitas.8d.com:3128 (squid/2.7.STABLE9)
Connection: close


199.019.214.133.00080-192.168.116.040.39206: 
<html>
<head>
    <title>404</title>
</head>
<body>
    <h1>oh, not found your page.</h1>
</body>
</html>

192.168.116.040.58909-137.254.120.026.00080: GET /maven/2/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip,deflate,identity
Cache-Control: no-cache
Host: download.java.net
Connection: Keep-Alive
User-Agent: Nexus/2.6.4-02 (OSS; Linux; 2.6.32-26-pve; i386; 1.7.0_45) apacheHttpClient4x/2.6.4-02


**137.254.120.026.00080-192.168.116.040.58909: HTTP/1.0 404 Not Found**
Server: Sun-Java-System-Web-Server/7.0
Date: Wed, 13 Aug 2014 20:37:55 GMT
Content-Type: text/html
Content-Length: 292
X-Cache: MISS from felicitas.8d.com
X-Cache-Lookup: MISS from felicitas.8d.com:3128
Via: 1.1 felicitas.8d.com:3128 (squid/2.7.STABLE9)
Connection: close


137.254.120.026.00080-192.168.116.040.58909: <HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"><TITLE>Not Found</TITLE></HEAD>
<H1>Not Found</H1> The requested object does not exist on this server. The link you followed is either outdated, inaccurate, or the server has been instructed not to let you have it. 
192.168.116.040.58910-137.254.120.026.00080: GET /maven/glassfish/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip,deflate,identity
Cache-Control: no-cache
Host: download.java.net
Connection: Keep-Alive
User-Agent: Nexus/2.6.4-02 (OSS; Linux; 2.6.32-26-pve; i386; 1.7.0_45) apacheHttpClient4x/2.6.4-02


**137.254.120.026.00080-192.168.116.040.58910: HTTP/1.0 404 Not Found**
Server: Sun-Java-System-Web-Server/7.0
Date: Wed, 13 Aug 2014 20:37:55 GMT
Content-Type: text/html
Content-Length: 292
X-Cache: MISS from felicitas.8d.com
X-Cache-Lookup: MISS from felicitas.8d.com:3128
Via: 1.1 felicitas.8d.com:3128 (squid/2.7.STABLE9)
Connection: close


137.254.120.026.00080-192.168.116.040.58910: <HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"><TITLE>Not Found</TITLE></HEAD>
<H1>Not Found</H1> The requested object does not exist on this server. The link you followed is either outdated, inaccurate, or the server has been instructed not to let you have it. 
192.168.116.040.48686-107.023.147.174.00080: GET /maven2/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip,deflate,identity
Cache-Control: no-cache
Host: jasperforge.org
Connection: Keep-Alive
User-Agent: Nexus/2.6.4-02 (OSS; Linux; 2.6.32-26-pve; i386; 1.7.0_45) apacheHttpClient4x/2.6.4-02


**107.023.147.174.00080-192.168.116.040.48686: HTTP/1.0 403 Forbidden**
Date: Wed, 13 Aug 2014 21:11:57 GMT
Server: Apache/2.2.15 (CentOS)
Content-Length: 351
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from felicitas.8d.com
X-Cache-Lookup: MISS from felicitas.8d.com:3128
Via: 1.1 felicitas.8d.com:3128 (squid/2.7.STABLE9)
Connection: close


107.023.147.174.00080-192.168.116.040.48686: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /maven2/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom
on this server.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at jasperforge.org Port 80</address>
</body></html>

192.168.116.040.42250-074.205.095.173.00080: GET /artifactory/repo/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip,deflate,identity
Cache-Control: no-cache
Host: repository.pentaho.org
Connection: Keep-Alive
User-Agent: Nexus/2.6.4-02 (OSS; Linux; 2.6.32-26-pve; i386; 1.7.0_45) apacheHttpClient4x/2.6.4-02
Cookie: JSESSIONID=E432F1D78CE8B6F63C2F04F325926A34
Cookie2: $Version=1

我也在日志中看到:

2014-08-13 17:13:51 DEBUG [qtp20879656-157423 - /nexus/content/groups/public/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom] xavier org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - Item ResourceStoreRequest{requestPath='/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom', requestContext=RequestContext{this={request.address=192.168.142.59, request.isConfidential=true, request.remoteOnly=false, request.url=https://nexus.priv.8d.com:2443/nexus/content/groups/public/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom, request.user=xavier, request.localOnly=false, request.agent=Wget/1.15 (linux-gnu), request.asExpired=false, request.appRootUrl=https://nexus.priv.8d.com:2443/nexus, request.external=true}, parent=null}, pathStack=[/groups/public/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom], processedRepositories=[public], appliedMappings={}} not found in local storage.

但是,如果使用nexus管理界面中的浏览存储选项卡,我可以看到该文件。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我可能误解了你的问题,但这个错误信息意味着什么:

<h1>Forbidden</h1>
<p>You don't have permission to access /maven2/org/hibernate/hibernate-spatial/4.0/hibernate-spatial-4.0.pom
on this server.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at jasperforge.org Port 80</address>
</body></html>

所以我假设您不允许访问此存储库,或者存储库存在暂时性问题。