0 Replies Latest reply on May 25, 2016 9:33 AM by Hans Peter

    EJB Client disconnects after 5 minutes

    Hans Peter Newbie

      Hi,

       

      I'm using Wildfly 8.2.1 and try to connect with a client:

       

             Hashtable<Object, Object> props = new Hashtable<Object, Object>();
            props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
            props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
            props.put("jboss.naming.client.ejb.context", false);
            props.put("org.jboss.ejb.client.scoped.context", true);
            props.put("endpoint.name", "client-endpoint");
            props.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", false);
            props.put("remote.connections", "default");
            props.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", false);
            props.put("remote.connection.default.username", "xxxx");
            props.put("remote.connection.default.password", "xxxx");
            props.put(Context.PROVIDER_URL, "http-remoting://" + parameters.getServerAddress() + ":" + parameters.getPort());
            props.put("remote.connection.default.host", parameters.getServerAddress());
           

      props.put("remote.connection.default.port", parameters.getPort().toString());    

       

      The connection is establish successfully and works if the client is still active. But if the client is idle (5 minutes) the following errors occur:

       

      Error in Wildfly Log: JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host

      Error in Client Log: Caused by: java.io.IOException: Channel Channel ID fd142aad (outbound) of Remoting connection 01959674 to /46.183.41.75:80 has been closed