mod_cluster slows the JBoss EAP 5 start up process by trying to connect to down Apache httpd servers

Solution Verified - Updated -

Issue

  • JBoss is slow to start and it looks like the delay is due to the main thread taking a long time to time out in its connections to down/unavailable Apache httpd servers through mod_cluster:
12:32:04,345 TRACE [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (main) Sending command [org.jboss.modcluster.mcmp.impl.DefaultMCMPRequest{requestType=INFO,wildcard=false,jvmRoute=null,parameters={}}] to proxy [<apacheip>:6666]
12:38:22,371 INFO  [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (main) IO error sending command INFO to proxy <apacheip>:6666
java.net.ConnectException: Connection timed out
    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: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)
  • Thread dumps show the main thread stalled 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)

Environment

  • JBoss Enterprise Application Platform (EAP) 5
  • JBoss Enterprise Web Server (EWS)
    • Apache httpd
    • mod_cluster 1.0.10.GA_CP02

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In