Remote JNDI connection not working after some time
olli24 Oct 1, 2013 7:21 AMHi there,
we are using JBoss AS 7.1.1.Final "Brontes" with JDK 1.7.0_7 and Java clients with remote JNDI.
All needed remote JNDI settings are defined via jboss-ejb-client property file.
On Client side we use: JRE 1.6.0_33 32-Bit under Windows OS
Normally the clients can connect to JBoss7 without any problems.
But after some time the clients cannot connect. In the client console “Could not register a EJB receiver for connection” is logged.
2013-09-30 11:33:00.576 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.logging - Logging Provider: org.jboss.logging.Log4jLoggerProvider
2013-09-30 11:33:00.596 INFO [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client - JBoss EJB Client version 1.0.5.Final
2013-09-30 11:33:00.616 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - endpoint.create.options. has the following options {}
2013-09-30 11:33:00.616 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - remote.connectionprovider.create.options. has the following options {org.xnio.Options.SSL_ENABLED=>false}
2013-09-30 11:33:00.616 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - remote.connection.default.connect.options. has the following options {org.xnio.Options.SSL_STARTTLS=>false,org.xnio.Options.SASL_POLICY_NOANONYMOUS=>false}
2013-09-30 11:33:00.616 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - remote.connection.default.channel.options. has the following options {}
2013-09-30 11:33:00.616 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - Connection org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration$RemotingConnectionConfigurationImpl@134b07e successfully created for connection named default
2013-09-30 11:33:00.616 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - No clusters configured in properties
2013-09-30 11:33:00.646 INFO [thread applet-WebTerminal.mtTerminalApplet-1] org.xnio - XNIO Version 3.0.3.GA
2013-09-30 11:33:00.656 INFO [thread applet-WebTerminal.mtTerminalApplet-1] org.xnio.nio - XNIO NIO Implementation Version 3.0.3.GA
2013-09-30 11:33:00.676 INFO [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.remoting - JBoss Remoting version 3.2.3.GA
2013-09-30 11:33:00.706 DEBUG [Remoting "config-based-ejb-client-endpoint" read-1] org.xnio.nio - Started channel thread 'Remoting "config-based-ejb-client-endpoint" read-1', selector sun.nio.ch.WindowsSelectorImpl@15fc40c
2013-09-30 11:33:00.706 DEBUG [Remoting "config-based-ejb-client-endpoint" write-1] org.xnio.nio - Started channel thread 'Remoting "config-based-ejb-client-endpoint" write-1', selector sun.nio.ch.WindowsSelectorImpl@e49dcd
2013-09-30 11:33:00.756 ERROR [Remoting "config-based-ejb-client-endpoint" read-1] org.jboss.remoting.remote.connection - JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host
2013-09-30 11:33:00.766 WARN [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector - Could not register a EJB receiver for connection to remote://xxxx01:9000
java.lang.RuntimeException: java.io.IOException: An existing connection was forcibly closed by the remote host
at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:91)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:121)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.<init>(ConfigBasedEJBClientContextSelector.java:78)
at org.jboss.ejb.client.EJBClientContext.<clinit>(EJBClientContext.java:77)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:120)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
at $Proxy0.create(Unknown Source)
In the JBoss server.log is no ERROR at this time. This is the corresponding server.log:
2013-09-30 11:32:06,249 DEBUG [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] Recover DelegatingSession [session=ClientSessionImpl [name=766ee36c-1ab8-11e3-b3be-005056a70052, username=null, closed=false, factory = ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=0], discoveryGroupConfiguration=null], connectorConfig=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=0, backupConfig=null], metaData=()]@7f1dba]
2013-09-30 11:32:06,264 DEBUG [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] Recover DelegatingSession [session=ClientSessionImpl [name=766ee36c-1ab8-11e3-b3be-005056a70052, username=null, closed=false, factory = ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=0], discoveryGroupConfiguration=null], connectorConfig=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=0, backupConfig=null], metaData=()]@7f1dba]
2013-09-30 11:33:02,658 DEBUG [org.apache.catalina.session.ManagerBase] Start expire sessions StandardManager at 1380533582658 sessioncount 0
2013-09-30 11:33:02,658 DEBUG [org.apache.catalina.session.ManagerBase] End expire sessions StandardManager processingTime 0 expired sessions: 0
2013-09-30 11:33:02,658 DEBUG [org.apache.catalina.session.ManagerBase] Start expire sessions StandardManager at 1380533582658 sessioncount 0
2013-09-30 11:33:02,658 DEBUG [org.apache.catalina.session.ManagerBase] End expire sessions StandardManager processingTime 0 expired sessions: 0
2013-09-30 11:33:02,673 DEBUG [org.apache.catalina.session.ManagerBase] Start expire sessions StandardManager at 1380533582673 sessioncount 0
2013-09-30 11:33:02,673 DEBUG [org.apache.catalina.session.ManagerBase] End expire sessions StandardManager processingTime 0 expired sessions: 0
2013-09-30 11:33:07,314 DEBUG [org.jboss.jca.core.connectionmanager.pool.idle.IdleRemover] Notifying pools, interval: 450000
For comparison this is the client console output if the connection to JBoss was successful:
2013-09-30 12:30:12.278 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.logging - Logging Provider: org.jboss.logging.Log4jLoggerProvider
2013-09-30 12:30:12.309 INFO [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client - JBoss EJB Client version 1.0.5.Final
2013-09-30 12:30:12.324 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - endpoint.create.options. has the following options {}
2013-09-30 12:30:12.340 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - remote.connectionprovider.create.options. has the following options {org.xnio.Options.SSL_ENABLED=>true}
2013-09-30 12:30:12.340 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - remote.connection.default.connect.options. has the following options {org.xnio.Options.SASL_POLICY_NOANONYMOUS=>false,org.xnio.Options.SSL_STARTTLS=>true}
2013-09-30 12:30:12.340 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - remote.connection.default.channel.options. has the following options {}
2013-09-30 12:30:12.340 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - Connection org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration$RemotingConnectionConfigurationImpl@f87e2e successfully created for connection named default
2013-09-30 12:30:12.340 DEBUG [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration - No clusters configured in properties
2013-09-30 12:30:12.340 INFO [thread applet-WebTerminal.mtTerminalApplet-1] org.xnio - XNIO Version 3.0.3.GA
2013-09-30 12:30:12.356 INFO [thread applet-WebTerminal.mtTerminalApplet-1] org.xnio.nio - XNIO NIO Implementation Version 3.0.3.GA
2013-09-30 12:30:12.371 INFO [thread applet-WebTerminal.mtTerminalApplet-1] org.jboss.remoting - JBoss Remoting version 3.2.3.GA
2013-09-30 12:30:12.387 DEBUG [Remoting "config-based-ejb-client-endpoint" read-1] org.xnio.nio - Started channel thread 'Remoting "config-based-ejb-client-endpoint" read-1', selector sun.nio.ch.WindowsSelectorImpl@195aad9
2013-09-30 12:30:12.387 DEBUG [Remoting "config-based-ejb-client-endpoint" write-1] org.xnio.nio - Started channel thread 'Remoting "config-based-ejb-client-endpoint" write-1', selector sun.nio.ch.WindowsSelectorImpl@144e463
2013-09-30 12:30:12.543 DEBUG [Remoting "config-based-ejb-client-endpoint" task-4] org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver - Channel Channel ID e7154574 (outbound) of Remoting connection 003035a1 to xxxx01/10.1.2.81:9000 opened for context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@e97bef, receiver=Remoting connection EJB receiver [connection=Remoting connection <5c427e>,channel=jboss.ejb,nodename=oliver2]} Waiting for version handshake message from server
The difference between working and not working is the ERROR "JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host" after the [write-1] output.
Who is closing the connection, JBoss or the client, and why?
Has JBoss a limitation for max socket connections?
What could be the reason for this problem, a server side JDK or client side JRE problem?
Thanks in advance for any help.
Oliver