[jboss-user] [Remoting] - Indefinite hangs on Socket reads using secure bisocket

zackurey do-not-reply at jboss.com
Wed Jul 16 15:27:51 EDT 2008


First some environment info:
JDK 1.6.0.5, also tried 1.5.0.11
JBoss Mesaging 1.4.0.SP3
JBoss Remoting 2.2.2 SP8
OS: Centos 4.5

When committing a transaction for some rather large messages( 1MB messages at a time ), the JBoss remoting client hangs on a socket read.  Heres the thread dump:

"QuartzScheduler_Worker-22" prio=10 tid=0x08b52c00 nid=0x55f5 runnable [0x20a3e000..0x20a3fe20]
   java.lang.Thread.State: RUNNABLE
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
        at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789)
        - locked <0x364ef940> (a java.lang.Object)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:746)
        at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
        - locked <0x364f4470> (a com.sun.net.ssl.internal.ssl.AppInputStream)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
        - locked <0x364f4878> (a java.io.BufferedInputStream)
        at java.io.FilterInputStream.read(FilterInputStream.java:66)
        at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.readVersion(MicroSocketClientInvoker.java:988)
        at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:621)
        at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:418)
        at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
        at org.jboss.remoting.Client.invoke(Client.java:1634)
        at org.jboss.remoting.Client.invoke(Client.java:548)
        at org.jboss.remoting.Client.invoke(Client.java:536)
        at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
        at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
        at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$sendTransaction$aop(ClientConnectionDelegate.java:221)
        at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeNext(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
        at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:114)
        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
        at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeNext(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
        at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)

I tried setting the timeout parameter to something other than 0, like 10000, and when attempting to start up JBoss I get an error that the config does not appear to be correct and the service isn't deployed.  

I must be missing something obvious, but is there a way to push down some kind of reasonable timeout all the way down the stack so that we fail more quickly and retry again?  Only occasionally does the socket eventually timeout, but even then its about 20 minutes later.  Usually it hangs 'forever'.

Heres my remoting config, the only thing different about it other than being straight out of one of the examples is adding of a callback timeout to 30000( 30 seconds ).

  |    <mbean code="org.jboss.remoting.transport.Connector"
  |           name="jboss.messaging:service=Connector,transport=sslbisocket"
  |           display-name="SSL Bisocket Transport Connector">
  |       <attribute name="Configuration">
  |          <config>
  |             <invoker transport="sslbisocket">
  |                <!-- There should be no reason to change these parameters - warning!
  |                     Changing them may stop JBoss Messaging working correctly -->
  |                <attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
  |                <attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
  |                <attribute name="dataType" isParam="true">jms</attribute>
  |                <attribute name="socket.check_connection" isParam="true">false</attribute>
  |                <attribute name="timeout" isParam="true">0</attribute>
  |                <attribute name="callbackTimeout">30000</attribute>
  |                <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
  |                <attribute name="serverBindPort">${ssn.messaging.connector.secure.bisocket.port}</attribute>
  |                <attribute name="clientSocketClass" isParam="true">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>
  |                <attribute name="serverSocketClass">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>
  |                <attribute name="serverSocketFactory">jboss.messaging:service=ServerSocketFactory,type=SSL</attribute>
  |                <attribute name="numberOfCallRetries" isParam="true">1</attribute>
  |                <attribute name="pingFrequency" isParam="true">214748364</attribute>
  |                <attribute name="pingWindowFactor" isParam="true">10</attribute>
  |                <attribute name="onewayThreadPool">org.jboss.jms.server.remoting.DirectThreadPool</attribute>
  |                <!-- End immutable parameters -->
  |          
  |                <!-- Periodicity of client pings. Server window by default is twice this figure -->         
  |                <attribute name="clientLeasePeriod" isParam="true">10000</attribute>
  | 
  |                <!-- Number of seconds to wait for a connection in the client pool to become free -->
  |                <attribute name="numberOfRetries" isParam="true">10</attribute>
  | 
  |                <!-- Max Number of connections in client pool. This should be significantly higher than
  |                     the max number of sessions/consumers you expect -->
  |                <attribute name="JBM_clientMaxPoolSize" isParam="true">200</attribute>
  | 

Thanks in advance,
Zach 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164839#4164839

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164839



More information about the jboss-user mailing list