Page 1 of 1

Error changing server settings when DNS resolution is unavailable.

Posted: March 9th, 2010, 10:56 pm
by madwoota
Hi, this is only a minor bug since it's easily avoided by simply updating the .ini, but I keep hitting it because I keep forgetting about it :)

When you update server settings on the config page (eg: to disable it), Sab appears to attempt to validate the host name of the server in order to help you ensure your settings are correct. This is obviously a useful feature, however if you do not have a fully working nameserver available (ie: you are inside a corporate firewall that does not resolve external hosts), you cannot save any settings since the validation/name resolution fails.

This is the error message and the only input button on the error page is "Back", but your setting change is NOT saved.
Incorrect parameter
Server address "news.someserver.com:119" is not valid.

As a suggestion/resolution, change the error page to something more meaningful, but also change the "Back" button to a "Save anyway?" type of question to ignore the error and apply the setting change anyway.

Oh, and the HTML for the error page is invalid as it's missing the "" :)

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
           <title>SABnzbd+ 0.5.0 - ERROR:/title>
</head>
<body>
           <h3>Incorrect parameter</h3>
           Server address "news.someserver.com:119" is not valid.
           <br><br>
           <FORM><INPUT TYPE="BUTTON" VALUE="Back" ONCLICK="history.go(-1)"></FORM>
</body>
</html>

Version: 0.5.0 Final
OS: Win XP
Install-type: Zip file
Skin (if applicable): Classic
Firewall Software: Corporate (ie: not user controllable)
Are you using IPV6? no
Is the issue reproducible? yes

Re: Error changing server settings when DNS resolution is unavailable.

Posted: March 10th, 2010, 4:02 am
by shypike
You can simply "hack" the sabnzbd.ini file.

Do I understand this correctly?
You work behind a corporate firewall ?
You cannot reach external DNS servers,
but you can download anyway? Despite the firewall?
If so, this is too much of a fringe case to solve in a general way.

Re: Error changing server settings when DNS resolution is unavailable.

Posted: March 10th, 2010, 8:32 pm
by madwoota
shypike wrote: You can simply "hack" the sabnzbd.ini file.
Do I understand this correctly?
Correct, I can, however having a configuration page that cannot configure does seem a little odd :)
shypike wrote: You work behind a corporate firewall ?
You cannot reach external DNS servers,
but you can download anyway? Despite the firewall?
How I am able to download at work is unrelated to the issue, but basically, I have two servers configured. One I use when at home which simply has the regular news.server.com address in it and the second for use when at work with an SSL tunnel running on localhost in it. Sab then connects to the tunnel which is able to proxy the connection through the firewall.

The issue arises when I forget to disable the "home" server in Sab and need to change over to the "work" server. Since Sab can't resolve the name of the news server, it fails to apply the configuration and I have to close Sab, edit the config, reopen Sab. It's certainly not a big deal, and easily worked around, it's just one of those little annoyances that pops up now and then.

I had a random thought that I could just add the news server name/ip to my hosts file. So I tried that and now the config page works fine again. Bug "solved" :)