репозиторий sonatype nexus p2 не может получить artifacts.xml & content.xml из локального хранилища - PullRequest
0 голосов
/ 18 сентября 2018

Я получил исходный код и инструкцию по настройке локальных репозиториев p2 и maven в sonatype nexus, копированию файлов репозитория в sonatype-work / nexus / storage и запуску mvn install в подпапках в определенном порядке.Репозитории Maven работают нормально, но хотя файлы метаданных p2 существуют в соответствующей папке на диске (artifacts.jar artifacts.xml content.jar и content.xml), нексус не может найти их, что приводит к следующей ошибке, зарегистрированной в 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 я получил ошибку:

[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 и запустил nexus от имени пользователя root, но это также не помогло.Кроме того, я попытался запустить задачи Rebuild P2 метаданные и Rebuild P2 репозиторий в этом репо, а затем во всех репозиториях, но в обоих случаях проблема осталась прежней.Обновление с nexus-2.14.0-01 до 2.14.9-01 также не изменило ничего такого же, как увеличение памяти java max в файле wrapper.conf.Есть идеи как это решить?

Arek

1 Ответ

0 голосов
/ 21 сентября 2018

если у кого-то возникнет подобная проблема - хранилище сайта решило проблему выше

...