[jitsi-dev] Authentication window on re-transmission


#1

Hi,

It seems there is a bug which makes Jitsi display SIP Authentication
window on re-transmission.

How to replicate:

1. First we will need three components
    a) SIP server (OpenSIPs in my case)
    b) router (Linux machine)
    c) PC running Jitsi

our test environment needs to be set up as follows:

[Jitis PC] <---> [ router ] <---> [ SIP server ]

All three components can be running on a single machine using
Virtualisation (Virtualbox in my case).

2. Start Jitsi and register it with the SIP server.

3. To make Jitsi retransmit packets run the following commands on the
router to simulate 400ms latency and 50% packet loss:

sudo tc qdisc add dev eth0 root netem delay 400ms
sudo tc qdisc change dev eth0 root netem loss 50%

4. Make Jitsi send PUBLISH packets by changing status few times.

Current behaviour:
Jitsi retransmits packets only for about 2 seconds and displays SIP
Authentication window.

Expected behaviour:
Jitis should continue re-transmission for much longer (4-5 seconds?)
and if unsuccessful display error message in notification area.

Attachments:
1. log file: http://dl.dropbox.com/u/3182365/jitsi-retrans.log - line
3219 - PUBLISH that caused SIP Authentication window to pop-up

2. pcap file: http://dl.dropbox.com/u/3182365/jitsi-retrans.pcap -
packet no. 47 - PUBLISH that caused SIP Authentication window to
pop-up

3. png image: http://dl.dropbox.com/u/3182365/Jitsi-auth.png - SIP
Authentication window.

Best regards,
Chris


#2

Hi Chris,

I was trying to reproduce this, but I was unable (testing with ippi).
In the logs and the packet you point (line 3219) its a PUBLISH message
with cseq 7. Before it, in response to sending PUBLISH message with
cseq 6 you got 407 authentication required and message with cseq 7 is
the one with the authentication, although the message is resend
several times, finally it is received from server. The response of the
server is again "407 authentication required" which triggers the
authentication dialog. All this is normal and have nothing to do with
re-transmission. Or there is a problem with the authentication or
there is some other reason for the server to respond again with error
407, you can check that. You can also test this situation at your side
with other server like ippi.

Regards
damencho

···

On Mon, Oct 10, 2011 at 10:12 PM, Chris Maciejewski <chris@wima.co.uk> wrote:

Hi,

It seems there is a bug which makes Jitsi display SIP Authentication
window on re-transmission.

How to replicate:

1. First we will need three components
a) SIP server (OpenSIPs in my case)
b) router (Linux machine)
c) PC running Jitsi

our test environment needs to be set up as follows:

[Jitis PC] <---> [ router ] <---> [ SIP server ]

All three components can be running on a single machine using
Virtualisation (Virtualbox in my case).

2. Start Jitsi and register it with the SIP server.

3. To make Jitsi retransmit packets run the following commands on the
router to simulate 400ms latency and 50% packet loss:

sudo tc qdisc add dev eth0 root netem delay 400ms
sudo tc qdisc change dev eth0 root netem loss 50%

4. Make Jitsi send PUBLISH packets by changing status few times.

Current behaviour:
Jitsi retransmits packets only for about 2 seconds and displays SIP
Authentication window.

Expected behaviour:
Jitis should continue re-transmission for much longer (4-5 seconds?)
and if unsuccessful display error message in notification area.

Attachments:
1. log file: http://dl.dropbox.com/u/3182365/jitsi-retrans.log - line
3219 - PUBLISH that caused SIP Authentication window to pop-up

2. pcap file: http://dl.dropbox.com/u/3182365/jitsi-retrans.pcap -
packet no. 47 - PUBLISH that caused SIP Authentication window to
pop-up

3. png image: http://dl.dropbox.com/u/3182365/Jitsi-auth.png - SIP
Authentication window.

Best regards,
Chris


#3

Hi Damian,

Many thanks for looking into this.

Indeed after further investigation it turned out our SIP server was
processing PUBLISH authentication in stateless mode. This resulted in
retransmissions being treated as new transactions and "Nonce" in every
407 challenge was different.

Once we switched to statefull processing Nonce in all 407 challenges
within the same transaction are the same and everything works OK.

Best regards,
Chris

···

On 19 October 2011 07:27, Damian Minkov <damencho@jitsi.org> wrote:

Hi Chris,

I was trying to reproduce this, but I was unable (testing with ippi).
In the logs and the packet you point (line 3219) its a PUBLISH message
with cseq 7. Before it, in response to sending PUBLISH message with
cseq 6 you got 407 authentication required and message with cseq 7 is
the one with the authentication, although the message is resend
several times, finally it is received from server. The response of the
server is again "407 authentication required" which triggers the
authentication dialog. All this is normal and have nothing to do with
re-transmission. Or there is a problem with the authentication or
there is some other reason for the server to respond again with error
407, you can check that. You can also test this situation at your side
with other server like ippi.

Regards
damencho

On Mon, Oct 10, 2011 at 10:12 PM, Chris Maciejewski <chris@wima.co.uk> wrote:

Hi,

It seems there is a bug which makes Jitsi display SIP Authentication
window on re-transmission.

How to replicate:

1. First we will need three components
a) SIP server (OpenSIPs in my case)
b) router (Linux machine)
c) PC running Jitsi

our test environment needs to be set up as follows:

[Jitis PC] <---> [ router ] <---> [ SIP server ]

All three components can be running on a single machine using
Virtualisation (Virtualbox in my case).

2. Start Jitsi and register it with the SIP server.

3. To make Jitsi retransmit packets run the following commands on the
router to simulate 400ms latency and 50% packet loss:

sudo tc qdisc add dev eth0 root netem delay 400ms
sudo tc qdisc change dev eth0 root netem loss 50%

4. Make Jitsi send PUBLISH packets by changing status few times.

Current behaviour:
Jitsi retransmits packets only for about 2 seconds and displays SIP
Authentication window.

Expected behaviour:
Jitis should continue re-transmission for much longer (4-5 seconds?)
and if unsuccessful display error message in notification area.

Attachments:
1. log file: http://dl.dropbox.com/u/3182365/jitsi-retrans.log - line
3219 - PUBLISH that caused SIP Authentication window to pop-up

2. pcap file: http://dl.dropbox.com/u/3182365/jitsi-retrans.pcap -
packet no. 47 - PUBLISH that caused SIP Authentication window to
pop-up

3. png image: http://dl.dropbox.com/u/3182365/Jitsi-auth.png - SIP
Authentication window.

Best regards,
Chris