SocketException: Connection reset while sending https request. RTC 4.0.5
![]()
Hello. I'm seeing an issue when trying to send a https post request after a delivery event. This request only fails whens sending https and not http. Sending a sample https request from my desktop works as intended but not when I deploy my plugin to the server and run it. Below are the error codes that I am seeing. I've also added a code snippet of the request. Any idea on how I can resolve this?
java.lang.Exception: java.net.SocketException: Connection reset
at com.bac.devops.ci.extension.deliver.service.RTCHookRequest.sendPost(RTCHookRequest.java:127)
at com.bac.devops.ci.extension.deliver.service.DevopsCIOnDeliverParticipant.sendRequest(DevopsCIOnDeliverParticipant.java:371)
at com.bac.devops.ci.extension.deliver.service.DevopsCIOnDeliverParticipant.run(DevopsCIOnDeliverParticipant.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy1334.run(Unknown Source)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runParticipant(OperationAdviceManager.java:1147)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runParticipants(OperationAdviceManager.java:977)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.advise(OperationAdviceManager.java:331)
at com.ibm.team.process.internal.common.util.AbstractProcess.doAdvise(AbstractProcess.java:197)
at com.ibm.team.process.internal.service.ServerProcess.access$2(ServerProcess.java:1)
at com.ibm.team.process.internal.service.ServerProcess$2.run(ServerProcess.java:159)
at com.ibm.team.repository.service.internal.PrimitiveTransactionService$3.run(PrimitiveTransactionService.java:163)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:347)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runInTransaction(RepositoryDatabase.java:271)
at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:96)
at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:91)
at sun.reflect.GeneratedMethodAccessor382.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy97.runInTransaction(Unknown Source)
at com.ibm.team.repository.service.internal.TransactionService.runInTransaction(TransactionService.java:37)
at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy178.runInTransaction(Unknown Source)
at com.ibm.team.process.internal.service.ProcessService.runInTransaction(ProcessService.java:4786)
at com.ibm.team.process.internal.service.ProcessService.runInTransaction(ProcessService.java:4793)
at com.ibm.team.process.internal.service.ServerProcess.adviseAndExecute(ServerProcess.java:156)
at com.ibm.team.scm.service.internal.process.ServerProcessProxy.adviseAndExecute(ServerProcessProxy.java:60)
at com.ibm.team.scm.common.process.RunnableAdvisableOperation.processExec(RunnableAdvisableOperation.java:195)
at com.ibm.team.scm.common.process.RunnableAdvisableOperation.processExec(RunnableAdvisableOperation.java:180)
at com.ibm.team.scm.service.internal.utils.ProcessUtils.runAdvisorsFor(ProcessUtils.java:406)
at com.ibm.team.scm.service.internal.utils.AcceptImpl$3.run(AcceptImpl.java:1571)
at com.ibm.team.scm.common.process.RunnableAdvisableOperation.run(RunnableAdvisableOperation.java:109)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runOperation(OperationAdviceManager.java:1384)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.advise(OperationAdviceManager.java:325)
at com.ibm.team.process.internal.common.util.AbstractProcess.doAdvise(AbstractProcess.java:197)
at com.ibm.team.process.internal.service.ServerProcess.access$2(ServerProcess.java:1)
at com.ibm.team.process.internal.service.ServerProcess$2.run(ServerProcess.java:159)
at com.ibm.team.repository.service.internal.PrimitiveTransactionService$3.run(PrimitiveTransactionService.java:163)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:347)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runInTransaction(RepositoryDatabase.java:271)
at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:96)
at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:91)
at sun.reflect.GeneratedMethodAccessor382.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy97.runInTransaction(Unknown Source)
at com.ibm.team.repository.service.internal.TransactionService.runInTransaction(TransactionService.java:37)
at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy178.runInTransaction(Unknown Source)
at com.ibm.team.process.internal.service.ProcessService.runInTransaction(ProcessService.java:4786)
at com.ibm.team.process.internal.service.ProcessService.runInTransaction(ProcessService.java:4793)
at com.ibm.team.process.internal.service.ServerProcess.adviseAndExecute(ServerProcess.java:156)
at com.ibm.team.scm.service.internal.process.ServerProcessProxy.adviseAndExecute(ServerProcessProxy.java:60)
at com.ibm.team.scm.common.process.RunnableAdvisableOperation.processExec(RunnableAdvisableOperation.java:195)
at com.ibm.team.scm.common.process.RunnableAdvisableOperation.processExec(RunnableAdvisableOperation.java:180)
at com.ibm.team.scm.service.internal.utils.AcceptImpl.runInProcessTransaction(AcceptImpl.java:1641)
at com.ibm.team.scm.service.internal.utils.AcceptImpl.acceptCombined(AcceptImpl.java:1599)
at com.ibm.team.scm.service.internal.ScmServiceInternal.deliverCombined(ScmServiceInternal.java:2787)
at com.ibm.team.scm.service.internal.ScmService$41.run(ScmService.java:2259)
at com.ibm.team.scm.service.internal.AbstractScmService$2.run(AbstractScmService.java:434)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$Transaction.run(RepositoryDatabase.java:496)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$1.run(RepositoryDatabase.java:320)
at com.ibm.team.repository.service.internal.rdb.ConnectionPoolService.withCurrentConnection(ConnectionPoolService.java:439)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy57.withCurrentConnection(Unknown Source)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:316)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runInTransaction(RepositoryDatabase.java:271)
at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:96)
at sun.reflect.GeneratedMethodAccessor240.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy98.runInTransaction(Unknown Source)
at com.ibm.team.repository.service.internal.TransactionService.runInTransaction(TransactionService.java:45)
at sun.reflect.GeneratedMethodAccessor360.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy179.runInTransaction(Unknown Source)
at com.ibm.team.scm.service.internal.AbstractScmService.runInTransaction(AbstractScmService.java:345)
at com.ibm.team.scm.service.internal.AbstractScmService.runInTransaction(AbstractScmService.java:424)
at com.ibm.team.scm.service.internal.ScmService.deliverCombined(ScmService.java:2257)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy1198.deliverCombined(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleMethod(AbstractTeamServerServlet.java:1421)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.executeMethod(AbstractTeamServerServlet.java:956)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.doPost(AbstractTeamServerServlet.java:729)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest2(AbstractTeamServerServlet.java:2356)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest(AbstractTeamServerServlet.java:2153)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.access$0(AbstractTeamServerServlet.java:2138)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet$1.service(AbstractTeamServerServlet.java:219)
at com.ibm.team.repository.internal.service.auth.impl.JAuthHandler$1.run(JAuthHandler.java:109)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1792)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.ibm.team.repository.server.servletbridge.BridgeFilter.processDelegate(BridgeFilter.java:165)
at com.ibm.team.repository.server.servletbridge.BridgeFilter.doFilter(BridgeFilter.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:336)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:906)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:929)
at java.lang.Thread.run(Thread.java:738)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:179)
at com.ibm.jsse2.b.a(b.java:126)
at com.ibm.jsse2.b.a(b.java:174)
at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:536)
at com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:223)
at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:724)
at com.ibm.jsse2.SSLSocketImpl.startHandshake(SSLSocketImpl.java:81)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:8)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:20)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1043)
at com.ibm.net.ssl.www2.protocol.https.b.getOutputStream(b.java:85)
at com.bac.devops.ci.extension.deliver.service.RTCHookRequest.sendPost(RTCHookRequest.java:114)
... 163 more
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
requestData = opening + "......" + closing;
// con.setFixedLengthStreamingMode(requestData.getBytes("UTF8").length);
System.out.println("Sending 'POST' request to URL : "
+ dreamEndPoint);
// add request header
con.setRequestMethod("POST");
con.setRequestProperty("User-Agent", USER_AGENT);
con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");
con.setRequestProperty("Accept-Charset", charSet);
con.setRequestProperty("Content-Type",
"application/json; charset=" + charSet);
con.setReadTimeout(30000);
con.setConnectTimeout(30000);
// con.setUseCaches(false);
con.setDoOutput(true); // use URL connection for output
con.setDoInput(true);
// Write the request
wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(requestData);
|
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
SSL connections can be complicated and hard to debug. When you put the plugin on the server, the server side API effectively acts as a "client" as well for the SSL connection. So if you have made any changes in your RTC Eclipse client for it to work, you need to do the same on the server. The below post showed a similar issue, and may be helpful.
http://stackoverflow.com/questions/17458500/why-am-i-receiving-a-java-net-socketexception-connection-reset-error-from-web-s