Page 1 of 1
Pause of Song Stops Stream

Posted:
Tue Nov 28, 2006 7:54 pm
by crisbtreets
I just installed subsonic 2.9 on a new machine with Tomcat 5.5.20 and jre1.5.0_09. I am seeing a weird and annoying behavior that I don't see on other boxes. I am listening to a song with Winamp through subsonic, I pause the song and try to play it a few seconds latter. The song plays a few second (probably what ever was cached) and the stops. When I look at the log i see this:
[11/28/06 2:41:51 PM EST] INFO StreamController Opening new song E:\My Music\song.mp3
[11/28/06 2:42:19 PM EST] INFO SecurityService Updated user crisbtreets
[11/28/06 2:42:19 PM EST] INFO StreamController Stopping stream crisbtreets@[ip]:32789 (WinampMPEG/5.24)
I paused the song between the first and second line. Why would pausing a song cause an update to my user?

Posted:
Wed Nov 29, 2006 2:41 pm
by sindre_mehus
Hi,
Apparently Winamp shuts down the connection when you pause. The "updated user" log is due to the fact that user statistics is updated every time a connection is ended.
Sindre

Posted:
Wed Nov 29, 2006 5:24 pm
by crisbtreets
I have been using the same install of winamp before and the pause worked fine. The only thing that has changed is my Subsonic install. Do you know if there is a setting to keep the connection alive?

Posted:
Thu Nov 30, 2006 6:15 pm
by crisbtreets
I did a netstat of what was going on and found something interesting. I started up a new stream and saw this.
Log File:
INFO StreamController Starting stream crisbtreets@ip:64374 (WinampMPEG/5.32)
Netstat:
TCP host:8080 ip:64026 ESTABLISHED
TCP host:8080 ip:64028 ESTABLISHED
TCP host:8080 ip:64374 ESTABLISHED
Then when I paused I see this:
Log:
INFO SecurityService Updated user crisbtreets
INFO StreamController Stopping stream crisbtreets@ip:64374 (WinampMPEG/5.32)
Netstat:
TCP host:8080 ip:64026 ESTABLISHED
TCP host:8080 ip:64374 ESTABLISHED
TCP host:8080 ip:64496 ESTABLISHED
As you can see the port for the stream is still ESTABLISHED but one of the other ports has switched.
I then unpause and when I reach the end of the buffer I get this:
Netstat:
TCP host:8080 ip:64026 ESTABLISHED
TCP host:8080 ip:64374 TIME_WAIT
TCP host:8080 ip:64496 ESTABLISHED
Then I restart the stream:
Log:
INFO StreamController Starting stream crisbtreets@ip:65290 (WinampMPEG/5.32)
Netstat:
TCP host:8080 ip:64026 ESTABLISHED
TCP host:8080 ip:64496 ESTABLISHED
TCP host:8080 ip:65290 ESTABLISHED
I'm going to switch back to a previous version of subsonic and see what happens. Could this have anything to do with the version of Tomcat or Java?

Posted:
Fri Dec 01, 2006 6:50 pm
by crisbtreets
I seemed to have found a solution. Don't know which thing fixed it but I updated to the JDK instead of JRE and installed Tomcat without the "Native" option in the installer. Now I can pause for hours and return to the same part of the song, just like old times.

Posted:
Fri Dec 01, 2006 7:01 pm
by sindre_mehus
Hm, weird. Well, glad you found out of it - and thanks for sharing!
Sindre