Page 1 of 2

SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: June 26th, 2020, 3:20 am
by Mark_Muc
Hello ..
I am running 2 instances of SABNzbd .. one i start as a service (witch now worl fine)
and i have created a sceduled task staring @ systemstarts .. user SYSTEM.
This woked an all versions 2.xx .. but now ..it will start but can's acess it ..over teh port i specified in the sceduled task.
If i sart it manually (same call) it will start as it should!!

Hera are the command i use:

Target: "C:\Program Files\SABnzbd\SABnzbd.exe" --new --daemon --server 0.0.0.0:8899 -f "D:\ServerFolders\SABnzbd\ini\sabnzbd1.ini"
Start in / Working dir: "C:\Program Files\sabnzbd"
It worked with 2.9xx Versions but with 3.0 / beta 4 it won't stat as expected...

here is the sceduled task i use:

Code: Select all

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2012-12-14T13:15:21.8727859</Date>
    <Author>MaK</Author>
    <Description>Startet SABnzbd1 auf Port 8899 beim Systemstart ini in D:\ServerFolders\SABnzbd\ini\sabnzbd1.ini</Description>
    <URI>\SABnzbd_beim_start_working 64bit</URI>
  </RegistrationInfo>
  <Triggers>
    <BootTrigger>
      <Enabled>true</Enabled>
      <Delay>PT30S</Delay>
    </BootTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-18</UserId>
      <RunLevel>LeastPrivilege</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>false</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
    <Priority>7</Priority>
    <RestartOnFailure>
      <Interval>PT1M</Interval>
      <Count>5</Count>
    </RestartOnFailure>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>"C:\Program Files\sabnzbd\SABnzbd.exe"</Command>
      <Arguments>--new --deamon --server 0.0.0.0:8899 -f "D:\ServerFolders\SABnzbd\ini\sabnzbd1.ini"</Arguments>
      <WorkingDirectory>C:\Program Files\Sabnzbd</WorkingDirectory>
    </Exec>
  </Actions>
</Task>
I see it in the taskmanager running .. but not able to access it. I also can't find any .log file .. if i Start it over cmd-line a .log is writen as specified in the .ini.
it seems that the <Arguments> will be ignored.
maybe u can have a look @ it
Thanks
Mark_Muc

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: June 26th, 2020, 5:26 am
by safihre
Can you find the logs anywhere?

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: June 26th, 2020, 7:04 am
by Mark_Muc
as I wrote:
I also can't find any .log file
I looked everywere ..also hidden content ..seach for *.log ..
if i start it on command / linke ..i generated a log in the dir specified in the .ini
also on port :8080 no respond .. but it is running .. see it in taskmanager

Thx for look into it!!
Mark_Muc

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: June 26th, 2020, 8:05 am
by sander
use "resmon.exe" to find if SABnzbd is running, and on which port, and which address.

resmon.exe -> tab Network -> TCP connections. There sort on name, find sabnzbd.exe, and note Local address and Local Port.

... what do you see?

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: June 27th, 2020, 1:24 am
by Mark_Muc
Hello .. Sander
so tried like u told me.
That is very strange:
if i start over a sceduled task .. i can see it in tasmkan run and useing rescorces, looking in resmon the sabnzbd.exe is not vilsibe.
if i start it from cmd everything is fine and reachable.
I tried to add 2 pic to show u, but was not able to upload ..i can send via mail...
btw. i tried RC1..
Regards Mark_Muc

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: June 27th, 2020, 3:27 am
by sander
Oops. I was wrong: that "resmon.exe" only shows active connections, and if you can't connect, it shows no connections. So: catch22 / Baron von Munchausen.

So, I installed SABnzbd as a service on a Windows system, and did this:

Open a CMD box, and then find the SABnzbd process / service:

Code: Select all

C:\>tasklist | find /i "sabnzbd"
SABnzbd.exe                  10936 Services                   0     85.060 K
So, SAB is running, with PID / Process ID 10936.
Let's find the ip address and port it is listening on:

Code: Select all

C:\>netstat -aon | find "10936"
  TCP    127.0.0.1:8080         0.0.0.0:0              LISTENING       10936

So SAB is running, and listening on 127.0.0.1:8080 aka http:// 127.0.0.1:8080 or https:// 127.0.0.1:8080

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: June 27th, 2020, 6:23 am
by Mark_Muc
thanks fpr testing .. running sabnzbd as a service it works fine..
ONLY u run it as a sceduled task "task sceduler" I can't access ...
same call and switches from a CMD pronpt it works fine...
very strange .. but it worked the same way (didn't change anyzhing) in 2.9xx it works fine ...

I tried the commands:
as a service:

C:\Windows\system32>netstat -aon | find "9060"
TCP 0.0.0.0:8888 0.0.0.0:0 LISTENING 9060
TCP 192.168.11.50:8888 192.168.11.10:50556 ESTABLISHED 9060
TCP 192.168.11.50:8888 192.168.11.10:50867 ESTABLISHED 9060

C:\Windows\system32>netstat -aon | find "9060"
TCP 0.0.0.0:8888 0.0.0.0:0 LISTENING 9060
TCP 192.168.11.50:8888 192.168.11.10:50556 ESTABLISHED 9060
TCP 192.168.11.50:8888 192.168.11.10:50867 ESTABLISHED 9060

# looks OK to me and working

via sceduled task:
C:\Windows\system32>tasklist | find /i "sabnzbd"
SABnzbd.exe 7400 Services 0 51.500 K

C:\Windows\system32>netstat -aon | find "7400"

C:\Windows\system32>
# no respond ..

Mark_Muc

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: June 29th, 2020, 2:29 am
by safihre
Seems maybe like a permissions problem, that it isn't allowed to start when run as scheduled task?
Is there any mention of errors in the Windows Event Viewer? (Applications section)
After you start it, it should show something there.

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: June 29th, 2020, 5:55 am
by Mark_Muc
Hmm i now checkd everything .. and disabled virus scanning ...
in" C:\Program Files\" i mad a new DIR calles Sabnzb.2 (vor version 2.x) copied the 2.9x files to "C:\Program Files\SABnzbd.2"
just changed in the sceduled task sabnzbd to sabnzbd.2 (program and working dir)
really left everything as it was .. and it started and run without a problem ..
proof again back to "C:\Program Files\SABnzbd" and the same behavior like i discribed.
so it can't be anything with the permission .. the .exe might be not "signed of whatever
Regards
Mark_Muc

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: July 2nd, 2020, 4:37 am
by safihre
Hmm, I will have to look into this more.. Never used scheduled tasks before, have to see how to configure.

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: July 2nd, 2020, 4:48 am
by Mark_Muc
u can use the one i posted in the first post .. just copie the "code" as xyz.xml and just import it in the task sceduler .. change the dir's and u r fine

Mark_Muc

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: August 6th, 2020, 2:17 am
by Mark_Muc
Hello .. just checket with the final 3.0.0 .. same behavior ... just to let u know
Mark_Muc

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: August 9th, 2020, 11:11 am
by safihre
I know, just didn't have the time to dive into it yet :/

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: August 9th, 2020, 11:14 am
by Mark_Muc
no problem..

Re: SABnzbd-3.0.0Beta4 Windows 10 / Server Sceduled task

Posted: December 1st, 2020, 10:24 pm
by madgamer
Hello, any update on this? I'm having the exact same issue with the latest version. :'(