Issue 250 in sipservlets: Fallback to second DNS Record is not even attempted in event of TCP Connection failure

2 views
Skip to first unread message

sipse...@googlecode.com

unread,
Jan 8, 2014, 5:54:21 AM1/8/14
to mobicents-all-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-Sip-Servlets MSS-3.0.0.FINAL
Roadmap-Fix

New issue 250 by girish...@gmail.com: Fallback to second DNS Record is not
even attempted in event of TCP Connection failure
http://code.google.com/p/sipservlets/issues/detail?id=250

What steps will reproduce the problem?

1. Setup DNS Server (bind or dnsmasq) with 2 A records for host
machine.yourdomain.com pointing to machines with IP address 10.10.10.10 and
20.20.20.20.
2. Write a simple app to create and send a new Sip Message request to host
sip:machine.yourdomain.com;transport=tcp as Route header.
3. Deploy and start the app. Capture the generated Sip requests and TCP
messages using wireshark


What is the expected output? What do you see instead?

Mobicents should initiate Sip Transaction to one machine over TCP transport
after DNS lookup. In case of no response or connection failure, invoke
connection to second machine.

Observed that Mobicents falls back to second machine as expected only in
case of no response; i.e. when there is already a TCP connection with
target machine and that does not send back a response within transaction
lifetime of 32 seconds.
However when there is no TCP connection already in place with first machine
and Mobicents tries to create one, observed that it directly throws back
SocketException to application in event of TCP connection failure. It does
not even attempts connection to the second machine.


What version of the product are you using? On what operating system?

mss-1.7.0.FINAL-apache-tomcat-6.0.35 on Redhat 6


Please provide any additional information below.

Section 4.3 of RFC 3263 mentions following procedure to process outgoing
SIP request for which multiple SRV records are returned in DNS lookup:

For SIP requests, failure occurs if the transaction layer reports a
503 error response or a transport failure of some sort (generally,
due to fatal ICMP errors in UDP or connection failures in TCP).
Failure also occurs if the transaction layer times out without ever
having received any response, provisional or final (i.e., timer B or
timer F in RFC 3261 [1] fires). If a failure occurs, the client
SHOULD create a new request, which is identical to the previous, but
has a different value of the Via branch ID than the previous (and
therefore constitutes a new SIP transaction). That request is sent
to the next element in the list as specified by RFC 2782.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sipse...@googlecode.com

unread,
Apr 25, 2014, 3:24:03 PM4/25/14
to mobicents-all-...@googlegroups.com
Updates:
Status: Pending
Owner: jean.der...@telestax.com

Comment #1 on issue 250 by jean.deruelle: Fallback to second DNS Record is
not even attempted in event of TCP Connection failure
http://code.google.com/p/sipservlets/issues/detail?id=250

Can you attach the wireshard and logs of the server with category
org.mobicents at DEBUG level ?

sipse...@googlecode.com

unread,
Apr 25, 2014, 3:25:03 PM4/25/14
to mobicents-all-...@googlegroups.com

Comment #2 on issue 250 by jean.deruelle: Fallback to second DNS Record is
not even attempted in event of TCP Connection failure
http://code.google.com/p/sipservlets/issues/detail?id=250

Also please try with latest SNAPSHOT from
https://mobicents.ci.cloudbees.com/job/Mobicents-SipServlets-Release/lastSuccessfulBuild/artifact/

sipse...@googlecode.com

unread,
May 5, 2014, 1:08:19 PM5/5/14
to mobicents-all-...@googlegroups.com
Updates:
Status: Started

Comment #3 on issue 250 by jean.deruelle: Fallback to second DNS Record is
not even attempted in event of TCP Connection failure
http://code.google.com/p/sipservlets/issues/detail?id=250

(No comment was entered for this change.)

sipse...@googlecode.com

unread,
May 5, 2014, 1:09:19 PM5/5/14
to mobicents-all-...@googlegroups.com
Updates:
Labels: TelScale-7.0.2.GA

Comment #4 on issue 250 by jean.deruelle: Fallback to second DNS Record is

sipse...@googlecode.com

unread,
May 6, 2014, 10:46:55 AM5/6/14
to mobicents-all-...@googlegroups.com

