Add NZB by URL & Add NZB by file upload not working

This is the place to help test and discuss Version 6 Beta releases.

Add NZB by URL & Add NZB by file upload not working

Postby Biship » Wed Nov 28, 2018 6:53 pm

Please check: https://github.com/theotherp/nzbhydra2/issues/161
I reported this to the NZBHyrda2 Dev who thinks it's a Newsbin issue.
The NZBHydra logs are on github.
Debug log in newsbin does not give much info.

I can reproduce anything you want & can run a test build of Newsbin with more logging if you wish.

EDIT: Reference is here: https://sabnzbd.org/wiki/advanced/api#addurl
Biship
Active Participant
Active Participant
 
Posts: 88
Joined: Sun Jul 27, 2003 10:14 am

Registered Newsbin User since: 04/01/03

Re: Add NZB by URL & Add NZB by file upload not working

Postby Quade » Thu Nov 29, 2018 12:07 am

Are you using password or API id? I'd try just using API id and see what happens.

I'll see if I can reproduce it.

Edit: Another thing, it doesn't support SSL.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Add NZB by URL & Add NZB by file upload not working

Postby Biship » Thu Nov 29, 2018 8:07 am

Just API, with a default category of tv
No SSL, URL is http://htpc:8999
NZBHydra2 seems to connect (newsbin gets the request), but errors (see below).
Data folder is H:\Newsbin
Using "Upload NZB", I see the nzb gets put in H:\Newsbin\nzbs, but it's missing the .nzb extension

Code: Select all
[11/29 06:01:27]  DEBUG Motd check
[11/29 06:01:27]  HIGH  PAR Pausing:  Disabled
[11/29 06:01:27]  DEBUG Repair Init
[11/29 06:01:27]  DEBUG Repair Failed to Open
[11/29 06:01:27]  HIGH  Par2Repair - Multi-core 3.2
[11/29 06:01:27]  DEBUG PAR - Init
[11/29 06:01:27]  HIGH  MessageId Filter: Disabled
[11/29 06:01:27]  DEBUG Filter Init
[11/29 06:01:27]  HIGH  FileTypeId Version: 3.00
[11/29 06:01:27]  DEBUG Server Auth
[11/29 06:01:27]  DEBUG Remote NZB Interface: Bound Remote control Socket
[11/29 06:01:27]  DEBUG Workers Init
[11/29 06:01:27]  DEBUG Start Connection Workers Init
[11/29 06:01:27]  DEBUG Remote Interface: Bound Remote control Socket
[11/29 06:01:32]  DEBUG Content-Type: multipart/mixed; boundary=83c2b2d6-a00e-470e-ab0c-8ce52ca6e660
[11/29 06:01:32]  DEBUG Content-Length: 906517
[11/29 06:01:32]  DEBUG Host: htpc:8999
[11/29 06:01:32]  DEBUG Connection: Keep-Alive
[11/29 06:01:32]  DEBUG Accept-Encoding: gzip
[11/29 06:01:32]  DEBUG User-Agent: okhttp/3.11.0
[11/29 06:01:32]  DEBUG  SbServer: Read Request POST /api?apikey=4aef3bdbfea5401c9e9b2678bc6b9a7a&output=json&mode=addfile&nzbname=Some NZB&priority=-100&cat=tv HTTP/1.1
[11/29 06:01:32]  DEBUG POST /api?apikey=4aef3bdbfea5401c9e9b2678bc6b9a7a&output=json&mode=addfile&nzbname=Some NZB&priority=-100&cat=tv HTTP/1.1
[11/29 06:01:32]  DEBUG SB - NZB Read - Data received from SB is: 906519 Bytes
[11/29 06:01:32]  DEBUG SB - New NZB notification
[11/29 06:01:32]  DEBUG SB - NZB Filename Downloaded: Some NZB
[11/29 06:01:32]  DEBUG SB - New NZB Some NZB
[11/29 06:01:32]  ERROR SM_ListAddNZBData - Failed to read NZB File for import
[11/29 06:01:32]  ERROR SB - Failed to add New NZB to Download listSome NZB
[11/29 06:01:44]  DEBUG User-Agent: Radarr/0.2.0.1222 (Windows 6.2)
[11/29 06:01:44]  DEBUG Accept: application/json
[11/29 06:01:44]  DEBUG Host: htpc:8999
[11/29 06:01:44]  DEBUG Cookie: SID=HLLKEgo9Y8kOdDHNHQ/KSFgLyu9GBPvW
[11/29 06:01:44]  DEBUG Accept-Encoding: gzip
[11/29 06:01:44]  DEBUG Connection: Close
[11/29 06:01:44]  DEBUG  SbServer: Read Request GET /api?mode=queue&start=0&limit=0&apikey=4aef3bdbfea5401c9e9b2678bc6b9a7a&output=json HTTP/1.1
[11/29 06:01:44]  DEBUG GET /api?mode=queue&start=0&limit=0&apikey=4aef3bdbfea5401c9e9b2678bc6b9a7a&output=json HTTP/1.1
[11/29 06:01:44]  DEBUG User-Agent: Radarr/0.2.0.1222 (Windows 6.2)
[11/29 06:01:44]  DEBUG Accept: application/json
[11/29 06:01:44]  DEBUG Host: htpc:8999
[11/29 06:01:44]  DEBUG Cookie: SID=HLLKEgo9Y8kOdDHNHQ/KSFgLyu9GBPvW
[11/29 06:01:44]  DEBUG Accept-Encoding: gzip
[11/29 06:01:44]  DEBUG Connection: Close
Biship
Active Participant
Active Participant
 
