Page 1 of 2

SABnzbd as a Service not working [Windows]

Posted: December 10th, 2018, 5:09 am
by Angryprash
So i have a new Windows Server 2012 R2 virtual machine spun up, I'm trying to install SABnzbd on it and run as a service (so i don't have to log in trigger the auto-start)

I followed the wiki guide here and i see both the SABnzbd-service, and the helper service running, but even from the virtual machine localhost doesn't work until i manually start the program from C:\program files\Sabnzbd.

SABnzbd was installed with admin privileges on a standard user PVR account, but i modified the services to run under the Administrator account as it wasn't working under the 'local machine' default.

Is there something I'm missing? Any advice would be appreciated.

Re: SABnzbd as a Service not working.

Posted: December 11th, 2018, 2:20 am
by safihre
Did you specify the path to the sabnzbd.ini correctly?
I would see if in that path, in the admin folder, you can inspect the log.
Let' see if it's binding correctly to the ports and which port.
Maybe the firewall is blocking it.

Re: SABnzbd as a Service not working.

Posted: April 11th, 2019, 6:07 am
by Manuel1J
The helper service started but the SABnzbd service will not start. Then try to start it and look in the logs after starting it normally.




mybkexperience

Re: SABnzbd as a Service not working.

Posted: April 13th, 2019, 6:04 am
by goofee
I suddenly got the same problem. I had this working on the same machine for a while. I was on 2.3.2 then. I tried to upgrade to 2.3.8 but still the service doesn't start. I get the following error in event viewer:

The instance's SvcRun() method failed
Traceback (most recent call last):
File "win32serviceutil.pyo", line 839, in SvcRun
File "SABnzbd.pyo", line 1609, in SvcDoRun
File "SABnzbd.pyo", line 1015, in main
File "SABnzbd.pyo", line 265, in Bail_Out
File "sabnzbd\misc.pyo", line 835, in exit_sab
SystemExit: 2
%2: %3

Any tips gurus?

Thanks

Re: SABnzbd as a Service not working.

Posted: April 14th, 2019, 1:35 am
by safihre
Never seen it before. Maybe you can remove the services completly and add them (both) again?
Also make sure sabnzbd can run not as a service, with this sabnzbd.ini, maybe it's a configuration problem.
Or maybe a permissions problem?

Re: SABnzbd as a Service not working.

Posted: April 14th, 2019, 4:55 am
by goofee
Yeah i tried those things.

Reinstalled the services, still only the helper starts.

Sabnzbd runs fine it's not the ini-file.

I also tried to run the service as an administrator, that doesn't work either.

I guess i'll have to live with it, thanks for the tips though :)

Re: SABnzbd as a Service not working.

Posted: April 15th, 2019, 6:02 am
by Manuel1J
Stopped the installed sabnzbd service from starting automatically at windows logon then starting sabnzbd from the desktop.

Re: SABnzbd as a Service not working.

Posted: April 16th, 2019, 1:39 am
by safihre
You could also just add SABnzbd to your Start-up programs if you only want it to run on logon, the service-approach is to get it to run also without logon.

Is there any more to the error you get? Can you inspect some logs when you try to start SABnzbd?

Re: SABnzbd as a Service not working.

Posted: April 16th, 2019, 3:26 am
by goofee
Yeah but i want to run this without login because my usage for it is a server with vpn, sabnzbd and scp running only. I rarely login into it.

Well sure, here is the fault from sabnzbd:

Code: Select all

2019-04-13 12:57:36,010::INFO::[SABnzbd:1159] SABnzbd-service.exe-2.3.8 (rev=0dd1f647d8b672c8a992fc986f9b2ab5000dbbea)
2019-04-13 12:57:36,010::INFO::[SABnzbd:1160] Full executable path = C:\Program Files\SABnzbd\SABnzbd-service.exe
2019-04-13 12:57:36,010::INFO::[SABnzbd:1166] Platform = Windows-10-10.0.17763 (win64)
2019-04-13 12:57:36,010::INFO::[SABnzbd:1171] Python-version = 2.7.16 (v2.7.16:413a49145e, Mar  4 2019, 01:37:19) [MSC v.1500 64 bit (AMD64)]
2019-04-13 12:57:36,010::INFO::[SABnzbd:1172] Arguments = 
2019-04-13 12:57:36,010::INFO::[SABnzbd:1177] Preferred encoding = cp1252
2019-04-13 12:57:36,010::INFO::[SABnzbd:1187] SSL version = OpenSSL 1.0.2q  20 Nov 2018
2019-04-13 12:57:36,010::INFO::[SABnzbd:1194] Loaded additional certificates from C:\Program Files\SABnzbd\cacert.pem
2019-04-13 12:57:36,010::INFO::[SABnzbd:1235] Read INI file C:\Users\Work\AppData\Local\sabnzbd\sabnzbd.ini
2019-04-13 12:57:36,026::INFO::[postproc:100] Loading postproc queue
2019-04-13 12:57:36,994::INFO::[__init__:985] [N/A] C:\Users\Work\AppData\Local\sabnzbd\admin\Rating.sab missing
2019-04-13 12:57:36,994::INFO::[scheduler:207] Setting schedule for midnight BPS reset
2019-04-13 12:57:36,994::INFO::[__init__:349] All processes started
2019-04-13 12:57:36,994::INFO::[SABnzbd:285] Web dir is C:\Program Files\SABnzbd\interfaces\Glitter
2019-04-13 12:57:36,994::INFO::[SABnzbd:285] Web dir is C:\Program Files\SABnzbd\interfaces\Config
2019-04-13 12:57:36,994::INFO::[config:853] Writing settings to INI file C:\Users\Work\AppData\Local\sabnzbd\sabnzbd.ini
2019-04-13 12:57:37,010::INFO::[SABnzbd:409] SABYenc module (v3.3.5)... found!
2019-04-13 12:57:37,010::INFO::[SABnzbd:426] Cryptography module (v2.6.1)... found!
2019-04-13 12:57:37,010::INFO::[SABnzbd:431] par2 binary... found (C:\Program Files\SABnzbd\win\par2\par2.exe)
2019-04-13 12:57:37,010::INFO::[SABnzbd:436] MultiPar binary... found (C:\Program Files\SABnzbd\win\par2\multipar\par2j64.exe)
2019-04-13 12:57:37,010::INFO::[SABnzbd:441] UNRAR binary... found (C:\Program Files\SABnzbd\win\unrar\x64\UnRAR.exe)
2019-04-13 12:57:37,010::INFO::[SABnzbd:456] unzip-binærfil... IKKE funnet!
2019-04-13 12:57:37,010::INFO::[SABnzbd:459] 7za binary... found (C:\Program Files\SABnzbd\win\7zip\7za.exe)
2019-04-13 12:57:37,010::INFO::[SABnzbd:1391] Starting web-interface on 192.168.1.200:8080
2019-04-13 12:57:37,010::INFO::[_cplogging:219] [13/Apr/2019:12:57:37] ENGINE Bus STARTING
2019-04-13 12:57:37,026::ERROR::[_cplogging:219] [13/Apr/2019:12:57:37] ENGINE Error in HTTP server: shutting down
Traceback (most recent call last):
  File "cherrypy\process\servers.pyo", line 207, in _start_http_thread
  File "cherrypy\wsgiserver\__init__.pyo", line 2012, in start
