javax.naming.CommunicationException: ldap.sonatype.com:636 [Root exception is java.net.ConnectException: Connection timed out: connect]

Sonatype JIRA | Rich Seddon | 7 years ago
  1. 0

    I ran the same JMeter test as in NEXUS-2803, but this time with the LDAP realm enabled. The LDAP realm is listed below the XML realms, and the anonymous user is in the XML realm (and anonymous access is enabled). I'm seeing significant access to the LDAP server. Lots of timeouts (as listed below), and far worse performance. I finally stopped the test since it hadn't finished yet in about 20 minutes (without the ldap realm this test runs in about 4 minutes in Nexus 1.4). {code} 2009-10-05 10:59:23 ERROR [qtp-11511434-11] - o.j.r.l.AbstractLda~ - LDAP naming error while attempting to authenticate user. javax.naming.CommunicationException: ldap.sonatype.com:636 [Root exception is java.net.ConnectException: Connection timed out: connect] at com.sun.jndi.ldap.Connection.<init>(Unknown Source) at com.sun.jndi.ldap.LdapClient.<init>(Unknown Source) at com.sun.jndi.ldap.LdapClient.getInstance(Unknown Source) at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source) at com.sun.jndi.ldap.LdapCtx.<init>(Unknown Source) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source) at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source) at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.ldap.InitialLdapContext.<init>(Unknown Source) at com.sonatype.security.ldap.realms.PlexusLdapContextFactory.itm(Unknown Source) at com.sonatype.security.ldap.realms.PlexusLdapContextFactory.getSystemLdapContext(Unknown Source) at com.sonatype.security.ldap.realms.ConfigurableLdapAuthenticatingRealm.queryForAuthenticationInfo(Unknown Source) at codeguard.nexusldaprealmplugin.apnpz.queryForAuthenticationInfo(Unknown Source) at org.jsecurity.realm.ldap.AbstractLdapRealm.doGetAuthenticationInfo(AbstractLdapRealm.java:186) at org.jsecurity.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:168) at org.jsecurity.authc.pam.ModularRealmAuthenticator.doMultiRealmAuthentication(ModularRealmAuthenticator.java:226) at org.jsecurity.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:278) at org.jsecurity.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:141) at org.jsecurity.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:171) at org.jsecurity.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:312) at org.jsecurity.subject.DelegatingSubject.login(DelegatingSubject.java:237) at org.sonatype.nexus.security.filter.authc.NexusHttpAuthenticationFilter.executeAnonymousLogin(NexusHttpAuthenticationFilter.java:213) at org.sonatype.nexus.security.filter.authc.NexusHttpAuthenticationFilter.onAccessDenied(NexusHttpAuthenticationFilter.java:144) at org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:145) at org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:175) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) 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.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.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source) at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.jndi.ldap.Connection.createSocket(Unknown Source) ... 50 more {code}

    Sonatype JIRA | 7 years ago | Rich Seddon
    javax.naming.CommunicationException: ldap.sonatype.com:636 [Root exception is java.net.ConnectException: Connection timed out: connect]
  2. 0

    I ran the same JMeter test as in NEXUS-2803, but this time with the LDAP realm enabled. The LDAP realm is listed below the XML realms, and the anonymous user is in the XML realm (and anonymous access is enabled). I'm seeing significant access to the LDAP server. Lots of timeouts (as listed below), and far worse performance. I finally stopped the test since it hadn't finished yet in about 20 minutes (without the ldap realm this test runs in about 4 minutes in Nexus 1.4). {code} 2009-10-05 10:59:23 ERROR [qtp-11511434-11] - o.j.r.l.AbstractLda~ - LDAP naming error while attempting to authenticate user. javax.naming.CommunicationException: ldap.sonatype.com:636 [Root exception is java.net.ConnectException: Connection timed out: connect] at com.sun.jndi.ldap.Connection.<init>(Unknown Source) at com.sun.jndi.ldap.LdapClient.<init>(Unknown Source) at com.sun.jndi.ldap.LdapClient.getInstance(Unknown Source) at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source) at com.sun.jndi.ldap.LdapCtx.<init>(Unknown Source) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source) at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source) at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.ldap.InitialLdapContext.<init>(Unknown Source) at com.sonatype.security.ldap.realms.PlexusLdapContextFactory.itm(Unknown Source) at com.sonatype.security.ldap.realms.PlexusLdapContextFactory.getSystemLdapContext(Unknown Source) at com.sonatype.security.ldap.realms.ConfigurableLdapAuthenticatingRealm.queryForAuthenticationInfo(Unknown Source) at codeguard.nexusldaprealmplugin.apnpz.queryForAuthenticationInfo(Unknown Source) at org.jsecurity.realm.ldap.AbstractLdapRealm.doGetAuthenticationInfo(AbstractLdapRealm.java:186) at org.jsecurity.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:168) at org.jsecurity.authc.pam.ModularRealmAuthenticator.doMultiRealmAuthentication(ModularRealmAuthenticator.java:226) at org.jsecurity.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:278) at org.jsecurity.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:141) at org.jsecurity.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:171) at org.jsecurity.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:312) at org.jsecurity.subject.DelegatingSubject.login(DelegatingSubject.java:237) at org.sonatype.nexus.security.filter.authc.NexusHttpAuthenticationFilter.executeAnonymousLogin(NexusHttpAuthenticationFilter.java:213) at org.sonatype.nexus.security.filter.authc.NexusHttpAuthenticationFilter.onAccessDenied(NexusHttpAuthenticationFilter.java:144) at org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:145) at org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:175) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) 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.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.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source) at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.jndi.ldap.Connection.createSocket(Unknown Source) ... 50 more {code}

    Sonatype JIRA | 7 years ago | Rich Seddon
    javax.naming.CommunicationException: ldap.sonatype.com:636 [Root exception is java.net.ConnectException: Connection timed out: connect]
  3. 0

    エミュ鯖構築方法+質問スレ - 1315916521 - メイプルエミュ鯖交流所

    shitaraba.net | 2 years ago
    java.net.ConnectException: Connection timed out: connect
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    An XMPP Server for Google Cloud Messaging | Grokking Android

    grokkingandroid.com | 1 month ago
    java.net.ConnectException: Connection timed out: connect
  6. 0

    An XMPP Server for Google Cloud Messaging | Grokking Android

    grokkingandroid.com | 9 months ago
    java.net.ConnectException: Connection timed out: connect

  1. treefolk 1 times, last 1 week ago
  2. kjhdofjosvs 20 times, last 1 week ago
  3. Andreas Häber 9 times, last 2 weeks ago
  4. Aria Pahlavan 2 times, last 2 weeks ago
  5. stigkj 10 times, last 2 weeks ago
