Incorrect "Please restart SABnzbd with a different port number." + solution sugg
Posted: September 17th, 2010, 9:00 am
It has been discussed before: the error message "Please restart SABnzbd with a different port number." happens a lot, and ... can be incorrect.
Here's my explanation, and my proposal:
SABnzbd will give the infamous error message below, including the advice "Please restart SABnzbd with a different port number.", if it cannot bind to the IP address & port it tried. The advice is true if the port/socket is in use, but it's incorrect if the IP address is incorrect (read: not local). So, if SAB tries to bind to 192.168.1.10:8080 with 192.168.1.10 not locatl on this computer, SAB will advice ... to use a differente port. That's incorrect; SAB should say something like "Please restart SABnzbd with a different port number AND/OR a different IP address.". But (read on) ...
As that's quite complex for a user, and SAB itself can help, I suggest the following: instead of only port-hunting, SAB should do some kind of IP address hunting, and in an easy and pre-defined way:
If SAB cannot bind to the IP:PORT specified, it should try in this sequence:
127.0.0.1:PORT
[::1]
ORT
127.0.0.1:8085
[::1]:8085
127.0.0.1:16016
[::1]:16016
(I'm not sure about trying 0.0.0.0: is 0.0.0.0 'easier' / more tolerant than 127.0.0.1? And is it too unsecure as it makes SAB open to the network?)
With the above, I think we solve a bug, and make it easier for users to get and keep SAB working.
How about it?
Here's my explanation, and my proposal:
SABnzbd will give the infamous error message below, including the advice "Please restart SABnzbd with a different port number.", if it cannot bind to the IP address & port it tried. The advice is true if the port/socket is in use, but it's incorrect if the IP address is incorrect (read: not local). So, if SAB tries to bind to 192.168.1.10:8080 with 192.168.1.10 not locatl on this computer, SAB will advice ... to use a differente port. That's incorrect; SAB should say something like "Please restart SABnzbd with a different port number AND/OR a different IP address.". But (read on) ...
As that's quite complex for a user, and SAB itself can help, I suggest the following: instead of only port-hunting, SAB should do some kind of IP address hunting, and in an easy and pre-defined way:
If SAB cannot bind to the IP:PORT specified, it should try in this sequence:
127.0.0.1:PORT
[::1]
127.0.0.1:8085
[::1]:8085
127.0.0.1:16016
[::1]:16016
(I'm not sure about trying 0.0.0.0: is 0.0.0.0 'easier' / more tolerant than 127.0.0.1? And is it too unsecure as it makes SAB open to the network?)
With the above, I think we solve a bug, and make it easier for users to get and keep SAB working.
How about it?
Welcome to SABnzbd-console.exe 0.5.4
SABnzbd needs a free tcp/ip port for its internal web server.
Port 8080 on 192.168.1.10 was tried , but the account used for SABnzbd has no permission to use it.
On OSX and Linux systems, normal users must use ports above 1023.
Please restart SABnzbd with a different port number.
Press Startkey+R and type the line (example):
"C:\Program Files\SABnzbd\SABnzbd-console.exe" --server 192.168.1.10:8081
If you get this error message again, please try a different number.
Program did not start!