[mod_cluster-issues] [JBoss JIRA] (MODCLUSTER-321) mod_cluster doesn't properly use timeouts in initial proxyList connection attempts
Jean-Frederic Clere (JIRA)
jira-events at lists.jboss.org
Wed Sep 5 10:34:33 EDT 2012
[ https://issues.jboss.org/browse/MODCLUSTER-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716084#comment-12716084 ]
Jean-Frederic Clere commented on MODCLUSTER-321:
------------------------------------------------
it is fixed by r898
> mod_cluster doesn't properly use timeouts in initial proxyList connection attempts
> ----------------------------------------------------------------------------------
>
> Key: MODCLUSTER-321
> URL: https://issues.jboss.org/browse/MODCLUSTER-321
> Project: mod_cluster
> Issue Type: Bug
> Affects Versions: MOD_CLUSTER_1_0_10_GA_CP02
> Environment: JBoss Enterprise Application Platform (EAP) 5.1.2
> JBoss Enterprise Web Server (EWS)
> mod_cluster 1.0.10.GA_CP02
> Reporter: Aaron Ogburn
> Assignee: Jean-Frederic Clere
> Priority: Minor
> Fix For: MOD_CLUSTER_1_0_10_GA_CP03
>
>
> mod_cluster doesn't properly use timeouts in initial proxyList connection attempts when JBoss is starting. This can delay start up by several minutes at a time as the main thread stalls in the following call:
> "main" prio=10 tid=0x000000004318d800 nid=0x4085 runnable [0x0000000041822000]
> java.lang.Thread.State: RUNNABLE
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
> - locked <0x00000000f093e6a8> (a java.net.SocksSocketImpl)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> 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:218)
> at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:212)
> at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy.getConnection(DefaultMCMPHandler.java:1141)
> - locked <0x00000000f08aa980> (a org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy)
> at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy.getConnectionWriter(DefaultMCMPHandler.java:1166)
> - locked <0x00000000f08aa980> (a org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy)
> at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:776)
> at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:875)
> - locked <0x00000000f08aa980> (a org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy)
> at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:465)
> at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.init(DefaultMCMPHandler.java:140)
> at org.jboss.modcluster.CatalinaEventHandler.init(CatalinaEventHandler.java:113)
> - locked <0x00000000ffdbaac0> (a org.jboss.modcluster.CatalinaEventHandler)
> at org.jboss.modcluster.CatalinaEventHandler.init(CatalinaEventHandler.java:56)
> at org.jboss.modcluster.CatalinaEventHandlerAdapter.lifecycleEvent(CatalinaEventHandlerAdapter.java:127)
> at org.jboss.modcluster.AbstractModClusterService.lifecycleEvent(AbstractModClusterService.java:90)
> at org.jboss.web.tomcat.service.deployers.MicrocontainerIntegrationLifecycleListener.lifecycleEvent(MicrocontainerIntegrationLifecycleListener.java:102)
> at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:741)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
> This happens because DefaultMCMPHandler$Proxy.getConnection hands the address/port straight to the socket factory and so Socket.connect is called without any timeout. Instead, DefaultSocketFactory.createSocket should be called without a given ip/port so that the returned Socket can then be bound with a proper timeout through Socket.connect(SocketAddress endpoint, int timeout). mod_cluster 1.2 currently already does this.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the mod_cluster-issues
mailing list