sonatype nexus p2 repo无法从本地存储中检索artifacts.xml和content.xml

时间:2018-09-18 14:00:45

标签: eclipse maven nexus equinox p2

我已经收到源代码和说明,以在sonatype nexus中配置本地p2和maven存储库,将回购文件复制到sonatype-work / nexus / storage并以特定顺序在子文件夹中运行mvn install。 Maven存储库可以正常工作,但是尽管驱动器的相应文件夹中存在p2元数据文件(artifacts.jarartifacts.xml content.jar和content.xml),但nexus找不到它们,导致在nexus.log中记录以下错误(我将域名更改为companyname.com):

2018-09-18 14:54:54,672+0200 DEBUG [qtp1268488730-105] anonymous org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyMetadataSource - Repository eclipse-luna: retrieve item: /artifacts.xml: took 30881 ms.
2018-09-18 14:54:54,672+0200 DEBUG [qtp1268488730-105] anonymous org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyRepositoryImpl - eclipse-luna retrieveItem() :: NOT FOUND eclipse-luna:/artifacts.xml
2018-09-18 14:54:54,672+0200 DEBUG [qtp1268488730-105] anonymous org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyRepositoryImpl - Proxy repository 'eclipse-luna' is is not allowed to issue remote requests (BLOCKED_MANUAL), not adding path '/artifacts.xml' to NFC
2018-09-18 14:54:54,673+0200 WARN  [qtp1268488730-105] anonymous org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyRepositoryImpl - Could not retrieve list of repository mirrors. All downloads will come from repository canonical URL.
org.sonatype.nexus.plugins.p2.repository.proxy.P2RuntimeExceptionMaskedAsINFException: Item not found for request "ResourceStoreRequest{requestPath='https://COMPANYNAME.COM/nexus/content/groups/eclipse-luna/content.xml', requestContext=RequestContext{this=org.sonatype.nexus.proxy.RequestContext@3f86d772, parent=null}, pathStack=[], processedRepositories=[], appliedMappings={}}" in repository ""Eclipse - Luna" [id=eclipse-luna]"!
    at org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyMetadataSource.doRetrieveContentFileItems(P2ProxyMetadataSource.java:195)
    at org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyMetadataSource.doRetrieveContentFileItems(P2ProxyMetadataSource.java:56)
    at org.sonatype.nexus.plugins.p2.repository.metadata.AbstractP2MetadataSource.doRetrieveContentItems(AbstractP2MetadataSource.java:399)
    at org.sonatype.nexus.plugins.p2.repository.metadata.AbstractP2MetadataSource.doRetrieveItem(AbstractP2MetadataSource.java:307)
    at org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyRepositoryImpl.doRetrieveItem(P2ProxyRepositoryImpl.java:419)
    at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:760)
    at org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyRepositoryImpl.retrieveItem(P2ProxyRepositoryImpl.java:390)
    at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:592)
    at org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyRepositoryImpl.configureMirrors(P2ProxyRepositoryImpl.java:188)
    at org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyRepositoryImpl.doRetrieveItem(P2ProxyRepositoryImpl.java:430)
    at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:760)
    at org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyRepositoryImpl.retrieveItem(P2ProxyRepositoryImpl.java:390)
    at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:592)
    at org.sonatype.nexus.proxy.router.DefaultRepositoryRouter.retrieveItem(DefaultRepositoryRouter.java:155)
    at org.sonatype.nexus.content.internal.ContentServlet.doGet(ContentServlet.java:386)
    at org.sonatype.nexus.content.internal.ContentServlet.service(ContentServlet.java:352)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:297)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:281)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:186)
    at com.google.inject.servlet.AbstractServletPipeline.service(AbstractServletPipeline.java:65)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
    at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
    at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
    at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
    at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
    at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
    at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
    at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
    at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
    at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
    at org.sonatype.nexus.web.internal.SecurityFilter.executeChain(SecurityFilter.java:90)
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
    at com.yammer.metrics.web.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:76)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at org.sonatype.nexus.web.internal.CommonHeadersFilter.doFilter(CommonHeadersFilter.java:69)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at org.sonatype.nexus.web.internal.ErrorPageFilter.doFilter(ErrorPageFilter.java:71)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at org.sonatype.nexus.web.internal.BaseUrlHolderFilter.doFilter(BaseUrlHolderFilter.java:66)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at org.sonatype.nexus.web.internal.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:96)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterPipeline.dispatch(NexusGuiceFilter.java:56)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
    at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at com.yammer.metrics.jetty.InstrumentedHandler.handle(InstrumentedHandler.java:200)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Cannot write metadata repository. Reason: Communication with repository at https://COMPANYNAME.COM/nexus/content/groups/eclipse-luna/ failed.
    at org.sonatype.p2.bridge.internal.MetadataRepositoryService.createProxyRepository(MetadataRepositoryService.java:313)
    at org.sonatype.nexus.plugins.p2.repository.proxy.P2ProxyMetadataSource.doRetrieveContentFileItems(P2ProxyMetadataSource.java:187)
    ... 100 common frames omitted
