Bugzilla – Bug 10913
Switch SqueezeCenter to another port if 9000 is in use
Last modified: 2009-09-08 09:22:06 UTC
If SqueezeCenter is installed on a system that already has port 9000 in use SqueezeCenter should switch to using another port without user intervention. Steps to reproduce: 1 Start with a system that has software using port 9000, I used Twonky. 2 Install SqueezeCenter. 3 Notice that after SqueezeCenter installs it is still trying to use port 9000 even though it is already in use and is blocked by Twonky. I have been told this used to work in previous versions of SqueezeCenter but I am not sure if this was a function of the installer or SqueezeCenter itself.
Just wanted to note that links to the web interface such as the one in SlimTray should be updated to the new port as well if not done already.
There's code in the Windows installer to do this. But for some reason that change is ignored when SC is started for the first time. Maybe it's just a malformatted prefs file. This needs to be fixed in 7.3.3 That said I was wondering whether we should move the port changing code to SC itself. Would be platform independant and would work post-install too. Imagine some WHS user was enabling Twonky _after_ SC installation. This might be post 7.3.x.
Steven - do you see this with any installer or only my "special" installer for WHS?
I see this behavior with both the "special" installer and the standard exe installer for Windows. I have not investigated this on Mac OS X. Supposedly support does get calls about this issue now and then and the solution has been to edit the prefs file. Dan, do you care to comment?
Just to be clear: the port is only change during initial setup. Once SC has been run, there's no more automatic port change, even if port 9000 is being used by someone else. Can you still confirm you see this fail on _initial_ setup? I only was able to reproduce with the build I did last week. BTW: the fallback port we were using (9010) is used by Twonky, too. Thus I'd like to move the port used to be dynamically defined at SC startup.
As far as I can tell this fails with initial setup with both the special installer and the Windows exe. To be clear this was tested on a HP EX485 WHS in a factory default state that already has Twonky installed and running. Is there anything else I can do to help?
Wait, 9010 is used by Twonky too? Maybe the port is being changed by SC after all. I'll take another look when I get a chance.
Michael notes this functionality should be working via our installer. Dean states this functionality should be moved into SC. Mickey to check with IANA about getting another port designated for us.
Dean suggests reserving ports 9011 and 9012. I'll see about getting them.
Link to the port request form http://www.iana.org/cgi-bin/usr-port-number.pl
So from the bug meeting this morning my understanding is this: * SC currently has port detection live and working that looks for 3483 & 9000 * If there's a conflict on 3483 we notify the user * If there's a conflict on 9000 the installer attempts a one-time change to use port 9010 to see if that fixes the problem? What's being proposed is to change our port dynamically to try to find a working port? Separately we're investigating acquiring a dedicated port (9011 or 9012) to avoid this trouble altogether. Am I close?
> Am I close? As close as you can get :-)
change 24864 - try harder if our httpport is busy. Go through a list of alternative ports before giving up.
Michael, SqueezeCenter still seems to be trying to use port 9000 with a system with Twonky installed. Perhaps I am not looking in the right place to check for the port. I started with an HP Windows Home Server that had Twonky 5 already installed and running. I then installed SC 7.3.3 24866 using the msi Add-in. After the install finished I checked the server.prefs file and it listed httpport: 9000. Is this the correct place to check what port SqueezeCenter is using? Is there another way to see if the port has changed?
Ooops... checked it in to 7.4 only... will backport.
change 24887 - backport change 24864 from 7.4. Steven - when testing this, look at the log for lines like the following: [09-02-05 09:21:09.2610] Slim::Web::HTTP::openport (219) Can't setup the listening port 9000 for the HTTP server: Address already in use [09-02-05 09:21:09.2619] Slim::Web::HTTP::openport (239) Previously configured port 9000 was busy - we're now using port 9001 instead
Sorry Michael, this is still not working for me on the HP Windows Home Server with Twonky installed and running. I tried with both the 7.3 and 7.4 nightly msi. After install SqueezeCenter is still trying to use port 9000 and is listed as such in the server.prefs file.
server.log?
could you please tell me how exactly you proceeded to reproduce this? Step-by-step.
Steven - testing on the WHS again it's indeed failing. Could you run another test on a different machine? I wonder what's special about the WHS: by default we don't bind our service to some specific IP address. If I do so, then the port would be detected as busy and SC would fall back to a different port. But leaving the host empty SC fails to see port 9000 is used by Twonky. I'm a bit puzzled.
change 24957 - try connecting to our httpport before setting it up. This should more reliably detect other processes using the same port.
Thanks Michael, that last change seems to have done it! Verified fixed with SqueezeCenter Version: 7.3.3 - 24957
This bug has been fixed in the 7.3.3 release version of SqueezeCenter! If you haven't already. please download the new version from http://www.logitechsqueezebox.com/support/download-squeezecenter.html If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.