jacksonlcrews / darkice

Automatically exported from code.google.com/p/darkice
0 stars 0 forks source link

Reconnect doesn't work if there is a network outage #81

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Connect Darkice to a remote IceCast2 server normally 

2. Break the connection, but do NOT disconnect the cable from the darkice 
machine.  In other words, make sure the lan interface of the darkice machine 
does NOT go down.  If the 2 machines are directly connected, use a network 
switch so that the lights on the darkice network card do not go out.

3. Wait a few minutes and connect the cables again.

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

The expectation is that the darkice reconnects.  Instead, darkice is stuck with 
CLOSE_WAIT in the netstat -a because it doesn't receive an acknoldgement from 
icecast.  It will stay stuck forever until you restart darkice.

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

Debian Wheezy, Darkice 1.1 plus all changes through r506

Please provide any additional information below.

The reason you can't pull the cable from the darkice machine to test is because 
that will clear the CLOSE_WAIT's and you won't see the problem.

Because of this problem, it cannot reconnect if there is a network outage 
somewhere between the darkice and icecast until you restart darkice.

To fix:  This condition should be seen by darkice and corrected automatically.

Original issue reported on code.google.com by jandafie...@gmail.com on 11 Jan 2013 at 6:11

GoogleCodeExporter commented 9 years ago
After further testing, it seems that "CLOSE_WAIT" is not the issue.  
"CLOSE_WAIT" will eventually die off, and the application will correct itself.

The problem is that sometimes it gets stuck in the "ESTABLISHED" state in that 
same situation where there is a network outage... but the remote side (icecast) 
does not show any connection from darkice in netstat.

So, darkice *thinks* it is connected, but it isn't really... so it never 
reconnects.

Perhaps a TCP KeepAlive could be implemented?

Original comment by jandafie...@gmail.com on 11 Jan 2013 at 6:29

GoogleCodeExporter commented 9 years ago
Please check with the r529 version, it has addressed this issue.

Original comment by oetelaar.automatisering on 17 May 2013 at 9:00