Caused by: org.eclipse.equinox.p2.core.ProvisionException: Communication with repository at https://COMPANYNAME.COM/nexus/content/groups/eclipse-luna/ failed.
    at org.eclipse.equinox.internal.p2.repository.CacheManager.createCache(CacheManager.java:148)
    at org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory.getLocalFile(SimpleMetadataRepositoryFactory.java:66)
    at org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory.load(SimpleMetadataRepositoryFactory.java:88)
    at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57)
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:749)
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:651)
    at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
    at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
    at org.sonatype.p2.bridge.internal.MetadataRepositoryService.createProxyRepository(MetadataRepositoryService.java:283)
    ... 101 common frames omitted
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    at org.eclipse.ecf.provider.filetransfer.browse.URLFileSystemBrowser.runRequest(URLFileSystemBrowser.java:113)
    at org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser$DirectoryJob.run(AbstractFileSystemBrowser.java:69)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

当尝试运行mvn install时出现错误:

[INFO] Adding repository http://127.0.0.1:8081/nexus/content/repositories/eclipse-luna
[ERROR] Failed to resolve target definition /home/creotech/.m2/repository/COMPANYNAME/maven/Eclipse-Luna/1.0.0-M1/Eclipse-Luna-1.0.0-M1.target: Failed to load p2 metadata repository from location https://COMPANYNAME.COM/nexus/content/groups/eclipse-luna/: No repository found at http://127.0.0.1:8081/nexus/content/repositories/eclipse-luna. -> [Help 1]

我可以在浏览器http://127.0.0.1:8081/nexus/content/repositories/eclipse-luna中打开,然后看到文件和文件夹:

  • 二进制
  • 功能
  • 插件
  • artifacts.jar
  • artifacts.xml
  • content.jar
  • content.xml

我可以打开子文件夹,也可以从浏览器中下载子文件夹中的文件,但是由于错误,我无法下载根目录(工件/内容jar / xml)中的任何文件:

404 - Item not found for request "ResourceStoreRequest{requestPath='https://COMPANYNAME.COM/nexus/content/groups/eclipse-luna/content.xml', requestContext=RequestContext{this=org.sonatype.nexus.proxy.RequestContext@c1bae82, parent=null}, pathStack=[], processedRepositories=[], appliedMappings={}}" in repository ""Eclipse - Luna" [id=eclipse-luna]"!

Item not found for request "ResourceStoreRequest{requestPath='https://COMPANYNAME.COM/nexus/content/groups/eclipse-luna/content.xml', requestContext=RequestContext{this=org.sonatype.nexus.proxy.RequestContext@c1bae82, parent=null}, pathStack=[], processedRepositories=[], appliedMappings={}}" in repository ""Eclipse - Luna" [id=eclipse-luna]"!

我尝试更改关系的存储库列表以及“管理”>“服务器”中的超时时间,但没有帮助。为确保文件权限不是问题,我将权限更改为777并以root用户身份运行nexus,但它也没有帮助。另外,我尝试在此存储库以及所有存储库中依次运行任务“重建P2元数据和重建P2存储库”,但是在两种情况下,问题均保持不变。从nexus-2.14.0-01升级到2.14.9-01也没有更改与wrapper.conf中java max memory增量相同的任何内容。有什么解决方法的想法吗?

Arek

1 个答案:

答案 0 :(得分:0)

如果有人会遇到类似的问题-托管站点存储库已解决上述问题