Posts: 88
Joined: Sun Jul 27, 2003 10:14 am

Registered Newsbin User since: 04/01/03

Re: Add NZB by URL & Add NZB by file upload not working

Postby Quade » Thu Nov 29, 2018 9:05 am

Newsbin writes the NZB's to a temporary location in the Data folder than hands it off to the normal reader. It sounds like either the file isn't written or the filename can't be found when it's time to read it.

I'm going to run it against my test jig some time today.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Add NZB by URL & Add NZB by file upload not working

Postby Quade » Tue Dec 04, 2018 2:05 pm

I tested sending an NZB directly to the NZB interface and it worked.

How about picking an NZB to send to Newsbin, then checking the

Code: Select all
<Data Folder>\Nzbs


Folder to see if it's there? Do you have an NZB Loading filter set in the NZB options? NZB loading filters apply to this interface too. They might be filtering out the NZB on load.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Add NZB by URL & Add NZB by file upload not working

Postby Biship » Wed Dec 05, 2018 8:25 am

It's in my post, Using "Upload NZB", I see the nzb gets put in H:\Newsbin\nzbs, but it's missing the .nzb extension
No NZB loading filter.
Biship
Active Participant
Active Participant
 
Posts: 88
Joined: Sun Jul 27, 2003 10:14 am

Registered Newsbin User since: 04/01/03

Re: Add NZB by URL & Add NZB by file upload not working

Postby Quade » Wed Dec 05, 2018 11:22 am

No NZB extension will probably make it fail to work.

Is there any way to manually upload NZB's without having an indexer? I have Hydra2 installed but have no indexers.

Edit: I guess the question might be whether I should force the extension. The problem there is that with URL mode, Newsbin could be asked to downloading anything. I tested this by making it download a JPG from S3.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Add NZB by URL & Add NZB by file upload not working

Postby Biship » Wed Dec 05, 2018 11:31 am

No there isn't.

In NZBHydra2, Config-> Downloaders -> Add New Downloader ->
Name: whatever
URL: http://htpc:8999 (i've change the port)
API: Newsbin api key
Category: tv
Adding type: Upload NZB

In NZBHydra2, Config-> Indexers-> Add Preset -> (6box, fastNZB)
Or add custom, and use one of these free indexers listed here:
https://www.reddit.com/r/usenet/wiki/indexers

