Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with using nzbhydra2 with Mylar #51

Closed
phairplay opened this issue Jan 10, 2018 · 28 comments
Closed

Issue with using nzbhydra2 with Mylar #51

phairplay opened this issue Jan 10, 2018 · 28 comments

Comments

@phairplay
Copy link

Hi,
I noticed the following error on Mylar when searching my comics via nzbhydra2

[ERROR CODE: 900] org.springframework.validation.BeanPropertyBindingResult: 1 errors
Field error in object 'newznabParameters' on field 'o': rejected value [xml]; codes [typeMismatch.newznabParameters.o,typeMismatch.o,typeMismatch.org.nzbhydra.mapping.newznab.OutputType,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [newznabParameters.o,o]; arguments []; default message [o]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'org.nzbhydra.mapping.newznab.OutputType' for property 'o'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [org.nzbhydra.mapping.newznab.OutputType] for value 'xml'; nested exception is java.lang.IllegalArgumentException: No enum constant org.nzbhydra.mapping.newznab.OutputType.xml

I contacted the Mylar creator who said it’s nothing his end.

Could you please help resolve this?

@theotherp
Copy link
Owner

That was fixed two days ago. Are you sure you're running the latest version?

@phairplay
Copy link
Author

Yes running version v1.0.14

@theotherp
Copy link
Owner

Can't really explain that. It should work... Wait for the next release.

@theotherp
Copy link
Owner

1.0.15 is out, try that one.

@theotherp
Copy link
Owner

Should be fixed now.

@phairplay
Copy link
Author

hi,
im now seeing a search by mylar yet it doesn't download the result. i dont know if i should send this to mylar.

2018-01-11 18:23:14 ERROR Unable to download nzb from link: https://127.0.0.1/nzbhydra/api?apikey=myapi&t=get&id=3 [http://127.0.0.1:5075/nzbhydra/getnzb/api/-6802808242181296776?apikey=myapi]
2018-01-11 18:23:14 INFO download-retrieved headers: {'content-length': '70', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'set-cookie': 'XSRF-TOKEN=fff4c5ca-6af0-4483-9360-f3464c66c283; Path=/nzbhydra', 'expires': '0', 'server': 'nginx/1.8.0', 'connection': 'keep-alive', 'pragma': 'no-cache', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'date': 'Thu, 11 Jan 2018 18:23:14 GMT', 'content-type': 'application/xml;charset=UTF-8'}
2018-01-11 18:23:14 INFO Download URL: https://127.0.0.1/nzbhydra/api?apikey=myapi&t=get&id=3 [VerifySSL:False]

@theotherp
Copy link
Owner

There's no port there

@theotherp
Copy link
Owner

And ffs, post your debug infos like it says in the issue template.

@phairplay
Copy link
Author

apologise
here is the debug.
i use nginx to reverse proxy which works with all my other programs. all use http://
nzbhydra-debuginfos-2018-01-11-18-47.zip
12.0.0.1/nzbhydra, exepct for lazylibrarian which uses https://mydomain.com/nzbhydra

trying both on mylar cause the same error.

@theotherp
Copy link
Owner

Here's how I interpret Mylar's log:

Mylar accesses Hydra at https://127.0.0.1/nzbhydra/... to search but finds a download that links to http://127.0.0.1:5075/nzbhydra/.... Note the difference in scheme. I guess that could cause problems.

Try setting the external URL to https://127.0.0.1/nzbhydra/ (in Hydra's main config section).

@theotherp
Copy link
Owner

I'll probably disable the XSRF protection in the next version because it only causes problems and is rarely needed.

@phairplay
Copy link
Author

added the url but still getting the same error

@fryfrog
Copy link
Contributor

fryfrog commented Jan 11, 2018

I'm gonna suggest using your reverse proxy harder. I have mine setup so that sub.domain.com points at my external ip via real DNS. But inside my network, my router points sub.domain.com to the server's internal ip. That way, I can just use that everywhere. This could fix your issue because now you can point everything at https://sub.domain.com/nzbhydra2 (or whatever) and everything will just "work". Magically. Hopefully.

@phairplay
Copy link
Author

With lazylibrarian I have to use https://mydomain.com/nzbhydra which works fine. Trying this in Mylar comes up with the same errror as using http://127.0.0.1/nzbhydra (this is used by sonarr and radarr)

@fryfrog
Copy link
Contributor

fryfrog commented Jan 11, 2018

Does your mydomain.com work correctly internally? With routers and port forwards and stuff, it can be a little weird to get working. I assume it does, since LL is working. I've never added Hydra to either, let me try now and see what it does.

Edit: It turns out both Mylar and LL were using my old NZBHydra, so I've switched them to the new. I see a search query go through fine from LL to NZBHydra. The Mylar queries make it through too, but I don't have anything good to search for and nothing is found. :/

@phairplay
Copy link
Author

'LL works fine searches and results are sent to nzbget.
Mylar again searches but I get the error you see in my third post.
When I look into NZBHydra search history and run it again it pull results.

@phairplay
Copy link
Author

phairplay commented Jan 12, 2018

hi,
i updated to the latest version v1.0.16 and i’m still seeing the following error

2018-01-12 14:53:21 ERROR Unable to download nzb from link: http://127.0.0.1/nzbhydra/api?apikey=MYAPI&t=get&id=3 [http://127.0.0.1:5075/nzbhydra/getnzb/api/4065993004411482480?apikey=MYAPI]
2018-01-12 14:53:21 INFO download-retrieved headers: {'content-length': '70', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'expires': '0', 'server': 'nginx/1.8.0', 'connection': 'keep-alive', 'pragma': 'no-cache', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'date': 'Fri, 12 Jan 2018 14:53:21 GMT', 'content-type': 'application/xml;charset=UTF-8'}
2018-01-12 14:53:20 INFO Download URL: http://127.0.0.1/nzbhydra/api?apikey=MYAPI&t=get&id=3 [VerifySSL:False]

here are the debug logs
nzbhydra-debuginfos-2018-01-12-14-53.zip

I’ve made connect with @evilhero to see if he could assist from a Mylar point of view.

@theotherp
Copy link
Owner

theotherp commented Jan 12, 2018 via email

@evilhero
Copy link

It does at the search level - the problem is that it's getting some kind of response from the 127.0.0.1/nzbhydra and is returning the retrieved headers response. So there's no error per-se from the response (there might be an error code, it doesn't trap that), but the response being retrieved doesn't contain the nzb.

Has nzbhydra2 changed the returning nzb url so that it doesn't have a 'searchresultid' anymore ? (that's what Mylar looks for to distinguish hydra from newznab queries in the past - it looks like the nzb trying to be retrieved above is just using the id field now)

@theotherp
Copy link
Owner

@phairplay What you get in the browser when you call http://127.0.0.1:5075/nzbhydra/getnzb/api/4065993004411482480?apikey=MYAPI ?

@evilhero Why does Mylar need to distinguish between newznab and Hydra? No, there's not searchresultid parameter anymore. I was not aware there were any programs that handled Hydra differently (or needed to do so in the first place).

@theotherp
Copy link
Owner

I can see errors in the log that indicate that some tool is trying to make an API call with the parameter t=7030 which doesn't make sense. Mylar seems to make queries using that category. Could that be related?

@theotherp
Copy link
Owner

Ahhh... Sorry, I'm blind.

http://127.0.0.1/nzbhydra/api?apikey=MYAPI&t=get&id=3 is not a a valid NZB URL. The ID would need to look like the one in http://127.0.0.1:5075/nzbhydra/getnzb/api/4065993004411482480?apikey=MYAPI (in that case 4065993004411482480).

Why does Mylar use that ID?

@evilhero
Copy link

It doesn't need to distinguish normally - but at some point (can't recall exactly when), the returning of the searchresultid was only occuring with nzbhydra, so I had to make an exception for the return call to be handled properly. Probably why it was trying to use the id of 3 instead of the other id.

If it's no longer needed, I can remove the searchresultid check and it should be able to retrieve it normally provided @phairplay can figure out his reverse proxy stuff.

@theotherp
Copy link
Owner

Weird, it seems to work with all the other tools. If you need my support let me know.

@evilhero
Copy link

No worries - this is all because I thought it'd be a good idea to allow for dynamic API replacement within the existing API download calls because of some edge case.

So Mylar basically just stores the id and then dynamically generates the url from the other info. Turns out to be more of a PITA than anything else - so now's the excuse for me to just remove that stuff entirely. I'll have this pushed out within the hour for @phairplay to try...

@phairplay
Copy link
Author

Hi guys,
Many thanks for taking the time to review this, I’ll report back ASAP

@phairplay
Copy link
Author

Winner winner chicken dinner.....
Thank you so much guys, I really appreciate it.

David

@theotherp
Copy link
Owner

Great to hear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants