[OpenSIPS-Users] first async(rest_post) timeout fail

koce at mentalchallenge.tk koce at mentalchallenge.tk
Tue Feb 23 14:46:00 CET 2016


Hello I'm using OpenSIPS 2.1 latest from git and every time I call the 
first async(rest_post) function from my script I experience timeout,and 
the other calls to async(rest_post) after that point in the script are 
OK, as if the first call is like a ping to the http server it does not 
send any data to it,it only completes the TCP handshake.
  But if I put a dummy rest_post() function in front of the first 
async(rest_post) it will send the data that is assigned to it and after 
that the first async(rest_post) call and the rest that follow will 
execute as planned.
To test if there is something wrong with the server that I'm connecting 
to I tried another server that had nothing to do with the original just 
to see if I get the same result and YES the async(rest_post) to that 
server failed but the other async(rest_post) who are interacting with 
the original server executed without a hitch.
Also I think it's related to this 
https://github.com/OpenSIPS/opensips/issues/493 which is closed.
Could this be a possible bug,or am I missing something obvious ?
Also I installed curl 7.47.1 just to make sure it wasn't libcurl in 
question and the same scenario happened again.
the errors that I got in opensips.log
====================
Feb 23 10:49:43 /sbin/opensips[25985]: 
INFO:rest_client:start_async_http_req: curl_multi_timeout() returned -1, 
pausing 500ms...
Feb 23 10:49:44 /sbin/opensips[25985]: 
ERROR:rest_client:start_async_http_req: timeout while connecting to 
'http://192.168.100.3:2080/jsonrpc' (1 sec)
====================
Feb 23 12:28:08 /sbin/opensips[26219]: 
INFO:rest_client:start_async_http_req: curl_multi_timeout() returned -1, 
pausing 500ms...
Feb 23 12:28:08 /sbin/opensips[26219]: 
ERROR:rest_client:start_async_http_req: timeout while connecting to 
'http://192.168.100.2:80/jsonrpc' (1 sec)
====================
NOTE: the IP's are substituted from the real ones which are public.
I'm attaching 2 flows from wireshark.
-------------- next part --------------
|Time     | 192.168.100.1                         |
|         |                   | 192.168.100.3     |                   
|13.478816|         48460 > autodesk-nl           |TCP: 48460 > autodesk-nlm [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=1116077461 TSecr=0 WS=16
|         |(48460)  ------------------>  (2080)   |
|13.479858|         autodesk-nlm > 4846           |TCP: autodesk-nlm > 48460 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=1070513 TSecr=1116077461 WS=16
|         |(48460)  <------------------  (2080)   |
|13.479966|         48460 > autodesk-nl           |TCP: 48460 > autodesk-nlm [ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1116077461 TSecr=1070513
|         |(48460)  ------------------>  (2080)   |
|16.031527|         48460 > autodesk-nl           |TCP: 48460 > autodesk-nlm [FIN, ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1116078099 TSecr=1070513
|         |(48460)  ------------------>  (2080)   |
|16.032326|         48461 > autodesk-nl           |TCP: 48461 > autodesk-nlm [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=1116078099 TSecr=0 WS=16
|         |(48461)  ------------------>  (2080)   |
|16.032378|         autodesk-nlm > 4846           |TCP: autodesk-nlm > 48460 [FIN, ACK] Seq=1 Ack=2 Win=14480 Len=0 TSval=1071151 TSecr=1116078099
|         |(48460)  <------------------  (2080)   |
|16.032462|         48460 > autodesk-nl           |TCP: 48460 > autodesk-nlm [ACK] Seq=2 Ack=2 Win=14608 Len=0 TSval=1116078100 TSecr=1071151
|         |(48460)  ------------------>  (2080)   |
|16.033143|         autodesk-nlm > 4846           |TCP: autodesk-nlm > 48461 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=1071151 TSecr=1116078099 WS=16
|         |(48461)  <------------------  (2080)   |
|16.033239|         48461 > autodesk-nl           |TCP: 48461 > autodesk-nlm [ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1116078100 TSecr=1071151
|         |(48461)  ------------------>  (2080)   |
|16.038013|         48461 > autodesk-nl           |TCP: 48461 > autodesk-nlm [PSH, ACK] Seq=1 Ack=1 Win=14608 Len=267 TSval=1116078101 TSecr=1071151
|         |(48461)  ------------------>  (2080)   |
|16.038613|         autodesk-nlm > 4846           |TCP: autodesk-nlm > 48461 [ACK] Seq=1 Ack=268 Win=15552 Len=0 TSval=1071152 TSecr=1116078101
|         |(48461)  <------------------  (2080)   |
|16.045423|         autodesk-nlm > 4846           |TCP: autodesk-nlm > 48461 [PSH, ACK] Seq=1 Ack=268 Win=15552 Len=191 TSval=1071154 TSecr=1116078101
|         |(48461)  <------------------  (2080)   |
|16.045572|         48461 > autodesk-nl           |TCP: 48461 > autodesk-nlm [ACK] Seq=268 Ack=192 Win=15680 Len=0 TSval=1116078103 TSecr=1071154
|         |(48461)  ------------------>  (2080)   |
|16.046922|         48461 > autodesk-nl           |TCP: 48461 > autodesk-nlm [PSH, ACK] Seq=268 Ack=192 Win=15680 Len=233 TSval=1116078103 TSecr=1071154
|         |(48461)  ------------------>  (2080)   |
|16.053985|         autodesk-nlm > 4846           |TCP: autodesk-nlm > 48461 [PSH, ACK] Seq=192 Ack=501 Win=16624 Len=335 TSval=1071156 TSecr=1116078103
|         |(48461)  <------------------  (2080)   |
|16.092428|         48461 > autodesk-nl           |TCP: 48461 > autodesk-nlm [ACK] Seq=501 Ack=527 Win=16752 Len=0 TSval=1116078115 TSecr=1071156
|         |(48461)  ------------------>  (2080)   |
-------------- next part --------------
|Time     | 192.168.100.1                         | 192.168.100.3                         |
|         |                   | 192.168.100.2    |                   | 192.168.100.4   |                   
|125.441046|         34348 > http [SYN]            |                   |                   |TCP: 34348 > http [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=1151610264 TSecr=0 WS=16
|         |(34348)  ------------------>  (80)     |                   |                   |
|125.522126|         http > 34348 [SYN,            |                   |                   |TCP: http > 34348 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=1983621369 TSecr=1151610264 WS=16
|         |(34348)  <------------------  (80)     |                   |                   |
|125.522300|         34348 > http [ACK]            |                   |                   |TCP: 34348 > http [ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1151610284 TSecr=1983621369
|         |(34348)  ------------------>  (80)     |                   |                   |
|126.493138|         http > 34348 [SYN,            |                   |                   |TCP: http > 34348 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=1983621619 TSecr=1151610284 WS=16
|         |(34348)  <------------------  (80)     |                   |                   |
|126.493253|         [TCP Dup ACK 446#1]           |                   |                   |TCP: [TCP Dup ACK 446#1] 34348 > http [ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1151610527 TSecr=1983621369
|         |(34348)  ------------------>  (80)     |                   |                   |
|126.967732|         34348 > http [FIN,            |                   |                   |TCP: 34348 > http [FIN, ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1151610645 TSecr=1983621369
|         |(34348)  ------------------>  (80)     |                   |                   |
|126.969235|         50201 > autodesk-nl           |                   |                   |TCP: 50201 > autodesk-nlm [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=1151610646 TSecr=0 WS=16
|         |(50201)  -------------------------------------->  (2080)   |                   |
|126.969962|         autodesk-nlm > 5020           |                   |                   |TCP: autodesk-nlm > 50201 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=4294915804 TSecr=1151610646 WS=16
|         |(50201)  <--------------------------------------  (2080)   |                   |
|126.970070|         50201 > autodesk-nl           |                   |                   |TCP: 50201 > autodesk-nlm [ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1151610646 TSecr=4294915804
|         |(50201)  -------------------------------------->  (2080)   |                   |
|126.974942|         50201 > autodesk-nl           |                   |                   |TCP: 50201 > autodesk-nlm [PSH, ACK] Seq=1 Ack=1 Win=14608 Len=267 TSval=1151610647 TSecr=4294915804
|         |(50201)  -------------------------------------->  (2080)   |                   |
|126.975644|         autodesk-nlm > 5020           |                   |                   |TCP: autodesk-nlm > 50201 [ACK] Seq=1 Ack=268 Win=15552 Len=0 TSval=4294915805 TSecr=1151610647
|         |(50201)  <--------------------------------------  (2080)   |                   |
|126.990959|         autodesk-nlm > 5020           |                   |                   |TCP: autodesk-nlm > 50201 [PSH, ACK] Seq=1 Ack=268 Win=15552 Len=191 TSval=4294915809 TSecr=1151610647
|         |(50201)  <--------------------------------------  (2080)   |                   |
|126.991089|         50201 > autodesk-nl           |                   |                   |TCP: 50201 > autodesk-nlm [ACK] Seq=268 Ack=192 Win=15680 Len=0 TSval=1151610651 TSecr=4294915809
|         |(50201)  -------------------------------------->  (2080)   |                   |
|126.992782|         50201 > autodesk-nl           |                   |                   |TCP: 50201 > autodesk-nlm [PSH, ACK] Seq=268 Ack=192 Win=15680 Len=233 TSval=1151610652 TSecr=4294915809
|         |(50201)  -------------------------------------->  (2080)   |                   |
|127.018492|         autodesk-nlm > 5020           |                   |                   |TCP: autodesk-nlm > 50201 [PSH, ACK] Seq=192 Ack=501 Win=16624 Len=335 TSval=4294915816 TSecr=1151610652
|         |(50201)  <--------------------------------------  (2080)   |                   |
|127.023478|         http > 34348 [FIN,            |                   |                   |TCP: http > 34348 [FIN, ACK] Seq=1 Ack=2 Win=14480 Len=0 TSval=1983621750 TSecr=1151610645
|         |(34348)  <------------------  (80)     |                   |                   |
|127.023625|         34348 > http [ACK]            |                   |                   |TCP: 34348 > http [ACK] Seq=2 Ack=2 Win=14608 Len=0 TSval=1151610659 TSecr=1983621750
|         |(34348)  ------------------>  (80)     |                   |                   |
|127.056418|         50201 > autodesk-nl           |                   |                   |TCP: 50201 > autodesk-nlm [ACK] Seq=501 Ack=527 Win=16752 Len=0 TSval=1151610668 TSecr=4294915816
|         |(50201)  -------------------------------------->  (2080)   |                   |
|229.621405|         34350 > http [SYN]            |                   |                   |TCP: 34350 > http [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=1151636309 TSecr=0 WS=16
|         |(34350)  ------------------>  (80)     |                   |                   |
|229.677642|         http > 34350 [SYN,            |                   |                   |TCP: http > 34350 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=1983647414 TSecr=1151636309 WS=16
|         |(34350)  <------------------  (80)     |                   |                   |
|229.677783|         34350 > http [ACK]            |                   |                   |TCP: 34350 > http [ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1151636323 TSecr=1983647414
|         |(34350)  ------------------>  (80)     |                   |                   |
|230.898412|         http > 34350 [SYN,            |                   |                   |TCP: http > 34350 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=1983647714 TSecr=1151636323 WS=16
|         |(34350)  <------------------  (80)     |                   |                   |
|230.898533|         [TCP Dup ACK 1180#1           |                   |                   |TCP: [TCP Dup ACK 1180#1] 34350 > http [ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1151636628 TSecr=1983647414
|         |(34350)  ------------------>  (80)     |                   |                   |
|231.148399|         34350 > http [FIN,            |                   |                   |TCP: 34350 > http [FIN, ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1151636691 TSecr=1983647414
|         |(34350)  ------------------>  (80)     |                   |                   |
|231.149885|         50203 > autodesk-nl           |                   |                   |TCP: 50203 > autodesk-nlm [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=1151636691 TSecr=0 WS=16
|         |(50203)  -------------------------------------->  (2080)   |                   |
|231.150644|         autodesk-nlm > 5020           |                   |                   |TCP: autodesk-nlm > 50203 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=4294941849 TSecr=1151636691 WS=16
|         |(50203)  <--------------------------------------  (2080)   |                   |
|231.150760|         50203 > autodesk-nl           |                   |                   |TCP: 50203 > autodesk-nlm [ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=1151636691 TSecr=4294941849
|         |(50203)  -------------------------------------->  (2080)   |                   |
|231.155701|         50203 > autodesk-nl           |                   |                   |TCP: 50203 > autodesk-nlm [PSH, ACK] Seq=1 Ack=1 Win=14608 Len=267 TSval=1151636692 TSecr=4294941849
|         |(50203)  -------------------------------------->  (2080)   |                   |
|231.156551|         autodesk-nlm > 5020           |                   |                   |TCP: autodesk-nlm > 50203 [ACK] Seq=1 Ack=268 Win=15552 Len=0 TSval=4294941850 TSecr=1151636692
|         |(50203)  <--------------------------------------  (2080)   |                   |
|231.163825|         autodesk-nlm > 5020           |                   |                   |TCP: autodesk-nlm > 50203 [PSH, ACK] Seq=1 Ack=268 Win=15552 Len=191 TSval=4294941852 TSecr=1151636692
|         |(50203)  <--------------------------------------  (2080)   |                   |
|231.163953|         50203 > autodesk-nl           |                   |                   |TCP: 50203 > autodesk-nlm [ACK] Seq=268 Ack=192 Win=15680 Len=0 TSval=1151636694 TSecr=4294941852
|         |(50203)  -------------------------------------->  (2080)   |                   |
|231.165528|         50203 > autodesk-nl           |                   |                   |TCP: 50203 > autodesk-nlm [PSH, ACK] Seq=268 Ack=192 Win=15680 Len=233 TSval=1151636695 TSecr=4294941852
|         |(50203)  -------------------------------------->  (2080)   |                   |
|231.169193|         autodesk-nlm > 5020           |                   |                   |TCP: autodesk-nlm > 50203 [PSH, ACK] Seq=192 Ack=501 Win=16624 Len=335 TSval=4294941853 TSecr=1151636695
|         |(50203)  <--------------------------------------  (2080)   |                   |
|231.208346|         50203 > autodesk-nl           |                   |                   |TCP: 50203 > autodesk-nlm [ACK] Seq=501 Ack=527 Win=16752 Len=0 TSval=1151636706 TSecr=4294941853
|         |(50203)  -------------------------------------->  (2080)   |                   |
|231.208644|         http > 34350 [FIN,            |                   |                   |TCP: http > 34350 [FIN, ACK] Seq=1 Ack=2 Win=14480 Len=0 TSval=1983647796 TSecr=1151636691
|         |(34350)  <------------------  (80)     |                   |                   |
|231.208790|         34350 > http [ACK]            |                   |                   |TCP: 34350 > http [ACK] Seq=2 Ack=2 Win=14608 Len=0 TSval=1151636706 TSecr=1983647796
|         |(34350)  ------------------>  (80)     |                   |                   |
|231.433426|         64316 > http [SYN]            |                   |                   |TCP: 64316 > http [SYN] Seq=0 Win=15500 Len=0
|         |(80)     <----------------------------------------------------------  (64316)  |
|231.433590|         http > 64316 [RST,            |                   |                   |TCP: http > 64316 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
|         |(80)     ---------------------------------------------------------->  (64316)  |


More information about the Users mailing list