Use Older "remoting" Protocol Instead of "http-remoting" with "http-upgrade" in JBoss EAP 7

Solution Verified - Updated -

Issue

  • Configure remote protocol
  • Call Remote EJB on old version of JBoss EAP
  • Remote invokation fails with

    TRACE [org.jboss.remoting.remote.connection] (default I/O-59) Connection error detail: java.io.IOException: XNIO000804: Received an invalid message length of 369296128
            at org.xnio.channels.FramedMessageChannel.receive(FramedMessageChannel.java:108)
            at org.jboss.remoting3.remote.ServerConnectionOpenListener$Initial.handleEvent(ServerConnectionOpenListener.java:228)
            at org.jboss.remoting3.remote.ServerConnectionOpenListener$Initial.handleEvent(ServerConnectionOpenListener.java:139)
            at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
            at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:199)
            at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:113)
            at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
            at org.xnio.ChannelListeners$DelegatingChannelListener.handleEvent(ChannelListeners.java:1092)
            at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
            at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
            at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
            at org.xnio.nio.WorkerThread.run(WorkerThread.java:559)
    
    DEBUG [org.jboss.remoting.remote.connection] (default I/O-59) JBREM000200: Remote connection failed: java.io.IOException: XNIO000804: Received an invalid message length of 369296128
    
  • Our remote-outbound-connection gets error java.io.IOException: Invalid response using configuration:

    <remote-outbound-connection name="remote-ejb-connection" outbound-socket-binding-ref="remote-ejb" username="RemotingUser" security-realm="ejb-security-realm">
    

    Error in log

    ERROR [org.jboss.as.ejb3.invocation] (default task-2) REQ-TRX= SESSION= WFLYEJB0034: EJB Invocation failed on component XXXXXService for method public abstract xx,xx.getMETHOD(java.lang.String): javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "XXX/XXX-ejb/XXXXXService", view is interface XXXX, affinity is None
            at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:567) [jboss-ejb-client-4.0.10.Final-redhat-1.jar:4.0.10.Final-redhat-1]
            at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503) [jboss-ejb-client-4.0.10.Final-redhat-1.jar:4.0.10.Final-redhat-1]
    ...
            Suppressed: java.io.IOException: Invalid response
                    at org.xnio.http.HttpUpgradeParser.parseVersion(HttpUpgradeParser.java:164)
                    at org.xnio.http.HttpUpgradeParser.parse(HttpUpgradeParser.java:55)
                    at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:419)
                    at org.xnio.http.HttpUpgrade$HttpUpgradeState.flushUpgradeChannel(HttpUpgrade.java:369)
                    at org.xnio.http.HttpUpgrade$HttpUpgradeState.access$900(HttpUpgrade.java:165)
    ...
                    at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider.getConnectedIdentityUsingClusterEffective(RemotingEJBDiscoveryProvider.java:311) [jboss-ejb-client-4.0.10.Final-redhat-1.jar:4.0.10.Final-redhat-1]
                    at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider$DiscoveryAttempt.lambda$connectAndDiscover$0(RemotingEJBDiscoveryProvider.java:384) [jboss-ejb-client-4.0.10.Final-redhat-1.jar:4.0.10.Final-redhat-1]
                    at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_144]
                    at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider$DiscoveryAttempt.connectAndDiscover(RemotingEJBDiscoveryProvider.java:384) [jboss-ejb-client-4.0.10.Final-redhat-1.jar:4.0.10.Final-redhat-1]
                    at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider.discover(RemotingEJBDiscoveryProvider.java:209) [jboss-ejb-client-4.0.10.Final-redhat-1.jar:4.0.10.Final-redhat-1]
                    at org.jboss.ejb.protocol.remote.RemoteEJBDiscoveryConfigurator.lambda$configure$0(RemoteEJBDiscoveryConfigurator.java:42) [jboss-ejb-client-4.0.10.Final-redhat-1.jar:4.0.10.Final-redhat-1]
                    at org.wildfly.discovery.impl.AggregateDiscoveryProvider.discover(AggregateDiscoveryProvider.java:58)
                    at org.wildfly.discovery.Discovery.discover(Discovery.java:100)
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7
  • Remote-invoked / client-server / server-to-server Enterprise Java Beans (EJB), potentially with EJB hosted on JBoss EAP 6
  • Remoting protocol

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content