Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Newznab Plug-in

Featured Replies

Just ran into that myself with an import.  I've checked in an update to increase the timer back to 2 hours.

 

At some point I'll make it more easy to configure..but I'm tired right now ;)

 

  • Replies 523
  • Views 105.9k
  • Created
  • Last Reply

@mp328

Edit the following code to reflect the the path to where you have the script on your system.  On mine it is " /mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh".  The open your putty session up and paste the command into the system.  This will add the job to your cron schedule.

crontab -l > /tmp/file; echo '# Run Newznab every 10 minutes' >> /tmp/file; echo '*/10 * * * * /mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh -p' >>/tmp/file; crontab /tmp/file; rm /tmp/file

 

Then enter the command

crontab -l

 

And you should see something like this in your crontab.

 

# Run Newznab every 10 minutes

*/10 * * * * /mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh

 

You also may need to modify the permissions of the script.  If you do, use this after changing the path as appropriate or changing to the directory that has the script.

chmod 744 /mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh

 

 

@ Tybio

 

Every time the new script runs, I get errors in my syslog and an email with the following 4 errors.  I have pasted the line of code from the script referenced in the error.being referenced.  Any thoughts. 

 

There are no details in the syslog error "3330: Jan  1 20:31:01 Tower crond[1185]: ignoring /var/spool/cron/crontabs/root- (non-existent user)"

 

/mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh: line 160: [: 59400: unary operator expected

1ine 160 is:  if [ "$DIFF" -gt $CRON_OINT ] || [ "$DIFF" -lt 1 ]; then

 

/mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh: line 172: [: =: unary operator expected

1ine 172 is:  if [ $CRON_THREAD = "enable" ]; then

 

/mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh: line 182: [: =: unary operator expected

1ine 182 is:  if [ $CRON_IMP = "enable" ]; then

 

/mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh: line 192: [: =: unary operator expected

1ine 192 is:  if [ $DOOPT = "enable" ]; then

You didn't install the plugin, did you?

Well, the first error is odd, it's looking for a user named "root-".  I'm not sure how you got into this state.

 

If you have a /boot/config/plugins/newznab_extras/newznab_extras.cfg, remove that.

 

Tybio

 

@ Tybio

 

Every time the new script runs, I get errors in my syslog and an email with the following 4 errors.  I have pasted the line of code from the script referenced in the error.being referenced.  Any thoughts. 

 

There are no details in the syslog error "3330: Jan  1 20:31:01 Tower crond[1185]: ignoring /var/spool/cron/crontabs/root- (non-existent user)"

 

/mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh: line 160: [: 59400: unary operator expected

1ine 160 is:  if [ "$DIFF" -gt $CRON_OINT ] || [ "$DIFF" -lt 1 ]; then

 

/mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh: line 172: [: =: unary operator expected

1ine 172 is:  if [ $CRON_THREAD = "enable" ]; then

 

/mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh: line 182: [: =: unary operator expected

1ine 182 is:  if [ $CRON_IMP = "enable" ]; then

 

/mnt/cache/server/misc/update_scripts/nix_scripts/newznab_cron.sh: line 192: [: =: unary operator expected

1ine 192 is:  if [ $DOOPT = "enable" ]; then

No.  I am running it standalone for now.  I wanted to evaluate the need for the plugin first.  There are a lot of additional things that get installed with it.  I am still trying to limit what I put on my server.

Ok, got a temporary fix in.  Had to do with how bash does testing...it errors rather than returns "false" if a variable is undefined when tested against.

 

Could you give it a run?

So you feel that the 5ish Megs of tars installed by the packages is too much?

 

Hurm, perhaps I should only install them if the feature is enabled.  Let me dig into that a bit.

So you feel that the 5ish Megs of tars installed by the packages is too much?

 

Its not the size, it is more apps running.  Stability and simplicity were my original goals for my Unraid server. I basically wanted something I could set and forget.  As such I installed Unraid and Unmenu with a minimum feature set, ie Screen to do preclears, the shutdown script and email package and Joe L's cache script.  I then elected to install SAB, Sickbeard, Couchpotato and Headphones which I was never ever planning on when I built the server.  With my need/decision to roll my on personal Nzb server, I needed even more software and their dependant packages.  For example I needed Simple Features for the webserver. and MySQL for the database and its potential issues.  Don’t get me wrong now that I have used Simple Features the UI is fantastic.  So much so that I installed the other SF plugins.  But it is another layer to have issues with.

 

Your new plug-in installs screen which I already have,  an I think it is HTop which I don’t know if I really need.  I do occasionally use Top so it might be worth installing.  I am not sure what the need for Sphinx is.  While I am sure some people might have a need for it, I don’t know that I do.

 

One of my biggest issues is that I am not a linux/unix guy nor a programmer.  As such i don’t intuitively know how to solve some of the issues I have so am trying to avoid adding anything I don’t really need in order to avoid creating problems for myself.

 

Hurm,

 

That makes a lot of sense.  Let me dig into Influencers plugins and see about having an "install" option for each section...so you can chose what to install and what to leave out...rather than installing all the packages by default.

 

I need to do this for mediainfo anyway, that is REALLY nice to have in newznab to validate releases etc...but it requires a lot of packages.

 

htop is godlike, seriously...for the size it is an amazing bonus to have installed...but, I agree that it should be an /option/.

Hurm,

 

That makes a lot of sense.  Let me dig into Influencers plugins and see about having an "install" option for each section...so you can chose what to install and what to leave out...rather than installing all the packages by default.

 

I need to do this for mediainfo anyway, that is REALLY nice to have in newznab to validate releases etc...but it requires a lot of packages.

 

This is precisely why lots of smaller plugins are preferable to one über plugin - everyone gets to choose which ones they install and its obvious what they do!  One day we will have a plugin manager and it'll be dead easy to pick which ones we want automatically hopefully.

 

Chris

Hurm,

 

That makes a lot of sense.  Let me dig into Influencers plugins and see about having an "install" option for each section...so you can chose what to install and what to leave out...rather than installing all the packages by default.

 

I need to do this for mediainfo anyway, that is REALLY nice to have in newznab to validate releases etc...but it requires a lot of packages.

 

This is precisely why lots of smaller plugins are preferable to one über plugin - everyone gets to choose which ones they install and its obvious what they do!  One day we will have a plugin manager and it'll be dead easy to pick which ones we want automatically hopefully.

 

Chris

 

I agree, the issue is that if I create 6 plugins, each with one or two settings..then the settings page gets crazy.  I'd rather have one plugin with the option to install features as configured.

Does anyone know how to stop newznab, mysql, webserver from running so I can shutdown my unraid server? Ever since I got this running I have issues powering down my system and I've started getting parity sync errors. So I'm troubleshooting those errors and I need to power it down to do memtesting.

 

I agree, the issue is that if I create 6 plugins, each with one or two settings..then the settings page gets crazy.  I'd rather have one plugin with the option to install features as configured.

 

Depends on whether some of those plugins even need settings - surely HTOP is either installed or not?  Besides with SimpleFeatures the settings page never looks cluttered - especially if you can work out how to create your own 'section' like Influencer has got for his plugins :)

 

Chris

Does anyone know how to stop newznab, mysql, webserver from running so I can shutdown my unraid server? Ever since I got this running I have issues powering down my system and I've started getting parity sync errors. So I'm troubleshooting those errors and I need to power it down to do memtesting.

 

MySQL and Webserver can be shutdown from the plugin settings. Just set to disabled and apply. No need to shut off newznab.

Ok, got a temporary fix in.  Had to do with how bash does testing...it errors rather than returns "false" if a variable is undefined when tested against.

 

Could you give it a run?

 

Installed the new version and it seems to be working fine.  No errors in the syslog and the script seems to be running fine.  I will let it run and keep an eye on it and let you know If is see anything.

 

FYI.  I also installed htop and you were right.  It is a great utility.

So maybe a dumb question, but...

 

How do I tell if the newznab_cron.sh is running successfull in cron?

 

I did a crontab -l, and it did list there, but is there a way I can tell where it is within it's processing?

@Itoolio

 

If you have simple features installed, go to "Utils" tab the select the "Logs" icon.  Select the log you want to look at.  In this case :newznab_cron.log".  You can watch it update in real time.  Alternaivly telnet into your server and issue the following command.  Wait a few minutes and issue it again to see it update.

 

cat /var/log/newznab_cron.log

 

If you want to see the messages the script writes to the log file, in SF enter "INFO:" in the search box in the upper right corner of the window and click the go button.  This will apply a filter the log file.  Please note, if you select another log file, ie your "syslog", the filter will stay in place until you clear it.

 

From the command line enter the following.

grep INFO: /var/log/newznab_cron.log

 

@Itoolio

 

If you have simple features installed, go to "Utils" tab the select the "Logs" icon.  Select the log you want to look at.  In this case :newznab_cron.log".  You can watch it update in real time.  Alternaivly telnet into your server and issue the following command.  Wait a few minutes and issue it again to see it update.

 

 

Thx, Switchman.

 

Interestingly - I do have SF installed, but I don't have a Logs icon under the Utils tab?  So, I'll go the telnet route.

One other question about this whole process:

 

I have the dump of NZBS and I'll be importing them at some point.  But if all I were to be doing was Update_binaries and update_releases, and I had it run every 10 minutes, is it still necessary to take all the precaution?  Does this still lead to DB corruption?

 

I was thinking about running newznab_screen.sh for a couple of days just to test things out, then would start pulling in the NZBs and doing a backfill at some point with the more advanced scripts.

You probably need to install the simpleFeatures.log.viewer-1.0.5-noarch-1.plg plugin.

 

 

 

One other question about this whole process:

 

I have the dump of NZBS and I'll be importing them at some point.  But if all I were to be doing was Update_binaries and update_releases, and I had it run every 10 minutes, is it still necessary to take all the precaution?  Does this still lead to DB corruption?

 

I was thinking about running newznab_screen.sh for a couple of days just to test things out, then would start pulling in the NZBs and doing a backfill at some point with the more advanced scripts.

 

Well...I got my answer.  Been running the process now for a bit over a night.  3 groups, 2 days of posts.  My Update Binaries progress looks like this:

 

Received 20001 articles of 20001 requested, 0 blacklisted, 0 not binaries

WARNING: 20000 Parts failed to insert

 

And I've got a ton of messages like below in  my /var/log/lighttpd/php.errors.log file....both for binaries and one for releases

 

 

[03-Jan-2013 15:07:19 UTC] PHP Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /mnt/cache/.newznab/www/lib/binaries.php on line 1526

 

 

[03-Jan-2013 15:07:19 UTC] PHP Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /mnt/cache/.newznab/www/lib/releases.php on line 1526

 

If I run myisamchk on my binaries table, I get:

root@Tower:/mnt/cache/.mysql/newznab_new# myisamchk binaries.MYI

Checking MyISAM file: binaries.MYI

Data records:  15204  Deleted blocks:      0

myisamchk: warning: Table is marked as crashed and last repair failed

- check file-size

myisamchk: warning: Size of datafile is: 32988508        Should be: 5497448

- check record delete-chain

- check key delete-chain

- check index reference

- check data record references index: 1

- check data record references index: 2

- check data record references index: 3

- check data record references index: 4

- check data record references index: 5

- check data record references index: 6

- check data record references index: 7

- check data record references index: 8

- check data record references index: 9

- check record links

myisamchk: error: Keypointers and record positions doesn't match

myisamchk: warning: Found 27152940 deleted space.  Should be 0

myisamchk: warning: Found    179865 deleted blocks      Should be: 0

myisamchk: warning: Found    218647 key parts. Should be: 15204

 

Is this normal behavior with update_binaries.php and update_releases.php?

  • Author

newznab plug-in is updated to fix the oversized image I promised to fix a while back, :D

 

 

Is this normal behavior with update_binaries.php and update_releases.php?

 

No, it is not. Your mysql data table is bad. You need to fix it. I think I used the -f for forcing and the --safe-recovery method to fix. Stop the mySQL server first before attempting any repairs. I'm not sure why I needed to force the repairs but i kept getting an error about not being able to create a backup file or something like that. I think you'll have to repair the binaries and releases tables.

 

@Lionel:

 

The odd thing is I just created my DB less than 24 hours ago.  I only was doing the initial population of 1 (or 2?) days of posts from 3 groups, and they both corrupted.

 

This is on a fresh install of NN+ with a completely new DB, so I can't figure out why it corrupted so quickly.

 

 

UPDATE:

It actually wasn't the binaries / releases table that were corrupted.  It was the parts table.

 

I've seen notes elsewhere indicating that that table can be problematic and that truncation is a solution....anyone else have similar issues with this table?

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.