2013-02-22 18:23:11,244 ERROR [org.rhq.enterprise.gui.agentupdate.AgentUpdateServlet] Failed to stream agent jar. java.lang.RuntimeException: Stream data cannot be copied at org.rhq.core.util.stream.StreamUtil.copy(StreamUtil.java:265) at org.rhq.core.util.stream.StreamUtil.copy(StreamUtil.java:212) at org.rhq.enterprise.gui.agentupdate.AgentUpdateServlet.getDownload(AgentUpdateServlet.java:140) at org.rhq.enterprise.gui.agentupdate.AgentUpdateServlet.doGet(AgentUpdateServlet.java:103) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at sun.reflect.GeneratedMethodAccessor219.invoke(Unknown Source) ... Caused by: ClientAbortException: java.net.SocketException: Connection reset at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:354) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at org.rhq.core.util.stream.StreamUtil.copy(StreamUtil.java:258) ... 59 more Caused by: java.net.SocketException: Connection reset Would be nice to see which host connected since I can't tell which host is having a hard time updating. It also fills the logs with a lot of stack traces.
IIRC, this error might be a minor annoyance and isn't really an error. I *think* this happens simply when the agent disconnects after downloading the update jar successfully. I remember looking at this a while ago and not seeing any simple cause (or fix) to this. I'll double check it again to see if we can eliminate dumping this error or at least making it less ominous sounding. If it is an error, I'll see if I can figure out if the server knows which remote endpoint is downloading.
git commit 914781 This commit simply logs the remote address of the client making the request to retrieve the agent download jar. This also no longer logs the full stack, but does log the full exception error messages. Here's the code this commit uses to retrieve the remote client address: private String getClientAddress(HttpServletRequest request) { String ip = request.getHeader("X-Forwarded-For"); if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { ip = request.getHeader("HTTP_X_FORWARDED_FOR"); if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { ip = String.format("%s (%s)", request.getRemoteHost(), request.getRemoteAddr()); } } return ip; }
(In reply to John Mazzitelli from comment #2) > git commit 914781 the commit hash is wrong in the last comment, the git commit has is really: c8b2a83
Bulk closing now that 4.10 is out. If you think an issue is not resolved, please open a new BZ and link to the existing one.