Discussion:
Http client version 4.1.3 resulting in java.net.SocketException:
Kulkarni, Gopalkrishna
2017-11-30 11:09:25 UTC
Permalink
Hi,
When attempting to send large payload (Payload with 9 MD), we are getting a Broken pipe error (exception detail below). What is strange is, even we give a wrong service address and attempt httpclient.execute(request), we get this error.

I know this topic has been discussed but those outputs are not helping us a lot.
The HTTP Client version we are using is 4.1.3.


a#Error in processing Mime message: java.net.SocketException: errno: 32 (Broken pipe), error: Write failed (local port 44419 to address 10.121.21.175 (vsa3023032.od.sap.biz), remote host unknown)java.net.SocketException: errno: 32 (Broken pipe), error: Write failed (local port 44419 to address 10.121.21.175 (vsa3023032.od.sap.biz), remote host unknown)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
at java.net.SocketOutputStream.write(SocketOutputStream.java:161)
at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:377)
at sun.security.ssl.OutputRecord.write(OutputRecord.java:363)
at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:849)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:820)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:153)
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:114)
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:120)
at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:68)
at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:264)
at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:224)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:647)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)

Regards,
Gopal
+91 9972567432
Oleg Kalnichevski
2017-11-30 15:08:46 UTC
Permalink
On Thu, Nov 30, 2017 at 12:09 PM, Kulkarni, Gopalkrishna
Post by Kulkarni, Gopalkrishna
Hi,
When attempting to send large payload (Payload with 9 MD), we are
getting a Broken pipe error (exception detail below). What is strange
is, even we give a wrong service address and attempt
httpclient.execute(request), we get this error.
I know this topic has been discussed but those outputs are not
helping us a lot.
The HTTP Client version we are using is 4.1.3.
Gopalkrishna

java.net.SocketException: (Broken pipe) type of exceptions are almost
always local environment specific and are very unlikely to be caused by
the client in the first place.

Oleg
Post by Kulkarni, Gopalkrishna
32 (Broken pipe), error: Write failed (local port 44419 to address
10.121.21.175 (vsa3023032.od.sap.biz), remote host
Write failed (local port 44419 to address 10.121.21.175
(vsa3023032.od.sap.biz), remote host unknown)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
at
java.net.SocketOutputStream.write(SocketOutputStream.java:161)
at
sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:377)
at
sun.security.ssl.OutputRecord.write(OutputRecord.java:363)
at
sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:849)
at
sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:820)
at
sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at
org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:153)
at
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:114)
at
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:120)
at
org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:68)
at
org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
at
org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at
org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
at
org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:264)
at
org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:224)
at
org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:647)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
Regards,
Gopal
+91 9972567432
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Kulkarni, Gopalkrishna
2017-12-01 10:16:30 UTC
Permalink
Hi,
Thanks for the input!

My question is there any explicit settings we need to have for this HTTP client to avoid this error.
In our landscape we are using Apache Camel. As part of one of the Camel route, we are using HTTP client (version 4.1.3).
Is there any known issues with Apache Camel and HTTP Client?

Regards,
Gopal

-----Original Message-----
From: Oleg Kalnichevski [mailto:***@apache.org]
Sent: Thursday, November 30, 2017 8:39 PM
To: HttpClient User Discussion <httpclient-***@hc.apache.org>
Subject: Re: Http client version 4.1.3 resulting in java.net.SocketException: errno: 32 (Broken pipe)

On Thu, Nov 30, 2017 at 12:09 PM, Kulkarni, Gopalkrishna
Post by Kulkarni, Gopalkrishna
Hi,
When attempting to send large payload (Payload with 9 MD), we are
getting a Broken pipe error (exception detail below). What is strange
is, even we give a wrong service address and attempt
httpclient.execute(request), we get this error.
I know this topic has been discussed but those outputs are not
helping us a lot.
The HTTP Client version we are using is 4.1.3.
Gopalkrishna

java.net.SocketException: (Broken pipe) type of exceptions are almost
always local environment specific and are very unlikely to be caused by
the client in the first place.

Oleg
Post by Kulkarni, Gopalkrishna
32 (Broken pipe), error: Write failed (local port 44419 to address
10.121.21.175 (vsa3023032.od.sap.biz), remote host
Write failed (local port 44419 to address 10.121.21.175
(vsa3023032.od.sap.biz), remote host unknown)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
at
java.net.SocketOutputStream.write(SocketOutputStream.java:161)
at
sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:377)
at
sun.security.ssl.OutputRecord.write(OutputRecord.java:363)
at
sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:849)
at
sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:820)
at
sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at
org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:153)
at
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:114)
at
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:120)
at
org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:68)
at
org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
at
org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at
org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
at
org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:264)
at
org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:224)
at
org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:647)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
Regards,
Gopal
+91 9972567432
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional comman
Oleg Kalnichevski
2017-12-01 10:47:13 UTC
Permalink
Post by Kulkarni, Gopalkrishna
Hi,
Thanks for the input!
My question is there any explicit settings we need to have for this
HTTP client to avoid this error.
In our landscape  we are using Apache Camel. As part of one of the
Camel route, we are using HTTP client (version 4.1.3).
Is there any known issues with Apache Camel and HTTP Client?
Gopal


It is impossible to recommend anything because it is impossible to
determine with any reasonable degree of confidence what has been
causing the issue in the first place.

All I can say that one may choose to re-try requests failed due to
a SocketException as long as those requests are idempotent.

Oleg
Post by Kulkarni, Gopalkrishna
Regards,
Gopal
-----Original Message-----
Sent: Thursday, November 30, 2017 8:39 PM
Subject: Re: Http client version 4.1.3 resulting in
java.net.SocketException: errno: 32 (Broken pipe)
On Thu, Nov 30, 2017 at 12:09 PM, Kulkarni, Gopalkrishna 
Hi,
When attempting to send large payload (Payload with 9 MD), we are 
getting a Broken pipe error (exception detail below). What is
strange 
is, even we give a wrong service address and attempt 
httpclient.execute(request), we get this error.
I know this topic has been discussed but those outputs are not 
helping us a lot.
The HTTP Client version we are using is 4.1.3.
Gopalkrishna
java.net.SocketException: (Broken pipe) type of exceptions are
almost 
always local environment specific and are very unlikely to be caused
by 
the client in the first place.
Oleg
errno: 
32 (Broken pipe), error: Write failed (local port 44419 to address 
10.121.21.175 (vsa3023032.od.sap.biz), remote host 
unknown)java.net.SocketException: errno: 32 (Broken pipe), error: 
Write failed (local port 44419 to address 10.121.21.175 
(vsa3023032.od.sap.biz), remote host unknown)
              at java.net.SocketOutputStream.socketWrite0(Native 
Method)
              at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115
)
              at 
java.net.SocketOutputStream.write(SocketOutputStream.java:161)
              at 
sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:377)
              at 
sun.security.ssl.OutputRecord.write(OutputRecord.java:363)
              at 
sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.ja
va:849)
              at 
sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:820)
              at 
sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
              at 
org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractS
essionOutputBuffer.java:153)
              at 
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLeng
thOutputStream.java:114)
              at 
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLeng
thOutputStream.java:120)
              at 
org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java
:68)
              at 
org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.
java:96)
              at 
org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWra
pper.writeTo(EntityEnclosingRequestWrapper.java:108)
              at 
org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerial
izer.java:120)
              at 
org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity
(AbstractHttpClientConnection.java:264)
              at 
org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEnti
ty(AbstractClientConnAdapter.java:224)
              at 
org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequ
estExecutor.java:255)
              at 
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExe
cutor.java:123)
              at 
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(Defau
ltRequestDirector.java:647)
              at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultR
equestDirector.java:464)
              at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttp
Client.java:820)
              at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttp
Client.java:754)
              at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttp
Client.java:732)
Regards,
Gopal
+91 9972567432
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Loading...