44 more registered users
51 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.ConnectException

    Connection timed out: connect

    at java.net.PlainSocketImpl.socketConnect()
  2. Java RT
    Socket.connect
    1. java.net.PlainSocketImpl.socketConnect(Native Method)
    2. java.net.PlainSocketImpl.doConnect(Unknown Source)
    3. java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    4. java.net.PlainSocketImpl.connect(Unknown Source)
    5. java.net.SocksSocketImpl.connect(Unknown Source)
    6. java.net.Socket.connect(Unknown Source)
    6 frames
  3. Java JSSE
    SSLSocketFactoryImpl.createSocket
    1. com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    2. com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
    3. com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
    3 frames
  4. Java RT
    InitialLdapContext.<init>
    1. sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    3. java.lang.reflect.Method.invoke(Unknown Source)
    4. com.sun.jndi.ldap.Connection.createSocket(Unknown Source)
    5. com.sun.jndi.ldap.Connection.<init>(Unknown Source)
    6. com.sun.jndi.ldap.LdapClient.<init>(Unknown Source)
    7. com.sun.jndi.ldap.LdapClient.getInstance(Unknown Source)
    8. com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)
    9. com.sun.jndi.ldap.LdapCtx.<init>(Unknown Source)
    10. com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)
    11. com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)
    12. com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)
    13. com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)
    14. javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    15. javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    16. javax.naming.InitialContext.init(Unknown Source)
    17. javax.naming.ldap.InitialLdapContext.<init>(Unknown Source)
    17 frames
  5. com.sonatype.security
    ConfigurableLdapAuthenticatingRealm.queryForAuthenticationInfo
    1. com.sonatype.security.ldap.realms.PlexusLdapContextFactory.itm(Unknown Source)
    2. com.sonatype.security.ldap.realms.PlexusLdapContextFactory.getSystemLdapContext(Unknown Source)
    3. com.sonatype.security.ldap.realms.ConfigurableLdapAuthenticatingRealm.queryForAuthenticationInfo(Unknown Source)
    3 frames
  6. codeguard.nexusldaprealmplugin
    apnpz.queryForAuthenticationInfo
    1. codeguard.nexusldaprealmplugin.apnpz.queryForAuthenticationInfo(Unknown Source)
    1 frame
  7. org.jsecurity.realm
    AuthenticatingRealm.getAuthenticationInfo
    1. org.jsecurity.realm.ldap.AbstractLdapRealm.doGetAuthenticationInfo(AbstractLdapRealm.java:186)
    2. org.jsecurity.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:168)
    2 frames
  8. org.jsecurity.authc
    AbstractAuthenticator.authenticate
    1. org.jsecurity.authc.pam.ModularRealmAuthenticator.doMultiRealmAuthentication(ModularRealmAuthenticator.java:226)
    2. org.jsecurity.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:278)
    3. org.jsecurity.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:141)
    3 frames
  9. org.jsecurity.mgt
    DefaultSecurityManager.login
    1. org.jsecurity.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:171)
    2. org.jsecurity.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:312)
    2 frames
  10. org.jsecurity.subject
    DelegatingSubject.login
    1. org.jsecurity.subject.DelegatingSubject.login(DelegatingSubject.java:237)
    1 frame
  11. Nexus Core
    NexusHttpAuthenticationFilter.onAccessDenied
    1. org.sonatype.nexus.security.filter.authc.NexusHttpAuthenticationFilter.executeAnonymousLogin(NexusHttpAuthenticationFilter.java:213)
    2. org.sonatype.nexus.security.filter.authc.NexusHttpAuthenticationFilter.onAccessDenied(NexusHttpAuthenticationFilter.java:144)
    2 frames
  12. org.jsecurity.web
    OncePerRequestFilter.doFilter
    1. org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:145)
    2. org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:175)
    3. org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129)
    4. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
    5. org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57)
    6. org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382)
    7. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
    7 frames
  13. Jetty Server
    SelectChannelEndPoint.run
    1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
    2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
    3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
    7. org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    8. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    9. org.mortbay.jetty.Server.handle(Server.java:326)
    10. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
    11. org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
    12. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
    13. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    14. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    15. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    15 frames
  14. Jetty Util
    QueuedThreadPool$PoolThread.run
    1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
    1 frame