NZBs are loaded but won't download, no error message [chroot jail]

Support for the Debian/Ubuntu package, created by JCFP.
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
Dr_Spaceman
Newbie
Newbie
Posts: 5
Joined: October 6th, 2020, 7:22 am

NZBs are loaded but won't download, no error message [chroot jail]

Post by Dr_Spaceman »

More specifically, I have Sab up and running properly when I run it unjailed. But I have been working on getting it to work inside a chroot jail. After a lot of trial and error I've been able to get that to run, no errors or warnings. I can load an nzb but then...nothing happens.

The same nzb, loaded with all the same settings but with Sab running outside the chroot, downloads flawlessly. I used strace for both the jailed and unjailed download attempts. With the jailed Sab we get up to here:

Code: Select all

select(0, NULL, NULL, NULL, {tv_sec=3, tv_usec=0}2021-01-21 17:56:16,945::INFO::[dirscanner:378] Trying to import /p17/user26/sabnzbd/watch/Daniel-Arenson-The-Stars-Are-Crying.docx.nzb
2021-01-21 17:56:17,963::INFO::[misc:993] Creating directories: /p17/user26/sabnzbd/Downloads/incomplete/Daniel-Arenson-The-Stars-Are-Crying.docx
2021-01-21 17:56:17,964::INFO::[nzbstuff:526] File Daniel Arenson - The Stars Are Crying.docx (1/1) - SABnzbd_nzf_zwm0DW added to queue
2021-01-21 17:56:17,964::INFO::[__init__:614] Backing up /p17/user26/sabnzbd/Downloads/incomplete/Daniel-Arenson-The-Stars-Are-Crying.docx/__ADMIN__/Daniel-Arenson-The-Stars-Are-Crying.docx.nzb.gz
2021-01-21 17:56:17,964::INFO::[nzbqueue:277] Saving queue
) = 0 (Timeout)
select(0, NULL, NULL, NULL, {tv_sec=3, tv_usec=0}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {tv_sec=3, tv_usec=0}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {tv_sec=3, tv_usec=0}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {tv_sec=3, tv_usec=0}) = 0 (Timeout)

...and then, no more output of note. Whereas with the unjailed instance, we see this:

Code: Select all

select(0, NULL, NULL, NULL, {tv_sec=3, tv_usec=0}2021-01-21 18:36:00,756::INFO::[dirscanner:378] Trying to import /home/portal17/users/user26/ftp/user26/sabnzbd/watch/Daniel-Arenson-The-Stars-Are-Crying.docx.nzb
) = 0 (Timeout)
futex(0x7f342801fb40, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5641b323c780, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f342801fb40, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5641b323c780, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5641b323c780, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, 0xffffffff) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x5641b32c56e0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5641b323c780, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5641b323c780, FUTEX_WAKE_PRIVATE, 1) = 0
select(0, NULL, NULL, NULL, {tv_sec=3, tv_usec=0}2021-01-21 18:36:01,758::INFO::[misc:993] Creating directories: /home/portal17/users/user26/ftp/user26/sabnzbd/Downloads/incomplete/Daniel-Arenson-The-Stars-Are-Crying.docx
2021-01-21 18:36:01,759::INFO::[nzbstuff:526] File Daniel Arenson - The Stars Are Crying.docx (1/1) - SABnzbd_nzf_AeEn2A added to queue
2021-01-21 18:36:01,759::INFO::[__init__:614] Backing up /home/portal17/users/user26/ftp/user26/sabnzbd/Downloads/incomplete/Daniel-Arenson-The-Stars-Are-Crying.docx/__ADMIN__/Daniel-Arenson-The-Stars-Are-Crying.docx.nzb.gz
2021-01-21 18:36:01,760::INFO::[nzbqueue:277] Saving queue
2021-01-21 18:36:02,761::INFO::[downloader:485] 2@news_server: Initiating connection


...and it downloads, no problem.



I spent a lot of time working with the assumption that functions in either __init__ or nzbqueue were failing silently somehow and hanging the program, but after watching its behavior closely I don't think that's the case any more. Something is going wrong before it gets to the function in downloader, but I can't see what.

Running under Ubuntu 18 . 04. Python 2 . 7, sabnzbd 2 . 3 . 2.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: NZBs are loaded but won't download, no error message [chroot jail]

Post by sander »

Python 2 . 7, sabnzbd 2 . 3 . 2.
Uhm ... Please use SAB 3.1.1 with Python 3.6+

And tell us why you want to use chroot jail, and not docker?
Dr_Spaceman
Newbie
Newbie
Posts: 5
Joined: October 6th, 2020, 7:22 am

Re: NZBs are loaded but won't download, no error message [chroot jail]

Post by Dr_Spaceman »

Docker is more resource intensive, as I understand it. And I'm not fundamentally opposed to upgrading, but is it really likely to solve this problem?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: NZBs are loaded but won't download, no error message [chroot jail]

Post by sander »

Probably not. But creating a working chroot jail with python, SABnzbd and all needed libraries and binaries ... if you want to spend all that time on that, I would say it's better to use an uptodate SABnzbd.

And, again spending all your resources on that ... ? Starting a docker is easier, if you want isolation. And most easy is sabnzbd plain on Ubuntu.

Out of curiosity: how much experience do you have with chroot jail? I thought it wasa something for BSD users?
Dr_Spaceman
Newbie
Newbie
Posts: 5
Joined: October 6th, 2020, 7:22 am

Re: NZBs are loaded but won't download, no error message [chroot jail]

Post by Dr_Spaceman »

I started teaching myself how to do chroot jails pretty recently, but I've figured out quite a bit, so something of a sunk cost there as well, putting aside resource issues. And chroot is definitely a thing in Linux, in fact I think it was a Unix feature before BSD...
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: NZBs are loaded but won't download, no error message [chroot jail]

Post by sander »

Looks like a gigantic and at the same time niche job to me. I wish you good luck with that
Post Reply