Comment #5 on issue 250 by jean.der...@telestax.com: Fallback to second DNS
Record is not even attempted in event of TCP Connection failure
http://code.google.com/p/sipservlets/issues/detail?id=250

This issue was updated by revision 1d50592797c0.


fix + non regression test

(cherry picked from commit 4295437a866dc77d7c3bd21fa9e76b24be75f1fd)

sipse...@googlecode.com

unread,
May 6, 2014, 10:47:55 AM5/6/14
to mobicents-all-...@googlegroups.com
Updates:
Status: Fixed

Comment #6 on issue 250 by jean.deruelle: Fallback to second DNS Record is
not even attempted in event of TCP Connection failure
http://code.google.com/p/sipservlets/issues/detail?id=250

(No comment was entered for this change.)

sipse...@googlecode.com

unread,
Jun 23, 2014, 5:36:20 AM6/23/14
to mobicents-all-...@googlegroups.com

Comment #7 on issue 250 by girish...@gmail.com: Fallback to second DNS
Record is not even attempted in event of TCP Connection failure
http://code.google.com/p/sipservlets/issues/detail?id=250

Tested this fix on MSS 3.0.0 SNAPSHOT build 1405281653 and observed that
TCP connection to all DNS records are attempted now. However, found that
existing Error Handling related to TCP connection failure seems to have got
broken by this fix as explained below.

When Sip Request is being sent out over TCP transport, the send operation
can fail in following two ways:
1. There is no TCP Server listening on remote target and TCP SYN packet is
not answered causing TCP connection attempt to fail. Earlier,
SocketException was thrown by Container back to application on
SipServletRequest.send() call in event of this TCP Connection failure.
However, no exception is being thrown by container now and hence
Application does not get any intimation whenever such a TCP Connection
failure happens. Although, Container does attempt all TCP targets with TCP
SYN packet now which was not done earlier.
2. TCP Connection to remote is successful (or there was already a active
connection to TCP target) and Sip Request is delivered over the TCP
connection to remote. In such a scenario, timer F is started by container.
If no response is received for the delivered request before expiry of F
timer i.e. 32 seconds, application is notified with 408 Timeout Response.
This functionality was also working fine with MSS 1.7.0, but not in MSS
3.0.0 and hence application is not getting notified at all about failure of
outgoing Sip Request.

As explained above, application is not receiving any callback or exception
from MSS container 3.0.0 in event of TCP connection failure. Has there been
some change in this functionality or is this a new issue?

sipse...@googlecode.com

unread,
Jun 23, 2014, 9:00:49 AM6/23/14
to mobicents-all-...@googlegroups.com
Updates:
Status: Reopened

Comment #8 on issue 250 by jean.der...@telestax.com: Fallback to second DNS
Record is not even attempted in event of TCP Connection failure
http://code.google.com/p/sipservlets/issues/detail?id=250

I'm reopening the issue to investigate those new issues

sipse...@googlecode.com

unread,
Jul 14, 2014, 11:50:02 AM7/14/14
to mobicents-all-...@googlegroups.com

Comment #9 on issue 250 by flavioba...@gmail.com: Fallback to second DNS
Record is not even attempted in event of TCP Connection failure
http://code.google.com/p/sipservlets/issues/detail?id=250

Hi, any news on this issue. I'm encountering into same scenario (1) as
described above.

sipse...@googlecode.com

unread,
Dec 18, 2014, 1:55:32 AM12/18/14
to mobicents-all-...@googlegroups.com

Comment #10 on issue 250 by desi.pep...@telestax.com: Fallback to second
DNS Record is not even attempted in event of TCP Connection failure
https://code.google.com/p/sipservlets/issues/detail?id=250

Issue was moved to GitHub:

https://github.com/Mobicents/sip-servlets/issues/35

sipse...@googlecode.com

unread,
Jun 25, 2015, 12:10:35 PM6/25/15
to mobicents-all-...@googlegroups.com

Comment #12 on issue 250 by jean.deruelle: Fallback to second DNS Record is
not even attempted in event of TCP Connection failure
https://code.google.com/p/sipservlets/issues/detail?id=250

Can you guys retry with the latest build from
https://mobicents.ci.cloudbees.com/job/MobicentsSipServlets-Release/ to see
if that works. Some recent fixes were made to that.
Reply all
Reply to author
Forward
0 new messages