SAB not remembering the hostname settings

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Antidamage
Newbie
Newbie
Posts: 4
Joined: May 20th, 2024, 6:34 pm

SAB not remembering the hostname settings

Post 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.
User avatar
safihre
Administrator
Administrator
Posts: 5523
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SAB not remembering the hostname settings

Post 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.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Antidamage
Newbie
Newbie
Posts: 4
Joined: May 20th, 2024, 6:34 pm

Re: SAB not remembering the hostname settings

Post 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.
User avatar
safihre
Administrator
Administrator
Posts: 5523
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SAB not remembering the hostname settings

Post 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.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Antidamage
Newbie
Newbie
Posts: 4
Joined: May 20th, 2024, 6:34 pm

Re: SAB not remembering the hostname settings

Post 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?
User avatar
safihre
Administrator
Administrator
Posts: 5523
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SAB not remembering the hostname settings

Post 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 😅
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: SAB not remembering the hostname settings

Post 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"
Antidamage
Newbie
Newbie
Posts: 4
Joined: May 20th, 2024, 6:34 pm

Re: SAB not remembering the hostname settings

Post by Antidamage »

I switched to SAB from NZBGET because it was unreliable and wouldn't run at startup 😅

I'll try the delay, thanks!
Post Reply