[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Socket Reset
Hi Mike,
It didn't try to parse the result, but it did receive the response. My
program got an error, so it did nothing with the information it received.
Here is my code trying to get the delivery receipt:
rc = http_url_post(%Trim(URL)
: pXmlBuffer + 2
: DataSize
: wResponse);
Right now, I'm only processing if rc = 1. Would rc = 30 when I get the
handshake error? If so, I could create a loop to retry until rc <> 30? I
think that would fix half my issue.
I've also attached the entire debug log, except the portions that are
sensitive.
Thanks,
Kevin
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike Krebs
Sent: Tuesday, June 2, 2015 2:34 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: Socket Reset
The HTTPAPI procedure didn't return an error after getting the 30 error
code?
It doesn't make sense that it just continued on and tried to parse the
result. In fact, I am surprised it went on to receive any data.
The error says it happened during the handshake - the sending server should
not have seen the request unless they count the initial contact as a
request. It is isn't a very secure connection if the request is sent before
the handshake is completed. Seems kind of weird.
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Kevin Wengert
Sent: Tuesday, June 2, 2015 12:24 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Socket Reset
Good Morning,
I've got a problem that I haven't seen before that is causing me fits. I'm
sending a vendor information about deliveries via HTTP. Using the same
port, I can request copies of the delivery receipts that I then email to
customers. It's important to note that on the same port, if I send an empty
request, if their webservice has an xml document describing an order
delivery, called an orderSummaryEvent, it will send that document as a
response.
Now, the problem. For each orderSummaryEvent, a unique id is included that
I use to get the copy of the delivery receipt. My customer reported that
one of these delivery receipts was missing, and I checked the debug log,
which contained this error:
(GSKit) I/O: A connection with a remote socket was reset by that socket.
ssl_error(406): (GSKit) I/O: A connection with a remote socket was reset by
that socket.
SetError() #30: SSL Handshake: (GSKit) I/O: A connection with a remote
socket was reset by that
At that point, it looks like my xml that requested the delivery receipt was
compromised. Normally, I can see the request in the debug log, but now it
doesn't show with the "senddoc(): entered" line in the debug line. Instead,
there is no data there, so the web service thinks I'm looking for an
orderSummaryEvent, and happily sends me one. This procedure has no idea
what to do with it and it gets lost.
I'd like to trap the remote socket reset error and retry the request again.
Any ideas how to go about doing that?
Thanks,
Kevin Wengert
<http://t.signauxsix.com/e1t/o/5/f18dQhb0S7ks8dDMPbW2n0x6l2B9gXrN7sKj6v5dlPl
N7fRYjzd7ldzW4X9Hrn1pctGFW4mgbKq1k1H6H0?si=5663939049816064&pi=6550b2cd-43c3
-4845-9c81-42099cac9078>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
************Beginning of data**************
HTTPAPI Ver 1.24 released 2012-01-23
OS/400 Ver V7R1M0
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: *******.COM
DNS server found: ***.***.***.***
DNS server found: ***.***.***.***
(GSKit) I/O: A connection with a remote socket was reset by that socket.
ssl_error(406): (GSKit) I/O: A connection with a remote socket was reset by that socket.
SetError() #30: SSL Handshake: (GSKit) I/O: A connection with a remote socket was reset by that
-------------------------------------------------------------------------------------
Dump of server-side certificate information:
-------------------------------------------------------------------------------------
Cert Validation Code = 0
(GSKit) An operation which is not valid for the current SSL session state was attempted.
ssl_error(5): (GSKit) An operation which is not valid for the current SSL session state was attempted.
(GSKit) An operation which is not valid for the current SSL session state was attempted.
File CCSID changed to1208
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: *******.COM
DNS server found: ***.***.***.***
DNS server found: ***.***.***.***
-------------------------------------------------------------------------------------
Dump of server-side certificate information:
-------------------------------------------------------------------------------------
Cert Validation Code = 0
-----BEGIN CERTIFICATE-----
xxxxx
-----END CERTIFICATE-----
...
not before: 20141223190000
Unknown Field: 19:00:00 23-12-2014
not after: 20151224185959
Unknown Field: 18:59:59 24-12-2015
pub key alg: 1.2.840.113549.1.1.5
Protocol Used: TLS Version 1
http_persist_post(): entered
http_persist_req(POST) entered.
http_long_ParseURL(): entered
do_oper(POST): entered
There are 0 cookies in the cache
POST /integration/outbound HTTP/1.1
Host: *.*.com
User-Agent: http-api/1.24
Content-Type: text/xml
system-name: *****
username: *****
password: *****
Content-Length: 0
senddoc(): entered
recvresp(): entered
SetError() #43: CommSSL_Read: time-out!
recvresp(): end with timeout
http_close(): entered
HTTPAPI Ver 1.24 released 2012-01-23
OS/400 Ver V7R1M0
File CCSID changed to1208
http_url_post(): entered
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: *****.COM
DNS server found: ***.***.***.***
DNS server found: ***.***.***.***
-------------------------------------------------------------------------------------
Dump of server-side certificate information:
-------------------------------------------------------------------------------------
Cert Validation Code = 0
-----BEGIN CERTIFICATE-----
xxxxx
-----END CERTIFICATE-----
...
not before: 20141223190000
Unknown Field: 19:00:00 23-12-2014
not after: 20151224185959
Unknown Field: 18:59:59 24-12-2015
pub key alg: 1.2.840.113549.1.1.5
Protocol Used: TLS Version 1
http_persist_post(): entered
http_persist_req(POST) entered.
http_long_ParseURL(): entered
do_oper(POST): entered
There are 0 cookies in the cache
POST /integration/outbound HTTP/1.1
Host: *.*.com
User-Agent: http-api/1.24
Content-Type: text/xml
system-name: *****
username: *****
password: *****
Content-Length: 0
senddoc(): entered
recvresp(): entered
HTTP/1.1 200 OK
Date: Wed, 27 May 2015 16:00:02 GMT
Server: Apache
Transfer-Encoding: chunked
Content-Type: text/xml;charset=ISO-8859-1
SetError() #13: HTTP/1.1 200 OK
recvresp(): end with 200
recvdoc parms: chunked 0
header_load_cookies() entered
recvchunk(): entered
get_chunk_size(): entered
1ff8
chunk size = 8184
get_chunk_size returned 8184
calling comm_blockread
<?xml version="1.0" encoding="UTF-8"?>
<orderStatusSummaryEvent xmlns= more data here ***
comm_blockread returned 8184
get_chunk_size(): entered
2000
chunk size = 8192
get_chunk_size returned 8192
calling comm_blockread
hdvw8/6GH/ySuP/AI3RRQAf8Lt+Hn/Qw/8Aklcf/G6P+F2/Dz/oYf8AySuP/jdFFAB/wu34ef8AQw/+SVx/8bo/4Xb8PP8AoYf/ACSuP/jdFFAB/wALt+Hn/Qw/+SVx/wDG6
50111</description><status>fulfilled</status><purposeNumber>Dry</purposeNumber><expectedQuantity>1</expectedQuantity><acceptedQuant
comm_blockread returned 8192
get_chunk_size(): entered
2000
chunk size = 8192
get_chunk_size returned 8192
calling comm_blockread
canned>true</scanned><serviceLevel>Item</serviceLevel><visitRef><visitId>253212</visitId></visitRef></orderItemStatusSummary><orderI
YpYg+FWkXVxFeeJ7/UvEt4jiVTqNwfIikzl/LhXCqjEDKHcMKB06gBqvxY0CB7iz0FLvxLqkSbvsmkQtMMbchjIoK7MlVJUsQW6HkUSeIPiJepDb2Pge0024kTL3Wo6pHLBC
comm_blockread returned 8192
get_chunk_size(): entered
2000
chunk size = 8192
get_chunk_size returned 8192
calling comm_blockread
SOtFFFAH//2Q==</contactSignature><orderPayment><orderNumber>2512553</orderNumber><amountDue>935.05</amountDue><totalTax>20.78</total
ue</scanned><expectedServiceQuantity>1</expectedServiceQuantity><acceptedQuantity>1</acceptedQuantity><voided>false</voided><service
comm_blockread returned 8192
get_chunk_size(): entered
3f8
chunk size = 1016
get_chunk_size returned 1016
calling comm_blockread
iceQuantity><acceptedQuantity>1</acceptedQuantity><voided>false</voided><serviceLevel>Item</serviceLevel><pickedFl>false</pickedFl><
comm_blockread returned 1016
get_chunk_size(): entered
0
chunk size = 0
get_chunk_size returned 0
http_close(): entered
HTTPAPI Ver 1.24 released 2012-01-23
OS/400 Ver V7R1M0
New XML iconv() objects set, xml_Remote=1208. xml_Local=1208
************End of Data********************
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------