[jboss-user] [JBoss Remoting] - Re: WorkerThread exception occured .... InvocationTargetException / SocketTimeoutException

red Car do-not-reply at jboss.com
Fri Mar 23 04:47:12 EDT 2012


red Car [https://community.jboss.org/people/redCar] created the discussion

"Re: WorkerThread exception occured .... InvocationTargetException / SocketTimeoutException"

To view the discussion, visit: https://community.jboss.org/message/725850#725850

--------------------------------------------------------------
Hallo,

now we have tried to attach jboss to another network interface. We enabled a second network card with another ip. Then I started the jboss with -b <another IP>.
I wondered, that this do not help. I thought, Ports are unique to a network-card-ip.

Now I have installed the JBoss on another server where he can work alone. This works fine. But I'm looking for another solution. 

Is there any possibility, to reduce the number of request-ports?
At the moment I am experimenting with pooled Invoker.

In conf/standardjboss.xml I have changed the sections for stateless and statefull ejb:

|  | <invoker-proxy-binding> |
|    | <name>stateful-pooled-invoker</name> |
|    | <invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean> |
|    | <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory> |
|    | <proxy-factory-config> |
|      | <client-interceptors> |
|        | <home> |
|          | <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor> |
|          | <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor> |
|          | <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor> |
|        | </home> |
|        | <bean> |
|          | <interceptor>org.jboss.proxy.ejb.StatefulSessionInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor> |
|          | <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor> |
|          | <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor> |
|        | </bean> |
|      | </client-interceptors> |
|    | </proxy-factory-config> |
|  | </invoker-proxy-binding> |


|  | <invoker-proxy-binding> |
|    | <name>stateless-pooled-invoker</name> |
|    | <invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean> |
|    | <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory> |
|    | <proxy-factory-config> |
|      | <client-interceptors> |
|        | <home> |
|          | <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor> |
|          | <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor> |
|          | <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor> |
|        | </home> |
|        | <bean> |
|          | <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor> |
|          | <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor> |
|          | <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor> |
|          | <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor> |
|        | </bean> |
|      | </client-interceptors> |
|    | </proxy-factory-config> |
|  | </invoker-proxy-binding> |



|  | <container-configuration> |
|    | <container-name>Standard Stateless SessionBean</container-name> |
|    | <call-logging>false</call-logging> |
|    | <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name> |
|    | <container-interceptors> |
|      | <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor> |
|      | <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor> |
|      | <interceptor>org.jboss.ejb.plugins.security.PreSecurityInterceptor</interceptor>  |
|      | <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor> |
|      | <!-- CMT --> |
|      | <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor> |
|      | <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor> |
|      | <interceptor transaction="Container">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor> |
|      | <!-- BMT --> |
|      | <interceptor transaction="Bean">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor> |
|      | <interceptor transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor> |
|      | <interceptor transaction="Bean">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor> |
|      | <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor> |
|    | </container-interceptors> |
|    | <instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</instance-pool> |
|    | <instance-cache></instance-cache> |
|    | <persistence-manager></persistence-manager> |
|    | <container-pool-conf> |
|      | <MaximumSize>100</MaximumSize> |
|    | </container-pool-conf> |
|  | </container-configuration> |

and 

|  | <container-configuration> |
|    | <container-name>Standard Stateful SessionBean</container-name> |
|    | <call-logging>false</call-logging> |
|    | <!-- invoker-proxy-binding-name>stateful-unified-invoker</invoker-proxy-binding-name --> |
|    | <invoker-proxy-binding-name>stateful-pooled-invoker</invoker-proxy-binding-name> |
|    | <container-interceptors> |
|      | <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor> |
|      | <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor> |
|      | <interceptor>org.jboss.ejb.plugins.security.PreSecurityInterceptor</interceptor>  |
|      | <!-- CMT --> |
|      | <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor> |
|      | <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor> |
|      | <interceptor transaction="Container">org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor</interceptor> |
|      | <!-- BMT --> |
|      | <interceptor transaction="Bean">org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor</interceptor> |
|      | <interceptor transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor> |
|      | <interceptor transaction="Bean">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor> |
|      | <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor> |
|      | <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor> |
|      | <interceptor>org.jboss.ejb.plugins.StatefulSessionSecurityInterceptor</interceptor> |
|    | </container-interceptors> |
|    | <instance-cache>org.jboss.ejb.plugins.StatefulSessionInstanceCache</instance-cache> |
|    | <persistence-manager>org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager</persistence-manager> |
|    | <container-cache-conf> |
|      | <cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cache-policy> |
|      | <cache-policy-conf> |
|        | <min-capacity>50</min-capacity> |
|        | <max-capacity>1000000</max-capacity> |
|        | <remover-period>1800</remover-period> |
|        | <max-bean-life>1800</max-bean-life> |
|        | <overager-period>300</overager-period> |
|        | <max-bean-age>600</max-bean-age> |
|        | <resizer-period>400</resizer-period> |
|        | <max-cache-miss-period>60</max-cache-miss-period> |
|        | <min-cache-miss-period>1</min-cache-miss-period> |
|        | <cache-load-factor>0.75</cache-load-factor> |
|      | </cache-policy-conf> |
|    | </container-cache-conf> |
|    | <container-pool-conf> |
|      | <MaximumSize>100</MaximumSize> |
|    | </container-pool-conf> |
|  | </container-configuration> |

With this configuration change I hoped, that I get a pooled connection for ejb 3.0.
But it seems, that there is something wrong because I still get information, that each request starts a new WorkerThread with a different port:

2012-03-23 09:26:11,359 INFO  [STDOUT] (WorkerThread#1[192.168.1.24:2025]) sayHallo: + 90
2012-03-23 09:26:11,374 INFO  [STDOUT] (WorkerThread#0[192.168.1.24:2026]) sayHallo: + 91
2012-03-23 09:26:11,374 INFO  [STDOUT] (WorkerThread#1[192.168.1.24:2027]) sayHallo: + 92
2012-03-23 09:26:11,374 INFO  [STDOUT] (WorkerThread#0[192.168.1.24:2028]) sayHallo: + 93

Next notice was, that ~ port 4500 the client port is created from ~ 1000 to 4500 and so on.
But after ~ 4000 fast calls to my test method I get a new exception:

org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://HELIOTROP:3873/?]
    at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:776)
    at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
    at org.jboss.remoting.Client.invoke(Client.java:1724)
    at org.jboss.remoting.Client.invoke(Client.java:629)
    at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
    at $Proxy3.invoke(Unknown Source)
    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
    at $Proxy2.sayHallo(Unknown Source)

After this exception I can call my ejb.method again until the next exception.
This exception I also will get, if I use the unchanged standardjboss.xml configuration.

My question:

Is something wrong with my pooled Invoker configuration?
Is this CannotConnectException normal, that I have to expect, or is this only occuring with my special test?
Where can I configure the parameter for the pooled Invoker? For example port and pool-size?

Thank you,
Werner
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/725850#725850]

Start a new discussion in JBoss Remoting at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2050]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120323/be085640/attachment-0001.html 


More information about the jboss-user mailing list