Perform a search from NZBHydra and you'll see a "Send to Newsbin" (I named the downloader 'Newsbin') button on the far right.
It will save a file to \newsbin\nzbs\ without any extension.
Biship
Active Participant
Active Participant
 
Posts: 88
Joined: Sun Jul 27, 2003 10:14 am

Registered Newsbin User since: 04/01/03

Re: Add NZB by URL & Add NZB by file upload not working

Postby Quade » Wed Dec 05, 2018 12:27 pm

Yeah. The problem is no NZB extension. Sonarr sends NZB's with the NZB extension. Newsbin won't pick up the hydra NZB's because they're not NZB's. I mean the filenames aren't NZB. When you actually download the NZB, it's given an NZB Filename in the browser.

I looked in the debugger. Newsbin is looking for an nzb extension and tosses the extension-less filename sent by Hydra. You might want to mention to the author that the filenames are inconsistent too. Downloading the NZB and sending it over the link to Newsbin use completely different filenames. The one sent to Newsbin is better but lacks the NZB Extension.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Add NZB by URL & Add NZB by file upload not working

Postby Biship » Wed Dec 05, 2018 1:05 pm

Ok, I've let him know (in that github issue).

Secondly, the "Send Link" method also does not work.
The NZBHydra dev said in that github issue:

"Sending links doesn't work and it looks like this is a bug in newsbin. NZBHydra sends a link like http://localhost:8000/api?apikey=apikey ... usic%20MP3 Newsbin doesn't seem to like the "/" in the URL parameter although that's allowed by http://www.ietf.org/rfc/rfc3986.txt and must not be encoded. "
Biship
Active Participant
Active Participant
 
Posts: 88
Joined: Sun Jul 27, 2003 10:14 am

Registered Newsbin User since: 04/01/03

Re: Add NZB by URL & Add NZB by file upload not working

Postby Quade » Wed Dec 05, 2018 1:43 pm

Code: Select all
POST /sabnzb/api?&apikey=A188B&output=json&mode=addurl&name=https%3a%2f%2fquadesimages.s3.amazonaws.com%2fLathe%2520Pics%2fKIMG0627.JPG&cat=* HTTP/1.1


I'm pretty sure post parameters are required to be URL encoded. Both my test jig and Sonarr URL encode the URL in AddURL mode. Hydra is sending a full URL without URL encoding it. You don't URL encode the main request but the parameters are required to be URL encoded (I believe).

Code: Select all
api?mode=addurl&name=https%3A%2F%indexer.info%2Fget.php%3Fguid%3Ded731c0b37f25f84aea563d6ddb210b1%26api%3D6f235b80fab0c76e1ce7da21b2c6c48c&nzbname=&cat=*&script=Default&priority=-100&pp=-1


This is an example right from the SabAPI documents

https://sabnzbd.org/wiki/advanced/api#addurl
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Add NZB by URL & Add NZB by file upload not working

Postby Quade » Wed Dec 05, 2018 2:54 pm

Dex and I were researching this and it seem a bit ambiguous. It seems like it should be URL encoded but the application should be able to work even if it isn't. Be easier to URL encode it but I can look into working around it not being encoded.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Add NZB by URL & Add NZB by file upload not working

Postby Biship » Wed Dec 05, 2018 7:54 pm

Thanks Quade, the NZBHydra2 dev fixed the Upload NZB method https://github.com/theotherp/nzbhydra2/issues/161

Send Link still fails. The NZBHydra2 log is on the github issue.
The newsbin log:
Code: Select all
[12/05 17:40:57]  DEBUG Accept: application/json, application/*+json
[12/05 17:40:57]  DEBUG Content-Length: 0
[12/05 17:40:57]  DEBUG Host: htpc:8999
[12/05 17:40:57]  DEBUG Connection: Keep-Alive
[12/05 17:40:57]  DEBUG Accept-Encoding: gzip
[12/05 17:40:57]  DEBUG User-Agent: okhttp/3.11.0
[12/05 17:40:57]  DEBUG  SbServer: Read Request POST /api?apikey=<apikey>&output=json&mode=addurl&name=http://htpc:5099/getnzb/api/-<some.19.numerical.number>?apikey%3D<apikey>&nzbname=<filename.nzb>&priority=-100&cat=tv HTTP/1.1
[12/05 17:40:57]  DEBUG POST /api?apikey=<apikey>&output=json&mode=addurl&name=http://htpc:5099/getnzb/api/-<some.19.numerical.number>?apikey%3D<apikey>&nzbname=<filename.nzb>&priority=-100&cat=tv HTTP/1.1
[12/05 17:40:57]  DEBUG SB - URL Request: http://htpc:5099/getnzb/api/-<some.19.numerical.number>?apikey=<apikey>
[12/05 17:40:57]  ERROR SB - Connection to the NZB Source has failed http://htpc:5099/getnzb/api/-<some.19.numerical.number>?apikey=<apikey>
[12/05 17:40:57]  ERROR SickBeard Integration: Error Reported
[12/05 17:41:01]  DEBUG Accept: application/json, application/*+json
[12/05 17:41:01]  DEBUG Content-Length: 0
[12/05 17:41:01]  DEBUG Host: htpc:8999
[12/05 17:41:01]  DEBUG Connection: Keep-Alive
[12/05 17:41:01]  DEBUG Accept-Encoding: gzip
[12/05 17:41:01]  DEBUG User-Agent: okhttp/3.11.0
[12/05 17:41:01]  DEBUG  SbServer: Read Request GET /api?apikey=<apikey>&output=json&mode=queue HTTP/1.1
[12/05 17:41:01]  DEBUG GET /api?apikey=<apikey>&output=json&mode=queue HTTP/1.1
[12/05 17:41:11]  DEBUG Accept: application/json, application/*+json
[12/05 17:41:11]  DEBUG Content-Length: 0
[12/05 17:41:11]  DEBUG Host: htpc:8999
[12/05 17:41:11]  DEBUG Connection: Keep-Alive
[12/05 17:41:11]  DEBUG Accept-Encoding: gzip
[12/05 17:41:11]  DEBUG User-Agent: okhttp/3.11.0
[12/05 17:41:11]  DEBUG  SbServer: Read Request GET /api?apikey=<apikey>&output=json&mode=queue HTTP/1.1
[12/05 17:41:11]  DEBUG GET /api?apikey=<apikey>&output=json&mode=queue HTTP/1.1
[12/05 17:41:13]  DEBUG NZB File Load Checking
Biship
Active Participant
Active Participant
 
Posts: 88
Joined: Sun Jul 27, 2003 10:14 am

Registered Newsbin User since: 04/01/03

Re: Add NZB by URL & Add NZB by file upload not working

Postby Quade » Thu Dec 06, 2018 10:27 am

DEBUG SbServer: Read Request POST /api?apikey=<apikey>&output=json&mode=addurl&name=http://htpc:5099/getnzb/api/-<some.19.numerical.number>?apikey%3D<apikey>&nzbname=<filename.nzb>&priority=-100&cat=tv HTTP/1.1


This is the part that's not URL encoded.

name=http://htpc:5099/getnzb/api/-


Specifically this part. Dex and I think this is important enough to release a new beta so, I'm going to work on both issues on my end too.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Add NZB by URL & Add NZB by file upload not working

Postby Biship » Thu Dec 06, 2018 12:19 pm

Ah ok, I see.
Thanks - I look forward to the beta!
Biship
Active Participant
Active Participant
 
Posts: 88
Joined: Sun Jul 27, 2003 10:14 am

Registered Newsbin User since: 04/01/03


Return to Newsbin Version 6 Beta Support

Who is online

Users browsing this forum: No registered users and 3 guests