Jump to content
binhex

[Support] binhex - SABnzbd

225 posts in this topic Last Reply

Recommended Posts

I've got a weird thing happening.  My SAB scheduler goes off at the wrong time.  I have it set to resume at midnight, but it runs at around 3pm.  I checked the log, and it is now 9pm and the log says it is 6am.  Unsure what is causing this as it appears to just be a timezone difference.  Unraid shows the right time with the correct timezone.

 

Any ideas?

Edited by greennick

Share this post


Link to post

Hey guys. I'm running Unraid 6.4.0. I use eweka.nl and have DOGnzb, Nzb.su, and NZBgeek for indexers. I recently changed from binhex-sabnzbd to the binhex-sabnzbdvpn docker and use PIA as my VPN provider. Everything worked at the onset, but after a day all of my indexers for sonarr, lidarr and radarr were disconnected. at any time I'm able to click on them and run a connection test and they all would validate and connect. But, eventually they all lose the connection again. It seems like after so many requests to the indexers, they're making me validate again. I disabled the vpn and everything works perfectly. 

 

It feels like the provider doesn't like getting requests from whatever IP the vpn is serving me. Maybe a security measure. The logs to sonarr, lidarr and radarr just state that the indexers are unavailable and sonarr gives "Failed to test proxy: http://services.sonarr.tv/v1ping".  I didn't see the sabnzbdvpn logs while the error was happening and in my troubleshooting of turning off the vpn the logs have cycled through. 

 

I didn't see anything about this searching the web and forums, but I have to imagine it's happened before. 

Any help is appreciated. 

 

Thanks. 

serverError.JPG

Share this post


Link to post

I've been running binhex - Sabnzbd for a while now with no issues when suddenly the last few days I'm getting days warning messages daily on the front pages.   It's a big yellowish splat followed by the message: File xxxxxxx[file/part#] "xxxxxx.par2 yEnc" is empty, skipping

 

It seems like it's just informational about a problem par file it's trying to download but given I've never seen even one of these before and now I'm seeing them daily I thought it best to check.

 

Is there anything to be concerned about here?

Edited by UncleDirtNap

Share this post


Link to post

@binhex

 

My unraid setup has been solid for months now and I've made no changes at all.  Since 1/3/2019, I now see this error on the main sabnzbz webgui for each download,     /usr/bin/env: ‘python’: No such file or directory

 

I looked and the file downloads fine and extracts.  The tv show file is in the directory, yet the script errors out with 

Exit 127   /usr/bin/env: ‘python’: No such file or directory

 

I've been working with Clinton Hall to troubleshoot why the nzbtomedia script started failing and we have found that due to recent updates, we now need to link Python to Python2.

 

To temporary fix this, I had to ssh into a terminal inside the sab docker and run this command;

ln -sf /usr/bin/python2.7 /usr/bin/python

 

While that resolved the issue and I no longer get any errors, this fix will be reverted with your next update.  To test this part, I did a Forced Update for this docker and it broke the link.  I once again had to ssh in and link python again.

 

Here are the suggestions from Clinton:

 

Have a script run at startup that will ssh into docker and then make the link with /usr/bin... or

Ask binhex if this can be added into future sab dockers.

 

Can you please add the python link in your next update to fix this?  I would prefer this be fixed inside the sab docker, and I would rather avoid having to have a custom script, if possible.

 

many thanks!

Edited by Switchblade

Share this post


Link to post
34 minutes ago, Switchblade said:

we now need to link Python to Python2.

 

To temporary fix this, I had to ssh into a terminal inside the sab docker and run this command;

ln -sf /usr/bin/python2.7 /usr/bin/python

 

hmm this is going to be an issue, as this container requires python3 for system tooling (such as pacman) and obviously requires python2 for sabnzbd. there is already a symlink in place for /usr/bin/python which softlinks to python3, see here for output from console:-

