Bug 1175957

Summary: Retry streaming connection if it fails due to stale connection in pool
Product: [JBoss] JBoss Operations Network Reporter: Larry O'Leary <loleary>
Component: Communications SubsystemAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Matt Mahoney <mmahoney>
Severity: high Docs Contact:
Priority: urgent    
Version: JON 3.2.3CC: mmahoney
Target Milestone: ER01Keywords: Regression, Triaged
Target Release: JON 3.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-27 19:58:29 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: 1175851    
Bug Blocks:    

Description Larry O'Leary 2014-12-19 00:07:36 UTC
Description of problem:
As reported in Bug 1166383, bundle deployment can fail in the event that the connection pool contains a stale or dead socket. For non-SSL connections this is usually not an issue as the error will trigger JBoss Remoting to silently retry the connection and the corresponding request. However, when using SSL, such errors are wrapped in a generic IO exception.

Although the fix for Bug 1166383 should resolve this by using a JBoss Remoting configuration that will allow generic exceptions to be retried, we should include a final retry within JBossRemotingRemoteCommunicator.rawSend in case the remoting configuration has been updated by the user to exclude the necessary options to force the retry. 

This is being classified as a regression due to the same issue being reported in JBoss ON 3.1.2 and being resolved with commit 533a9ad74225fe952a1a553bf1c3588d98f35c06


Version-Release number of selected component (if applicable):
3.3.0

How reproducible:
Always

Steps to Reproduce:
The steps from Bug 1166383 can be used. However, please note that the fix for Bug 1166383 should prevent this issue and no failure will occur.

This BZ is only asking that an additional retry be attempted as a last resort in case there are other manifestations of this issue.

Actual results:
ERROR [org.rhq.enterprise.communications.command.client.ClientCommandSenderTask] (http-/0.0.0.0:7080-5) {ClientCommandSenderTask.send-failed}Failed to send command [Command: type=[remotepojo]; cmd-in-response=[false]; config=[{rhq.security-token=EhtA72he/fcxoEpuDEQITmL04UgkR4+Jvmaqz9vcYSE3+8D9XOkC4HnvW/uKbSeMi8Y=, rhq.send-throttle=true}]; params=[{invocation=NameBasedInvocation[schedule], targetInterfaceName=org.rhq.core.clientapi.agent.bundle.BundleAgentService}]]. Cause: org.jboss.remoting.InvocationFailureException:Unable to perform invocation; nested exception is: 
        javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Broken pipe -> javax.net.ssl.SSLException:Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Broken pipe -> javax.net.ssl.SSLException:java.net.SocketException: Broken pipe -> java.net.SocketException:Broken pipe. Cause: org.jboss.remoting.InvocationFailureException: Unable to perform invocation; nested exception is: 
        javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Broken pipe

Expected results:
No errors in the event that the connection/socket was stale

Comment 2 John Mazzitelli 2014-12-19 14:50:34 UTC
That commit looks good. I cherry-picked to these branches:

master: e274df2f8e7e214e5a3e8f934930c420995b4581
release/jon3.3.x: 74abe07c9d91061695eddce0404620e07010d44d

(note: I'm moving this BZ to MODIFIED state. I assume that is the correct one.)

Comment 3 John Mazzitelli 2014-12-19 15:48:56 UTC
That cherry-pick failed to compile - I didn't realize how drastic that class changed since I last saw it.

Fixes:

master: 7e2e0342df8355a00ea57b6950e7464505dfa1a2
release/jon3.3.x: 226e8f2b7b6dc070f4a701a08f155cd0c9af280d

Comment 4 Simeon Pinder 2015-01-26 08:15:12 UTC
Moving to ON_QA as available for test with the latest 3.3.1.ER01 bits from here:
http://download.devel.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/12/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip