Uploaded image for project: 'Archiva (Retired)'
  1. Archiva (Retired)
  2. MRM-1488

Using Archiva as proxy for downloading artifacts is very slow when used with LDAP authentication

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.4-M1
    • remote proxy
    • None

    Description

      Ran mvn clean install on a local checkout of Archiva Parent project:

      • LDAP, clean local repo and clean proxy repo: ~1hr
      • LDAP, clean local repo and populated proxy repo: ~30mins
      • database, clean local repo and clean proxy repo: 9mins
      • database, clean local repo and populated proxy repo: 20s

      I removed any Repository Observer role access for the guest account btw, so all artifact requests go through authentication.

      When configured with LDAP, the build hanged at times and I had to cancel it. I noticed this happens when there's a problem connecting to the LDAP server. I saw the following error in the Archiva logs:

      2011-08-04 17:15:56,226 [btpool0-4] WARN  org.codehaus.plexus.redback.authentication.ldap.LdapBindAuthenticator  - failed to get a ldap connection Could not connect to the server.
      org.codehaus.plexus.redback.common.ldap.connection.LdapException: Could not connect to the server. [Root exception is javax.naming.CommunicationException: myldap.server.host:PORT [Root exception is java.net.ConnectException: Connection refused]]
      	at org.codehaus.plexus.redback.common.ldap.connection.LdapConnection.<init>(LdapConnection.java:88)
      	at org.codehaus.plexus.redback.common.ldap.connection.ConfigurableLdapConnectionFactory.getConnection(ConfigurableLdapConnectionFactory.java:133)
      	at org.codehaus.plexus.redback.authentication.ldap.LdapBindAuthenticator.getLdapConnection(LdapBindAuthenticator.java:150)
      	at org.codehaus.plexus.redback.authentication.ldap.LdapBindAuthenticator.authenticate(LdapBindAuthenticator.java:94)
      	at org.codehaus.plexus.redback.authentication.DefaultAuthenticationManager.authenticate(DefaultAuthenticationManager.java:84)
      	at org.codehaus.plexus.redback.system.DefaultSecuritySystem.authenticate(DefaultSecuritySystem.java:94)
      	at org.codehaus.redback.integration.filter.authentication.HttpAuthenticator.authenticate(HttpAuthenticator.java:65)
      	at org.codehaus.redback.integration.filter.authentication.basic.HttpBasicAuthentication.getAuthenticationResult(HttpBasicAuthentication.java:85)
      	at org.apache.maven.archiva.webdav.ArchivaDavSessionProvider.attachSession(ArchivaDavSessionProvider.java:59)
      	at org.apache.maven.archiva.webdav.RepositoryServlet.service(RepositoryServlet.java:111)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
      	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
      	at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
      	at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
      	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
      	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
      	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.Server.handle(Server.java:326)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
      	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
      Caused by: javax.naming.CommunicationException: myldap.server.host:PORT [Root exception is java.net.ConnectException: Connection refused]
      	at com.sun.jndi.ldap.Connection.<init>(Connection.java:210)
      	at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118)
      	at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1580)
      	at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2652)
      	at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293)
      	at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
      	at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
      	at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
      	at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
      	at org.codehaus.plexus.redback.common.ldap.connection.LdapConnection.<init>(LdapConnection.java:84)
      	... 37 more
      Caused by: java.net.ConnectException: Connection refused
      	at java.net.PlainSocketImpl.socketConnect(Native Method)
      	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
      	at java.net.Socket.connect(Socket.java:529)
      	at java.net.Socket.connect(Socket.java:478)
      	at java.net.Socket.<init>(Socket.java:375)
      	at java.net.Socket.<init>(Socket.java:189)
      	at com.sun.jndi.ldap.Connection.createSocket(Connection.java:352)
      	at com.sun.jndi.ldap.Connection.<init>(Connection.java:187)
      	... 46 more
      

      Attachments

        Issue Links

          Activity

            People

              oching Maria Odea B. Ching
              oching Maria Odea B. Ching
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: