Discussion:
[read] I/O error: Socket is closed
Marc Boorshtein
2018-07-26 16:52:53 UTC
Permalink
I'm making calls to OpenPolicyAgent (Go based web server). GET calls work
great, but POST fails to get any content. When I turn on wire logging i
see:

[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"HTTP/1.1 200 OK[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"HTTP/1.1 200 OK[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"Content-Type: application/json[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"Content-Type: application/json[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"Date: Thu, 26 Jul 2018 16:28:12 GMT[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"Date: Thu, 26 Jul 2018 16:28:12 GMT[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"Content-Length: 182[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"Content-Length: 182[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"{"apiVersion":"admission.k8s.io/v1beta1","kind":"AdmissionReview","response":{"allowed":false,"status":{"reason":"invalid
persistent volume \"pv-cifs-freeipa2-freeipa2-share-xx\""}}}"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"{"apiVersion":"admission.k8s.io/v1beta1","kind":"AdmissionReview","response":{"allowed":false,"status":{"reason":"invalid
persistent volume \"pv-cifs-freeipa2-freeipa2-share-xx\""}}}"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"[read] I/O error: Socket is closed"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-79 <<
"[read] I/O error: Socket is closed"

but i'm not getting any content back from the output stream and i'm not
getting any exceptions. Here are my versions:

<httpclient.version>4.5.5</httpclient.version>
<httpcore.version>4.4.10</httpcore.version>
<httpmime.version>4.5.5</httpmime.version>

What else should I be looking for?

Thanks
Oleg Kalnichevski
2018-07-26 20:25:58 UTC
Permalink
I'm making calls to OpenPolicyAgent (Go based web server).  GET calls
work
great, but POST fails to get any content.  When I turn on wire
logging i
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"HTTP/1.1 200 OK[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"HTTP/1.1 200 OK[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"Content-Type: application/json[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"Content-Type: application/json[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"Date: Thu, 26 Jul 2018 16:28:12 GMT[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"Date: Thu, 26 Jul 2018 16:28:12 GMT[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"Content-Length: 182[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"Content-Length: 182[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"[\r][\n]"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"{"apiVersion":"admission.k8s.io/v1beta1","kind":"AdmissionReview","r
esponse":{"allowed":false,"status":{"reason":"invalid
persistent volume \"pv-cifs-freeipa2-freeipa2-share-xx\""}}}"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"{"apiVersion":"admission.k8s.io/v1beta1","kind":"AdmissionReview","r
esponse":{"allowed":false,"status":{"reason":"invalid
persistent volume \"pv-cifs-freeipa2-freeipa2-share-xx\""}}}"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"[read] I/O error: Socket is closed"
[2018-07-26 16:28:12,193][XNIO-2 task-7] DEBUG wire - http-outgoing-
79 <<
"[read] I/O error: Socket is closed"
but i'm not getting any content back from the output stream and i'm not
<httpclient.version>4.5.5</httpclient.version>
<httpcore.version>4.4.10</httpcore.version>
<httpmime.version>4.5.5</httpmime.version>
What else should I be looking for?
Thanks
Please post a snippet of your code and a _complete_ wire / context log
as an attachment.

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Marc Boorshtein
2018-07-26 20:47:45 UTC
Permalink
Post by Oleg Kalnichevski
Please post a snippet of your code and a _complete_ wire / context log
as an attachment.
Oleg
Here's where I make the connection and do the request:
https://github.com/TremoloSecurity/OpenUnison/blob/1.0.15/unison/unison-server-core/src/main/java/com/tremolosecurity/proxy/postProcess/PushRequestProcess.java#L81

Here's the code i'm using to read the output stream:
https://github.com/TremoloSecurity/OpenUnison/blob/1.0.15/unison/unison-server-core/src/main/java/com/tremolosecurity/proxy/ConfigSys.java#L460

Attached is the full wire log for both a GET and a POST

Thanks
Marc
Marc Boorshtein
2018-07-27 00:17:32 UTC
Permalink
Post by Marc Boorshtein
Attached is the full wire log for both a GET and a POST
I realized i hadn't attached the logs you were looking for. I added the
context log in addition the wire log. I figured out the problem is i'm
asynchronously closing the connection object before the response
completes. Sorry for the false alarm.

Thanks

Loading...