Timeout occurred while trying to connect to server!
Posted: Thu Apr 28, 2022 8:26 am
Hi,
I am using HTTPAPI Ver 1.42 released 2020-10-12 .
We have a requirement where we need to post information to Azure. For this we are using http_response, also there is an x-functions-key that needs to be passed to connect to server. I am not able to connect to the server getting "Timeout occurred while trying to connect to server! " error. Please find below the code snippet.
Could you please tell me where I am going wrong?
http_debug(*On: '/tmp/httpdebug.txt');
http_xproc( HTTP_POINT_ADDL_HEADER : %paddr(addSpecialHeaders) );
Monitor;
http_response = http_string('POST':Url:P1data:'application/json');
On-Error;
errorMsg = http_error( xErrorNo );
http_comp('Error! xErrorNo: ' + %char(xErrorNo) +
' errorMsg: ' + errorMsg );
EndMon;
PaddSpecialHeaders...
P B
DaddSpecialHeaders...
D PI
D headersToAdd 32767a varying
*
headersToAdd = 'x-functions-key:' + 'uniquekey'
+ CRLF ;
Return;
PaddSpecialHeaders...
P E
Error-log:
************Beginning of data**************
HTTPAPI Ver 1.42 released 2020-10-12
NTLM Ver 1.4.0 released 2014-12-22
OS/400 Ver V7R3M0
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: XXX.COM
DNS server found: 10.250.1.1
DNS server found: 10.250.2.2
DNS server found: 10.178.200.20
Nagle's algorithm (TCP_NODELAY) disabled.
SetError() #7: Timeout occurred while trying to connect to server!
http_close(): entered
************End of Data********************
I am using HTTPAPI Ver 1.42 released 2020-10-12 .
We have a requirement where we need to post information to Azure. For this we are using http_response, also there is an x-functions-key that needs to be passed to connect to server. I am not able to connect to the server getting "Timeout occurred while trying to connect to server! " error. Please find below the code snippet.
Could you please tell me where I am going wrong?
http_debug(*On: '/tmp/httpdebug.txt');
http_xproc( HTTP_POINT_ADDL_HEADER : %paddr(addSpecialHeaders) );
Monitor;
http_response = http_string('POST':Url:P1data:'application/json');
On-Error;
errorMsg = http_error( xErrorNo );
http_comp('Error! xErrorNo: ' + %char(xErrorNo) +
' errorMsg: ' + errorMsg );
EndMon;
PaddSpecialHeaders...
P B
DaddSpecialHeaders...
D PI
D headersToAdd 32767a varying
*
headersToAdd = 'x-functions-key:' + 'uniquekey'
+ CRLF ;
Return;
PaddSpecialHeaders...
P E
Error-log:
************Beginning of data**************
HTTPAPI Ver 1.42 released 2020-10-12
NTLM Ver 1.4.0 released 2014-12-22
OS/400 Ver V7R3M0
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: XXX.COM
DNS server found: 10.250.1.1
DNS server found: 10.250.2.2
DNS server found: 10.178.200.20
Nagle's algorithm (TCP_NODELAY) disabled.
SetError() #7: Timeout occurred while trying to connect to server!
http_close(): entered
************End of Data********************