sh-4.4# cd /usr/bin
sh-4.4# ls -al py*
lrwxrwxrwx 1 root root     6 Oct 22 11:41 pydoc -> pydoc3
-rwxr-xr-x 1 root root    78 Jun 27  2018 pydoc2
lrwxrwxrwx 1 root root     8 Oct 22 11:41 pydoc3 -> pydoc3.7
-rwxr-xr-x 1 root root    78 Oct 22 11:41 pydoc3.7
lrwxrwxrwx 1 root root     7 Oct 22 11:41 python -> python3
lrwxrwxrwx 1 root root     9 Jun 27  2018 python2 -> python2.7
-rwxr-xr-x 1 root root  5920 Jun 27  2018 python2.7
-rwxr-xr-x 1 root root  1681 Jun 27  2018 python2.7-config
lrwxrwxrwx 1 root root    16 Jun 27  2018 python2-config -> python2.7-config
lrwxrwxrwx 1 root root     9 Oct 22 11:41 python3 -> python3.7
-rwxr-xr-x 2 root root 14096 Oct 22 11:41 python3.7
lrwxrwxrwx 1 root root    17 Oct 22 11:41 python3.7-config -> python3.7m-config
-rwxr-xr-x 2 root root 14096 Oct 22 11:41 python3.7m
-rwxr-xr-x 1 root root  3225 Oct 22 11:41 python3.7m-config
lrwxrwxrwx 1 root root    16 Oct 22 11:41 python3-config -> python3.7-config
lrwxrwxrwx 1 root root    14 Oct 22 11:41 python-config -> python3-config
lrwxrwxrwx 1 root root    10 Oct 22 11:41 pyvenv -> pyvenv-3.7
-rwxr-xr-x 1 root root   435 Oct 22 11:41 pyvenv-3.7

so im loathed to change the existing symlink as it could/will break system tooling, and whilst you have got away with it by overwriting the existing symlink this isnt something i really want to do.

 

instead there are two options for you to consider:-

 

1. edit the script and point at /usr/bin/python2 (e.g. #!/usr/bin/env python2)  - this then allows you to be more explicit as to what version of python the script uses, as opposed to relying on the premise that the only version of python on the system is python2 and that its symlinked to /usr/bin/python.

or 

2. update the script to use python3 - python3 is the future, and at some point the developer of the script will have to support python3 as more people move over to it, if this was re-written (i know its a lot of work) then it would just work with the existing symlink (which currently points at python3).

Edited by binhex

Share this post


Link to post

@binhex  Thank you sir!  Good info, but some of that is over my head.

 

My hope is that we can find a solution that isn't a one-off or custom fix that has to be reapplied each time there is an update to either your docker or his script, not to mention an update to unraid.

 

I have relayed the message back to Clinton, as the nzbtomedia script is his.  I think given the number of people who run your sab docker and his script, it would be best for the two of you to talk directly and help find the best path forward.   I've invited him to visit this thread.

 

Many Thanks!

 

 

Share this post


Link to post

@binhex

 

Sorry for the confusion created. The nzbToMedia script was recently made python3 compatible, this is why we changed from calling python2 to python.

 

So there should be no issue if python already exists and point to python3.

The reason for Switchblades request for the symlink is that we thought "python" didn't exist. Initially on update of the script, the script failed to run (I believe the issue is that if failed to run within unraid and NOT within the SABnzbd docker). So if it does we don't have any issue. I took me a longtime to figure out the difference between the SABnzbd Docker environment and the root unraid environment.

 

@Switchblade

 

Please test the script after resetting the link to python3

via terminal into docker

ln -sf /usr/bin/python3 /usr/bin/python

 

Edited by clinton.hall

Share this post


Link to post

@clinton.hall

 

Ok, I went back into the terminal inside the sab docker and ran that command.  I then sent a dl to sab, and it failed - just like it did before we changed the link to python2.  Below is a test dl.  The file dl's and unpacks, then runs the script, but fails when it can't find python.

 

image.png.2c0f4f0b4aea75c3473aa3301e3a56d8.png

 

When I put it back to what we tested,  ln -sf /usr/bin/python2.7 /usr/bin/python    It works again.

 

I can also repeat this testing by just doing a Forced Update for this docker container, which puts it back to python3.  After the update, I have to go back into the terminal inside the docker and link it to python2.7

 

Just for the record, my unraid is most stock, very little custom stuff.  I only have a few dockers and all but one are Bin-hex and again with no custom stuff.  I just install and they work.  :)  I also have Nerdpack installed, but again only a few packages are installed.  Both python2.7 and python3 are installed and up to date.

 

I'm curious what we do next....

 

Share this post


Link to post

@clinton.hall

 

Here you go:

 

root@Tower:~# docker exec -it binhex-sabnzbd bash
[root@Tower /]# cd /usr/bin
[root@Tower bin]# ls -al py*
-rwxr-xr-x 1 root root   78 Jun 27  2018 pydoc2
lrwxrwxrwx 1 root root   18 Jan 18 15:41 python -> /usr/bin/python2.7
lrwxrwxrwx 1 root root    9 Jun 27  2018 python2 -> python2.7
-rwxr-xr-x 1 root root 5920 Jun 27  2018 python2.7
-rwxr-xr-x 1 root root 1681 Jun 27  2018 python2.7-config
lrwxrwxrwx 1 root root   16 Jun 27  2018 python2-config -> python2.7-config
[root@Tower bin]# which python
/usr/sbin/python
[root@Tower bin]#

 

 

Share this post


Link to post

ok, that's the issue... you can't link python3 since it isn't there!

If the docker contains python3, nzbToMedia will work with it, but the version you have is not showing a python3 install.

Share this post


Link to post

@clinton.hall  Ok, thank you again for your help.  So I have python3 installed via nerdpack at the unraid server level.  But from what you are saying, the sab docker container should also include python3 - but for some reason it is not?

 

@binhex  I have already did a Forced Update so I should have the latest version.  Also keep in mind that I  did a fresh install about 10 months back.  How can I fix this issue and do you know why python3 isn't showing up inside the sab docker container?  

 

Share this post


Link to post
18 hours ago, Switchblade said:

@clinton.hall  Ok, thank you again for your help.  So I have python3 installed via nerdpack at the unraid server level.  But from what you are saying, the sab docker container should also include python3 - but for some reason it is not?

 

@binhex  I have already did a Forced Update so I should have the latest version.  Also keep in mind that I  did a fresh install about 10 months back.  How can I fix this issue and do you know why python3 isn't showing up inside the sab docker container?  

 

ok thanks guys, so my bad i was looking at sabnzbdvpn which DOES include both python2 and python3, however the straight sabnzbd (no vpn) only includes python2, so i need to include python3 for your script to work, got it. i just need to do some testing to ensure this isnt going to screw up sabnzbd - which it shouldnt as it works just fine with both for sabnzbdvpn BUT sods law dictates if i dont test it then it will break :-).

Edited by binhex

Share this post


Link to post

@binhex  Thank you so much!  I installed and tested the couchpotato script and that worked!  I think we're good to go.

 

I'm now waiting for a tv show to dl to test the sickbeard script.  I'm all caught up so nothing to dl just yet.  I'll confirm back once the sb script runs.

 

Thanks again for the speedy response!

 

Update:  @binhex  - I have confirmed that both sb and cp scripts are now working.  😀

 

Edited by Switchblade

Share this post


Link to post

Hello,

Something I don't understand. Why is Sabnzbd unraring while downloading, which is good, and then when the downloading is done, it actually deletes all that it has unrared, rechecks the whole download, and finally urar, again?

Is that a misconfiguration in the switches? or is it by design which would be pretty useless and wastes time.

Share this post


Link to post
9 hours ago, xtrips said:

Hello,

Something I don't understand. Why is Sabnzbd unraring while downloading, which is good, and then when the downloading is done, it actually deletes all that it has unrared, rechecks the whole download, and finally urar, again?

Is that a misconfiguration in the switches? or is it by design which would be pretty useless and wastes time.

Is 'Direct Unpack' checked under switches?

Share this post


Link to post
1 minute ago, unevent said:

Is 'Direct Unpack' checked under switches?

Of course, and that is why it is weird that after it does unpack while downloading, it deletes all and starts again after the download has finished.

Share this post


Link to post

Is there a way to force the container's default "python" to be python2 instead of python3? I'm trying to get the nzb-notify.py script to work for notifications. But the script only supports python2.x. 

 

Thanks!

Share this post


Link to post
On 2/2/2019 at 5:50 AM, emteedubs said:

Is there a way to force the container's default "python" to be python2 instead of python3? I'm trying to get the nzb-notify.py script to work for notifications. But the script only supports python2.x. 

 

Thanks!

edit the script and put this as the VERY first line in the script:-

 

#!/usr/bin/env python2

that will then force it to use python 2.x

  • Upvote 1

Share this post


Link to post

Hey :)

So I've been using this docker for a while, and most of the time it works with no issues. I have limited sab to only use cores 10 of 12 threads so  that my server never runs out of juice as of such (done in the docker settings, quite easy after the new update  :) )

This is the same as I have done on several other dockers so that unraid and a few small things always have 2 threads to run on alone. BUT

When sab finds a better version of a show I already have and it grabs this, the CPU spikes to 100% on all 12 threads when it starts to process these files.

Not sure how or why, but it takes all the threads and several dockers are affected (teamspeak crashes and kicks all users, plex laggy AF and such  :( )

Posted the script that starts running when the first episodes is grabbed (this is when the cpu spikes to 100% on all threads).

/usr/sbin/python2 /opt/sabnzbd/SABnzbd.py --config-file /config --server +

Sab is only set to download, sonarr and radarr is set to rename and move, they never use any more than a few % of the cpu while working, neither does Plex.

Currently running unRaid 6.6.1

 

BTW: Big thanks to all of ur work on the dockers, using 99% ur dockers and loving them hehe :D 

Share this post


Link to post
15 hours ago, ProZac said:

When sab finds a better version of a show I already have and it grabs this, the CPU spikes to 100% on all 12 threads

ok so allocating cores via the unraid web ui SHOULD prevent any other cores from being used, if you are seeing all cores spiking then this is either a docker engine issue, in that its not honouring the cores allocated, or its a unraid web ui issue, where the cores selected are not being passed through correctly to the docker engine.

16 hours ago, ProZac said:

Posted the script that starts running when the first episodes is grabbed (this is when the cpu spikes to 100% on all threads).

/usr/sbin/python2 /opt/sabnzbd/SABnzbd.py --config-file /config --server +

 

ok so that 'script' is the core of sabnzbd, its the initial python script that is run, so its definitely sabnzbd that is causing the high cpu usage, processes like par and unrar/unzip can be very cpu intensive, so this is most probably the cause, but why its using all cores i cannot say at this time.

 

@bonienl have you heard of anybody else encountering cores being used outside of what is selected being used through the web ui, or aware of any issues around this?.

Share this post


Link to post
On 2/4/2019 at 8:52 AM, binhex said:

edit the script and put this as the VERY first line in the script:-

 


#!/usr/bin/env python2

that will then force it to use python 2.x

Perfect solution. Everything is good now with nzb-notify. 

 

Thank you!

Share this post


Link to post

Log issues with SABnzbd? Ive looked everywhere and cant find the spot to change logging size and google hasnt been very helpful. Im sure its staring me right in the face.

 

Edit: I did the extra parameter for setting the maximum logging. It fixed the size. But for just more knowledge, what setting could I of changed in the actual docker gui or command prompt to setup the app properly.

 

Screen Shot 2019-02-08 at 3.56.16 PM.png

Edited by sminker

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now