[jboss-jira] [JBoss JIRA] (WFLY-5534) Standalone EJB client resets connection after 5 minutes of inactivity

David Lloyd (JIRA) issues at jboss.org
Mon Oct 19 09:33:00 EDT 2015


    [ https://issues.jboss.org/browse/WFLY-5534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119466#comment-13119466 ] 

David Lloyd commented on WFLY-5534:
-----------------------------------

Nothing in the EJB or Remoting code is doing this, as that code would shut down the connection via a FIN/ACK sequence, not RST.

I suspect you have an intervening firewall with a connection timeout setting.

> Standalone EJB client resets connection after 5 minutes of inactivity
> ---------------------------------------------------------------------
>
>                 Key: WFLY-5534
>                 URL: https://issues.jboss.org/browse/WFLY-5534
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB, Remoting
>    Affects Versions: 8.2.1.Final
>         Environment: Wildfly 8.2.1 Final with JDK 1.8.0_u51
> Standalone client running on JDK 1.8.0.0_u51
>            Reporter: Giridhar Shankar
>            Assignee: David Lloyd
>            Priority: Blocker
>              Labels: jboss
>
> I have a standalone EJB Java client that is looking up my EJB and invoking remote methods.  First few calls go ok but if there is an inactivity for about 5 minutes, it resets the underlying TCP connection and throws up an error.  We have Spring MVC controllers that invoke JBOSS EJB in our development setup and the same problem is observed.  I reproduced the problem with standalone client too.  Here are code and error details:
> Client code:
> Context:
> Properties jndiProps = new Properties();
> jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
> jndiProps.put(Context.PROVIDER_URL,"http-remoting://<myserver>:<port>");
> jndiProps.put(Context.SECURITY_PRINCIPAL, "intelleza");
> jndiProps.put(Context.SECURITY_CREDENTIALS, "intelleza");
> jndiProps.put("jboss.naming.client.ejb.context", true);
> initialContext = new InitialContext(jndiProps);
> Lookup of my EJB using JNDI name in format <appname>/<ejbname>/Bean?<interface> works fine.
> new Thread(new TestClient()).start();
> Thread.sleep(100);
> new Thread(new TestClient()).start();
> Thread.sleep(60*6*1000);
> new Thread(new TestClient()).start();
> class ClientThread implements Runnable {
> 	@Override
> 	public void run() {
> 		
> 		IUserBean uBean = (IUserBean) MyClient.doLookup(<JNDI name>);
> 		
> 		try {
> 			
> 			String username = "test";
> 			String password = "test";
> 			System.out.println("Authentication status is " + uBean.authenticate(1, username, password));
> 		}
> 		catch (Exception e) {
> 			System.out.println(e);
> 		} 
>         }
> }
> First two invocations go without a problem.  During third, I see this error on the client console:
> 20:01:59,740 DEBUG ChannelAssociation:118 - Closing channel Channel ID d838a255 (outbound) of Remoting connection 59f35920 to <dns name>/IP:Port
> 20:01:59,742 DEBUG RemotingConnectionEJBReceiver:184 - Closing channelChannel ID d838a255 (outbound) of Remoting connection 59f35920 to <dns name>/IP:Port
> 20:01:59,751 DEBUG RemoteNamingStoreV1:263 - Channel end notification received, closing channel Channel ID e890bae8 (outbound) of Remoting connection 59f35920 to <dns name>/IP:Port
> 20:01:59,751  INFO remoting:458 - EJBCLIENT000016: Channel Channel ID d838a255 (outbound) of Remoting connection 59f35920 to <dns name>/IP:Port can no longer process messages
> I did a tcpdump (using wireshark) and I see client initiating a TCP RST during the third invocation.  No errors are observed in the Wildfly console log.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list