Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-3747

Web Designer causes java.net.SocketException: Connection reset by peer: socket write error in Guvnor REST API

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: jBPM 5.3
    • Fix Version/s: None
    • Component/s: Designer
    • Labels:
      None
    • Environment:

      OS : Windows7 Professional
      JDK : Sun JDK6 u33
      BRMS : 5.3.0GA
      Browser : FireFox 14.0.1

    • Steps to Reproduce:
      Hide
      • Create process A with Web Designer, generate its png and save the process
      • Create process B with Web Designer
        • Add Reusable Subprocess and click CalledElement property drop-down list
      Show
      Create process A with Web Designer, generate its png and save the process Create process B with Web Designer Add Reusable Subprocess and click CalledElement property drop-down list
    • Bugzilla Update:
      Perform

      Description

      When Web Designer invokes ServletUtil.existsProcessImageInGuvnor(), the method successfully returns but the server side (Guvnor REST API) throws a SocketException because the caller closes a socket before reading response data.

      2012-07-27 14:41:42,469 ERROR [STDERR] (http-0.0.0.0-8080-8) ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error^M
      2012-07-27 14:41:42,469 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:402)^M
      2012-07-27 14:41:42,470 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:354)^M
      2012-07-27 14:41:42,470 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:425)^M
      2012-07-27 14:41:42,470 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:414)^M
      2012-07-27 14:41:42,470 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)^M
      2012-07-27 14:41:42,470 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:46)^M
      2012-07-27 14:41:42,471 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.helpers.IOUtils.copy(IOUtils.java:141)^M
      2012-07-27 14:41:42,471 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.helpers.IOUtils.copyAndCloseInput(IOUtils.java:109)^M
      2012-07-27 14:41:42,471 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.jaxrs.provider.BinaryDataProvider.writeTo(BinaryDataProvider.java:89)^M
      2012-07-27 14:41:42,471 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:256)^M
      2012-07-27 14:41:42,471 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:144)^M
      2012-07-27 14:41:42,471 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:83)^M
      2012-07-27 14:41:42,471 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)^M
      2012-07-27 14:41:42,472 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)^M
      2012-07-27 14:41:42,472 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)^M
      2012-07-27 14:41:42,472 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)^M
      2012-07-27 14:41:42,472 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)^M
      2012-07-27 14:41:42,472 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)^M
      2012-07-27 14:41:42,472 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)^M
      2012-07-27 14:41:42,472 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)^M
      2012-07-27 14:41:42,473 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)^M
      2012-07-27 14:41:42,473 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:112)^M
      2012-07-27 14:41:42,473 ERROR [STDERR] (http-0.0.0.0-8080-8)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)^M
      2012-07-27 14:41:42,473 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)^M
      2012-07-27 14:41:42,473 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)^M
      2012-07-27 14:41:42,473 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)^M
      2012-07-27 14:41:42,473 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)^M
      2012-07-27 14:41:42,473 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)^M
      2012-07-27 14:41:42,474 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)^M
      2012-07-27 14:41:42,474 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)^M
      2012-07-27 14:41:42,474 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)^M
      2012-07-27 14:41:42,474 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)^M
      2012-07-27 14:41:42,474 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)^M
      2012-07-27 14:41:42,474 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)^M
      2012-07-27 14:41:42,474 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)^M
      2012-07-27 14:41:42,475 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)^M
      2012-07-27 14:41:42,475 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)^M
      2012-07-27 14:41:42,475 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)^M
      2012-07-27 14:41:42,475 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)^M
      2012-07-27 14:41:42,475 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)^M
      2012-07-27 14:41:42,475 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)^M
      2012-07-27 14:41:42,475 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)^M
      2012-07-27 14:41:42,475 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)^M
      2012-07-27 14:41:42,476 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)^M
      2012-07-27 14:41:42,476 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)^M
      2012-07-27 14:41:42,476 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)^M
      2012-07-27 14:41:42,476 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)^M
      2012-07-27 14:41:42,476 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)^M
      2012-07-27 14:41:42,477 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)^M
      2012-07-27 14:41:42,477 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)^M
      2012-07-27 14:41:42,477 ERROR [STDERR] (http-0.0.0.0-8080-8)    at java.lang.Thread.run(Thread.java:662)^M
      2012-07-27 14:41:42,477 ERROR [STDERR] (http-0.0.0.0-8080-8) Caused by: java.net.SocketException: Connection reset by peer: socket write error^M
      2012-07-27 14:41:42,477 ERROR [STDERR] (http-0.0.0.0-8080-8)    at java.net.SocketOutputStream.socketWrite0(Native Method)^M
      2012-07-27 14:41:42,478 ERROR [STDERR] (http-0.0.0.0-8080-8)    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)^M
      2012-07-27 14:41:42,478 ERROR [STDERR] (http-0.0.0.0-8080-8)    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)^M
      2012-07-27 14:41:42,478 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:724)^M
      2012-07-27 14:41:42,481 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:449)^M
      2012-07-27 14:41:42,481 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)^M
      2012-07-27 14:41:42,482 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:748)^M
      2012-07-27 14:41:42,482 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)^M
      2012-07-27 14:41:42,482 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:557)^M
      2012-07-27 14:41:42,482 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.coyote.Response.doWrite(Response.java:567)^M
      2012-07-27 14:41:42,482 ERROR [STDERR] (http-0.0.0.0-8080-8)    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:397)^M
      2012-07-27 14:41:42,482 ERROR [STDERR] (http-0.0.0.0-8080-8)    ... 50 more^M
      
      	public static boolean existsProcessImageInGuvnor(String assetURL, IDiagramProfile profile) {
      		try {	
      			URL checkURL = new URL(assetURL);
      			HttpURLConnection checkConnection = (HttpURLConnection) checkURL
      			        .openConnection();
      			ServletUtil.applyAuth(profile, checkConnection);
      			checkConnection.setRequestMethod("GET");
      			//checkConnection
      			//        .setRequestProperty("Accept", "application/binary");
      			checkConnection.connect();
      			_logger.info("check connection response code: " + checkConnection.getResponseCode());
      			if (checkConnection.getResponseCode() == 200) {
      				return true;
      			}
      		} catch (Exception e) {
      			_logger.error(e.getMessage());
      		}
              return false;
      	}
      

      The exception is observed only in Windows7 so far. It's likely up to HttpURLConnection implementation.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tsurdilovic Tihomir Surdilovic
                Reporter:
                tkobayashi Toshiya Kobayashi
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: