Apache archiva cannot connect to central

I am setting up apache archiva with easy way

archiva start

      

I am using the default internal repository to test the connection to the central one by running the following from my browser

http://localhost:8080/repository/internal/junit/junit/3.8.1/junit-3.8.1.jar

      

I get it. /logs/archiva.log

2016-04-28 13:11:42,351 [qtp957020437-29] WARN  org.apache.archiva.proxy.DefaultRepositoryProxyConnectors [] - Transfer error from repository central for artifact junit:junit:3.8.1::pom , continuing to next repository. Error message: Download failure on resource [https://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom]:Connection reset (cause: java.net.SocketException: Connection reset)
    2016-04-28 13:11:42,351 [qtp957020437-29] ERROR org.apache.archiva.webdav.ArchivaDavResourceFactory [] - Failures occurred downloading from some remote repositories:
            central: Download failure on resource [https://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom]:Connection reset (cause: java.net.SocketException: Connection reset)
    org.apache.archiva.policies.ProxyDownloadException: Failures occurred downloading from some remote repositories:
            central: Download failure on resource [https://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom]:Connection reset (cause: java.net.SocketException: Connection reset)
            at org.apache.archiva.proxy.DefaultRepositoryProxyConnectors.fetchFromProxies(DefaultRepositoryProxyConnectors.java:367) ~[archiva-proxy-2.2.0.jar:?]
            at org.apache.archiva.metadata.repository.storage.maven2.Maven2RepositoryStorage.applyServerSideRelocation(Maven2RepositoryStorage.java:670) ~[maven2-repository-2.2.0.jar:?]
            at org.apache.archiva.webdav.ArchivaDavResourceFactory.fetchContentFromProxies(ArchivaDavResourceFactory.java:818) [archiva-webdav-2.2.0.jar:?]
            at org.apache.archiva.webdav.ArchivaDavResourceFactory.processRepository(ArchivaDavResourceFactory.java:629) [archiva-webdav-2.2.0.jar:?]
            at org.apache.archiva.webdav.ArchivaDavResourceFactory.createResource(ArchivaDavResourceFactory.java:325) [archiva-webdav-2.2.0.jar:?]
            at org.apache.archiva.webdav.RepositoryServlet.service(RepositoryServlet.java:125) [archiva-webdav-2.2.0.jar:?]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet-3.0.0.v201112011016.jar:?]
            at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) [jetty-security-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.Server.handle(Server.java:370) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) [jetty-http-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-http-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667) [jetty-io-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [jetty-io-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.14.v20131031.jar:8.1.14.v20131031]
            at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.14.v20131031.jar:8.1.14.v20131031]
            at java.lang.Thread.run(Thread.java:745) [?:1.8.0_73]

      

I set up a network proxy in the archiva web interface and select it in "Remove Repository Control" / "Remote Download Index Proxy"

Also we are using a custom root security certificate that has been added to the jdk trusted repository (maven local repository works fine).

Any idea how to get it to work?

+2


source to share


2 answers


According to: here proxy doesn't work in archiva. I tried to get snapshot-2.2.1 from source, but it was too slow. Switched to Nexus



0


source


The following solution only applies to http.

  • Change the default repository entry: select "Administration"> "Repositories"> "Manage Remote Repositories"
  • click edit in the default repository entry (Name: Central Repository).
  • Change the url from https://repo.maven.apache.org/maven2 "to" http://repo.maven.apache.org/maven2 "
  • Configure your proxy server in Archiva: http: //: / # networkproxies Setting up a network proxy
  • Switch to "Administration"> "Repositories"> "Manage remote repositories"
  • click edit in the default repository entry (Name: Central Repository).
  • Find the Proxy for Remote Download Index entry and select the proxy you configured in step 1. My installation has both a proxy and http and https. enter image description here
  • Now click on "Repositories" and click on the green "Load Remote Index" button for "Central Repository" enter image description here


Again: the solution is for http only. If you want to use https, you need to download and manually import the appropriate certificates. Nexus 3 offers nice import functionality, but lacks other features and is not suitable for me.

0


source







All Articles