error: No socket could be created -- (('192.168.1.200', 8080): [Errno 10049] The requested address is not valid in its context)

2019-04-13 12:57:37,026::INFO::[_cplogging:219] [13/Apr/2019:12:57:37] ENGINE Bus STOPPING
2019-04-13 12:57:37,026::INFO::[_cplogging:219] [13/Apr/2019:12:57:37] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('192.168.1.200', 8080)) already shut down
2019-04-13 12:57:37,026::INFO::[_cplogging:219] [13/Apr/2019:12:57:37] ENGINE Bus STOPPED
2019-04-13 12:57:37,026::INFO::[_cplogging:219] [13/Apr/2019:12:57:37] ENGINE Bus EXITING
2019-04-13 12:57:37,026::INFO::[_cplogging:219] [13/Apr/2019:12:57:37] ENGINE Bus EXITED
I don't understand the error: "The requested address is not valid in its context"

Could this be related?

What other logs and where would be useful for us to look at? I really want to fix this so i'm willing to troubleshoot extensively.

Thanks

Re: SABnzbd as a Service not working.

Posted: April 16th, 2019, 4:12 am
by goofee
I removed the address in the address field in the config to empty and the service now starts! Yippie!

But i still can't access sabnzbd before i login. What am i missing?

Re: SABnzbd as a Service not working.

Posted: April 16th, 2019, 3:15 pm
by goofee
Turns out the error i got was related and the address field could not be empty. I looked in the documentation and the field needs "::" to accept incoming requests on the local address.

I don't understand why this stopped working, but know the service runs perfectly! Thanks for all the help! :)

Re: SABnzbd as a Service not working.

Posted: April 18th, 2019, 2:17 am
by safihre
192.168.1.200 this has to be the IP adress assigned to your PC by your router. So it could be that due to DHCP your PC got a new router.
In that case it can't bind to 192.168.1.200 anymore.

Re: SABnzbd as a Service not working.

Posted: June 24th, 2019, 6:00 am
by bailiyat
safihre wrote: April 16th, 2019, 1:39 am You could also just add SABnzbd to your Start-up programs i Audacity Find My iPhone Origin f you only want it to run on logon, the service-approach is to get it to run also without logon.

Is there any more to the error you get? Can you inspect some logs when you try to start SABnzbd?
I followed the wiki guide here and i see both the SABnzbd-service, and the helper service running, but even from the virtual machine localhost doesn't work until i manually start the program from C:\program files\Sabnzbd.

Re: SABnzbd as a Service not working [Windows]

Posted: July 14th, 2019, 1:50 am
by safihre
What is the error you get?

Re: SABnzbd as a Service not working [Windows]

Posted: January 27th, 2020, 8:51 pm
by brannigan
Apologies for resurrecting a dead thread but I'm running into this issue running a Server 2019 install on an HP Z620 tower. Helper service starts without issue, when the saznzbd service starts I get an error and this is what is in the event viewer.
The instance's SvcRun() method failed
Traceback (most recent call last):
File "win32serviceutil.pyo", line 839, in SvcRun
File "SABnzbd.pyo", line 1615, in SvcDoRun
File "SABnzbd.pyo", line 1015, in main
File "SABnzbd.pyo", line 265, in Bail_Out
File "sabnzbd\misc.pyo", line 836, in exit_sab
SystemExit: 2
%2: %3

What I am noticing as I monkey with it is there is no log update in the saznzbd.log file related to the service when I attempt to start it, but when I manually shutdown the launched instance and go start the service it seems to start without complaint. I need to do a bit more testing and see but it seems to run into a conflict when you are connected and the console launcher is active. Not sure why it didn't work before I RDP'd in yet but will report back with more information.

Just thought this might be useful for others.