Bug 1031692

Summary: [GSS](6.4.z) sporadical a Server side JBREM000200 Error if the client use a scoped context and close the "ejb:" context correct
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: wfink
Component: RemotingAssignee: David M. Lloyd <david.lloyd>
Status: CLOSED CURRENTRELEASE QA Contact: Jitka Kozana <jkudrnac>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.1.1, 6.2.0CC: bmaxwell, cdewolf, egonzale, remerson, wfink
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
JBoss EAP 6.1.1 or EAP6.2.Beta installed on Windows7 or Windows server 2008
Last Closed: 2015-12-04 01:54:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1149621    
Bug Blocks:    
Attachments:
Description Flags
Test client, changed app-one sources and compiled ear/client-jar
none
Server logfile with org.jboss.remoting.remote=TRACE
none
wireshark IP traffic capture none

Description wfink 2013-11-18 14:48:11 UTC
Created attachment 825696 [details]
Test client, changed app-one sources and compiled ear/client-jar

If a client use a scoped context from a remote standalone program to invoke a stateless session bean this error is shown sporadic in the logfile:
ERROR [org.jboss.remoting.remote.connection] (Remoting "hostname" read-1) JBREM000200: Remote connection failed: java.io.IOException: An established connection was aborted by the software in your host machine

It looks like a race condition which occur only in a clustered environment.
Also it is only reproducable if the server is running on Windows!

The reproducer is from the EAP6.2 ejb-multi-server quickstart, there is only a method added to force a thread sleep inside the server method (which make the error happen more often).

The simple client, the EAR files and a server.log with an error is attached.

To reproduce the error:
- use two fresh EAP6.2.Beta
- set default-missing-method-permissions-deny-access=false
- run "add-user -a -u quickuser -p quick-123" for both
- start
  - bin\standalone.bat -b IP -Djboss.node.name=node1 -c standalone-ha.xml -Djboss.socket.binding.port-offset=0
   - bin\standalone.bat -b IP -Djboss.node.name=node2 -c standalone-ha.xml -Djboss.socket.binding.port-offset=100
- deploy appone.ear to both
- run the SimpleScopedContextClusterClient

Comment 1 wfink 2013-11-18 14:50:14 UTC
Created attachment 825697 [details]
Server logfile with org.jboss.remoting.remote=TRACE

Comment 2 wfink 2013-11-18 16:33:18 UTC
Created attachment 825738 [details]
wireshark IP traffic capture

Capture during test run.
Client @192.168.27.50 server @192.168.27.38 (4447 and 4547)
The failure is at server 4447

17:25:41,806 TRACE [org.jboss.remoting.remote.connection] (EJB default - 2) Flushed channel (direct)
17:25:41,806 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Sent message java.nio.HeapByteBuffer[pos=1 lim=1 cap=8192]
(direct)
17:25:41,806 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Shut down writes on channel (direct)
17:25:41,806 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Flushed channel (direct)
17:25:41,806 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Shut down writes on channel
17:25:41,806 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" task-2) Shut down writes on channel
17:25:41,823 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Sent message java.nio.HeapByteBuffer[pos=1 lim=1 cap=8192]
(direct)
17:25:41,823 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Shut down writes on channel (direct)
17:25:41,823 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Flushed channel (direct)
17:25:41,823 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Shut down writes on channel
17:25:41,823 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Connection error detail: java.io.IOException: Eine bestehen
de Verbindung wurde softwaregesteuert
durch den Hostcomputer abgebrochen
        at sun.nio.ch.SocketDispatcher.read0(Native Method) [rt.jar:1.7.0_45]
        at sun.nio.ch.SocketDispatcher.read(Unknown Source) [rt.jar:1.7.0_45]
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) [rt.jar:1.7.0_45]
        at sun.nio.ch.IOUtil.read(Unknown Source) [rt.jar:1.7.0_45]
        at sun.nio.ch.SocketChannelImpl.read(Unknown Source) [rt.jar:1.7.0_45]
        at org.xnio.nio.AbstractNioStreamChannel.read(AbstractNioStreamChannel.java:249)
        at org.xnio.channels.FramedMessageChannel.receive(FramedMessageChannel.java:87) [xnio-api-3.0.7.GA-redhat-1.jar:3.0.7.GA-redhat-1]
        at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:72) [jboss-remoting-3.2.16.GA-redhat-1.jar:3.2.
16.GA-redhat-1]
        at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:45) [jboss-remoting-3.2.16.GA-redhat-1.jar:3.2.
16.GA-redhat-1]
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.7.GA-redhat-1.jar:3.0.7.GA-redhat-1]
        at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189) [xnio-api-3.0.7.GA-redhat-
1.jar:3.0.7.GA-redhat-1]
        at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103) [xnio-api-3.0.7.GA-redhat-1
.jar:3.0.7.GA-redhat-1]
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.7.GA-redhat-1.jar:3.0.7.GA-redhat-1]
        at org.xnio.nio.NioHandle.run(NioHandle.java:90)
        at org.xnio.nio.WorkerThread.run(WorkerThread.java:187)

17:25:41,838 ERROR [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) JBREM000200: Remote connection failed: java.io.IOException:
 Eine bestehende Verbindung wurde softwaregesteuert
durch den Hostcomputer abgebrochen
17:25:41,854 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" read-1) Shut down writes on channel
17:25:41,854 TRACE [org.jboss.remoting.remote.connection] (Remoting "dz" task-3) Shut down writes on channel

Comment 4 JBoss JIRA Server 2015-02-13 11:14:01 UTC
Enrique González Martínez <elguardian> updated the status of jira REM3-178 to Resolved

Comment 6 Enrique Gonzalez Martinez 2015-11-24 07:44:03 UTC
Hi Brad. There is no code involved as this case only was happening with windows machine involved, This was solved indirectly through another JIRA as this case could not happen anymore.

I think this should be close it.

Comment 8 Brad Maxwell 2015-12-04 01:54:36 UTC
Closing based on comments, this issue is resolved by fixing https://issues.jboss.org/browse/REM3-178 which was included in remoting 3.3.4.Final which is resolved in EAP 6.3 CP3 & EAP 6.4 and beyond