PostProcessing doesnt work?

Get help with all aspects of 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.
Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

PostProcessing doesnt work?

Post by Usenet »

Hi!

IM having trouble getting the post processing script to run. I've made a RoboCopy.cmd file doing some string manipulation and moving files from the SABnzb computer to my NAS. Running the script manually works flawlessly. Looking in the logs it seems as it should work, or?

Code: Select all

2008-02-12 22:00:07,405::INFO::[assembler] Running external script C:\Program\SABnzbd\RobocopyScript.cmd C:\Program\SABnzbd\download\complete\NwsgroupPost NwsgroupPost.nzb
2008-02-12 22:00:07,405::INFO::[newsunpack] Spawning external command ['C:\\Program\\SABnzbd\\RobocopyScript.cmd', 'C:\\Program\\SABnzbd\\download\\complete\\NwsgroupPost', 'NwsgroupPost.nzb', 'NwsgroupPost', '']
2008-02-12 22:00:07,500::INFO::[assembler] Cleaning up NwsgroupPost.nzb
Could the double \\ be right?

-cheers

[rascalli edit ;  moved to right forum]
Last edited by rascalli on February 13th, 2008, 1:09 am, edited 1 time in total.

User avatar
shypike
Administrator
Administrator
Posts: 21043
Joined: January 18th, 2008, 12:49 pm

Re: PostProcessing doesnt work?

Post by shypike »

The double backslashes are OK, that's just a Python habit of displaying strings.
Be aware that all parameters passed to your script have double quotes around them.

What I do find strange is that your stuff is installed in "C:\Program\SABnzbd".
Normally it is installed in "C:\Program Files\SABnzbnd".

Is "C:\Program\SABnzbd" the correct location?
If not, how did you specify the location of your script to SABnzbd?

Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: PostProcessing doesnt work?

Post by Usenet »

I'm running SAB as a service and the path is correct (all languages doesn't use "Program Files" ;) ).

the double quotes, they could be the reason... unless it's some user right thing. THANKS for the tip!


A bit OT, but why specify dependency to TCP/IP when configuring as a service (from the wiki)?
The service stops working if i log in and the out from the system and Im suspecting the TCP/IP dependency...

User avatar
shypike
Administrator
Administrator
Posts: 21043
Joined: January 18th, 2008, 12:49 pm

Re: PostProcessing doesnt work?

Post by shypike »

As SABnzbd uses the TCP/IP stack, it is dependent on it.
Otherwise Windows may start SABnzbd before the TCP/IP stack is up and running.

When it stops on logout, there is definitively something wrong in your service setup.

I used it a service quite often, works ok.
Only when you stop SABnznd from the web interface, you have to stop and start the service again.
Last edited by shypike on February 13th, 2008, 10:16 am, edited 1 time in total.

Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: PostProcessing doesnt work?

Post by Usenet »

Thanks for the help, time to go home and test a bit more then ;)

Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: PostProcessing doesnt work?

Post by Usenet »

Still cant get the service to survive log off.
From information of srvany.exe:
Programming Considerations:

For  WIN32  graphical  applications:  when  the currently logged-in user is
logging-off,  all  WIN32  top-level  windows receive WM_QUERYENDSESSION and
WM_ENDSESSION  messages.  Some  WIN32 applications choose to terminate upon
receipt  of  such  messages. In order for your WIN32 application to survive
logoff,  it  must  not do that: instead, your windows procedure should call
the default windows procedure on these messages.

For  WIN32  Console  (i.e. character-mode) applications: when the currently
logged-in  user  is  logging-off,  all  Console  applications  receive  a
CTRL_LOGOFF_EVENT  event  from the Console. If your Console application has
registered  a  Console  event  handler (via SetConsoleCtrlHandler), it must
ignore CTRL_LOGOFF_EVENT in order  to survive the logoff.
I tried all sort of tricks to avoid killing the application even tried the sabnzbc.exe -d switch (wich i dont knof if its needed)

User avatar
shypike
Administrator
Administrator
Posts: 21043
Joined: January 18th, 2008, 12:49 pm

Re: PostProcessing doesnt work?

Post by shypike »

I haven't used it as a service for some time. :-\

I will run some tests soon.

BTW, maybe the trick is to run it as another user. Make a special account that doesn't login normally.
Last edited by shypike on February 13th, 2008, 3:59 pm, edited 1 time in total.

Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: PostProcessing doesnt work?

Post by Usenet »

Great, just a note. It start as a service from fresh reboot. Continues to run after logging in but closes when logging out.

Keep up the good work!

User avatar
shypike
Administrator
Administrator
Posts: 21043
Joined: January 18th, 2008, 12:49 pm

Re: PostProcessing doesnt work?

Post by shypike »

I just checked.

It's totally counter-intuitive, but if you use the console version of SABnzbd, it DOES work fine.

So you should start this way:

Code: Select all

SABnzbd-console.exe -d -f <path-to-my-ini>
The problem, the "windowed" version gets and handles the exit command, the console version ignores it.

We're not going to fix this for 0.3.1, but later we will.
The work-around is good enough for now.

Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: PostProcessing doesnt work?

Post by Usenet »

Thanks for the help, but i cant get it to work.

Im running 3.1.0rc1 on winXP. with its own user account (admin rights). I changed the registry settings according to your tip but no... :(

User avatar
shypike
Administrator
Administrator
Posts: 21043
Joined: January 18th, 2008, 12:49 pm

Re: PostProcessing doesnt work?

Post by shypike »

Not sure if it makes the difference, but I start SABnzbd thorugh a batch file.
So the registry points to a CMD file, and that file starts the program.

My content of the CMD file:

start d:\bin\SABnzbd\SABnzbd-console --daemon -f d:\usernet\sabnzbd.ini

This way it works fine on my Server2003 box.

Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: PostProcessing doesnt work?

Post by Usenet »

Ok, I see.
Are you still using anysrv.exe from the 2003 resource kit as described in the wiki?

Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: PostProcessing doesnt work?

Post by Usenet »

Code: Select all

2008-02-14 20:40:25,015::WARNING::[sabnzbd] Signal 5 caught, saving and exiting...
is what i get in the logs every time I log out. Any idea what it might be?

User avatar
shypike
Administrator
Administrator
Posts: 21043
Joined: January 18th, 2008, 12:49 pm

Re: PostProcessing doesnt work?

Post by shypike »

The only time I get a Signal 5 is when I run SABnzbd.exe as a service.
Not when I use SABnzbd-console.exe

Maybe I was not clear, you're supposed to use the other exe file, there are two starting with 0.3.1rc1.

And yes, I do use the method described in the Wiki.

Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: PostProcessing doesnt work?

Post by Usenet »

You are very clear, and Im thankfull for that.
Im using the SABnzbd-console.exe file.. a strange thing though, both have the exact same size 79360bytes... could this be right?

Post Reply