Page 1 of 1
SAB not remembering the hostname settings
Posted: May 20th, 2024, 7:21 pm
by Antidamage
4.3.2RC1 [8b93410]
Windows 10 Pro 64 22H2
SAB doesn't remember the field "SABNZBD Host" when it's set to a hostname rather than an IP.
For example, when using a Tailscale hostname it will always reset to numeric localhost on restart. However it retains it during the normal settings-update reset after entering the hostname, so the hostname does work. It's just only for that one application session.
This has been a problem for a couple of versions now including stable releases, and is also broken in the beta, however it did retain the hostname a few versions back when I installed it last year.
Re: SAB not remembering the hostname settings
Posted: May 21st, 2024, 12:35 am
by safihre
I think you are either using the Safe start option or somewhere in the script or shortcut that you use to start SABnzbd, the --server command line parameter is used.
This overrides user configured host and port one on startup.
Re: SAB not remembering the hostname settings
Posted: May 26th, 2024, 5:49 am
by Antidamage
I'm not running in safe mode. SAB is running at startup. Otherwise, I run the app directly using its shortcut, no arguments.
I found the config, and it's correct:
Code: Select all
host = <domain host, can't post because new user>
port = 6969
Note that the port is preserved when the host is not, so it's not a case of the wrong config or no config being used.
Re: SAB not remembering the hostname settings
Posted: May 26th, 2024, 7:08 am
by safihre
Ah now I understand.
From the code I can see that when a hostname is set, we try go resolve it. Only if we can resolve it, we bind to it. As a safety measure.
Otherwise we try to find the ip of the device hostname and use that.
Re: SAB not remembering the hostname settings
Posted: May 26th, 2024, 6:18 pm
by Antidamage
Aha. It takes Tailscale a minute to start up after reboot and bind to the host, so I guess that's when SAB fails. I guess I could try mapping it in the hosts file to localhost just on the host machine.
Just tested that quickly and it did not work. SAB bound directly to localhost anyway, and accessing it by hostname didn't work even with the hosts file redirect in place.
It does need to bind to the host for me because I use that to access it externally.
There's probably a good solution in here somewhere though. This feels a bit "smart" - it's been given a directive, should the application really be trying to decide if the directive is invalid and then doing something else based on a single test? Would a retry period be better?
Re: SAB not remembering the hostname settings
Posted: May 27th, 2024, 1:53 am
by safihre
It's doing so because we have a lot of novice users that configure things that end up breaking.
So throughout the years the whole application is filled with safeguards against users breaking things.
The really advanced users usually prefer NZBGet as there they can do anything

Re: SAB not remembering the hostname settings
Posted: May 27th, 2024, 7:10 am
by sander
Antidamage wrote: ↑May 26th, 2024, 6:18 pm
Aha. It takes Tailscale a minute to start up after reboot and bind to the host, so I guess that's when SAB fails.
How about: you delay the startup of SABnzbd.
If on Windows:
https://community.qlik.com/t5/Official- ... -p/1717094 (you must make SABnzbd a Windows service, see
https://sabnzbd.org/wiki/advanced/sabnz ... ws-service )
If on Linux/Unix: crontab with a "sleep 120 && blabla SABnzbd blabla"
Re: SAB not remembering the hostname settings
Posted: May 27th, 2024, 6:06 pm
by Antidamage
I switched to SAB from NZBGET because it was unreliable and wouldn't run at startup
I'll try the delay, thanks!