Farming's AddContentStreamAction should not close stream
--------------------------------------------------------
Key: JBAS-7546
URL:
https://jira.jboss.org/jira/browse/JBAS-7546
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Clustering, ProfileService
Affects Versions: JBossAS-6.0.0.M1, JBossAS-5.1.0.GA
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: JBossAS-6.0.0.M2
AddContentStreamAction is the action used to pipe content to the cluster when the
DeploymentManager.distribute(String name, URL contentURL, boolean copyContent) method is
invoked with copyContent=true. It is passed the InputStream provided by the remote side as
a constructor param.
As part of cleanup processing it is attempting to close this stream. This is incorrect, as
it wasn't responsible for opening the stream.
I'm seeing intermittent failures in
org.jboss.test.cluster.defaultcfg.profileservice.test.ClusteredDeploymentRepoAddContentTestCase
with problems closing the stream associated:
2009-12-14 22:33:34,038 DEBUG [org.jboss.remoting.transport.socket.SocketClientInvoker]
(WorkerThread#2[127.0.0.1:58943]) SocketClientInvoker[5213fce3, socket://besdev:12977]:
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem
establishing socket connection for InvokerLocator [socket://besdev:12977/]
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:771)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:160)
at org.jboss.remoting.Client.invoke(Client.java:1708)
at org.jboss.remoting.Client.invoke(Client.java:612)
at org.jboss.remoting.Client.invoke(Client.java:600)
at org.jboss.remoting.stream.StreamHandler.close(StreamHandler.java:128)
at
org.jboss.system.server.profileservice.repository.clustered.local.file.AddContentStreamAction.safeCloseStream(AddContentStreamAction.java:215)
at
org.jboss.system.server.profileservice.repository.clustered.local.file.AddContentStreamAction.doComplete(AddContentStreamAction.java:143)
at
org.jboss.system.server.profileservice.repository.clustered.sync.AbstractSynchronizationAction.complete(AbstractSynchronizationAction.java:95)
at
org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.executePush(DefaultRepositoryClusteringHandler.java:799)
at
org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.executeSynchronizationActions(DefaultRepositoryClusteringHandler.java:673)
at
org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.installModifications(DefaultRepositoryClusteringHandler.java:592)
at
org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.addDeploymentContent(DefaultRepositoryClusteringHandler.java:353)
at
org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepository.addDeploymentContent(ClusteredDeploymentRepository.java:317)
at
org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.handleStream(AbstractDeployHandler.java:257)
at
org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.handleStream(AbstractDeployHandler.java:63)
at org.jboss.remoting.ServerInvoker.handleInternalInvocation(ServerInvoker.java:1785)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:895)
at
org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at org.jboss.remoting.util.SecurityUtility.connect(SecurityUtility.java:1037)
at
org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:203)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:1084)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:757)
... 21 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira