#41
PhAzE wrote:My friends problem turned out to be an invalid password so this is now working. I'd also like to mention that nzbdrone just added the ability to grab images through api as of today ;)
YES!!! This will fix everything =)
#42
I'm still at a complete loss for what could be causing my reverse proxy & http auth woes. No matter what, I'm still getting a red "401 Unauthorized" error message. I've narrowed it down to something specific to how NZB360 is sending the basic auth credentials to the server, because if I remove basic auth from the Apache config file, it works perfectly fine.

Here's the lines in my apache conf file:

Code: Select all

<Location /tv>
    ProxyPass http://localhost:8989/tv
    ProxyPassReverse http://localhost:8989/tv
    AuthType Basic
    AuthName "Authentication Required"
    AuthUserFile /etc/htpasswd/.htpasswd
    Require valid-user
</Location>
NzbDrone is configured to not require authentication (not like it matters with NZB360 8.2 anyway). The setting for Host/IP is set to username:password@hostname. The API key is entered correctly. Removing the basic auth from the Apache config results in NZB360 connecting to NzbDrone perfectly. I've triple checked the http auth username and password and they're correct. Both my tablet (Nexus 7 2013 running stock 4.4.2) and my phone (LG G2 running CM11) have the same issue. The same exact configuration works fine for CouchPotato.

Any ideas?
#44
I'm having the same issue with nzbdrone, using apache reverse proxy over https with basic auth and auth disabled in nzbdrone and I get the 401 error when attempting to connect. All of the other apps work fine and the reverse proxy itself is working fine if i login from firefox etc.

From the apache logs it does look like the app is not passing the login credentials over correctly, but I do have them in the IP/Host Address field exactly the same as in the sab/couch potato etc settings that do work correctly.

Did anyone manage to work out why this wasn't working?
#45
TTT wrote:I'm having the same issue with nzbdrone, using apache reverse proxy over https with basic auth and auth disabled in nzbdrone and I get the 401 error when attempting to connect. All of the other apps work fine and the reverse proxy itself is working fine if i login from firefox etc.

From the apache logs it does look like the app is not passing the login credentials over correctly, but I do have them in the IP/Host Address field exactly the same as in the sab/couch potato etc settings that do work correctly.

Did anyone manage to work out why this wasn't working?
Nope, I'm still experiencing the same thing with NzbDrone after the 8.2.1 update and haven't found a fix yet. I've also always had problems with nzbget not working in the same auth/proxy setup either (it just hangs on "Connecting...") but I figured one service at a time with issues :)

What version of Apache are you running? I know they changed certain aspects of how the auth system worked from 2.2 to 2.4, I'm wondering if that could explain the issues somehow (and why so few people are having them). Maybe I should try setting up an Apache 2.2 virtual machine and see if I have any better luck.
#47
punchsideiron wrote:
TTT wrote:I'm having the same issue with nzbdrone, using apache reverse proxy over https with basic auth and auth disabled in nzbdrone and I get the 401 error when attempting to connect. All of the other apps work fine and the reverse proxy itself is working fine if i login from firefox etc.

From the apache logs it does look like the app is not passing the login credentials over correctly, but I do have them in the IP/Host Address field exactly the same as in the sab/couch potato etc settings that do work correctly.

Did anyone manage to work out why this wasn't working?
Nope, I'm still experiencing the same thing with NzbDrone after the 8.2.1 update and haven't found a fix yet. I've also always had problems with nzbget not working in the same auth/proxy setup either (it just hangs on "Connecting...") but I figured one service at a time with issues :)

What version of Apache are you running? I know they changed certain aspects of how the auth system worked from 2.2 to 2.4, I'm wondering if that could explain the issues somehow (and why so few people are having them). Maybe I should try setting up an Apache 2.2 virtual machine and see if I have any better luck.
I don't use nzbget so hadn't noticed any issues with that.

I'm running 2.2 so guess it can't be that.
Kev wrote:Damn, I missed this bug in v8.2.1. This will be my focus for v8.2.2.
Cheers Kev.
#48
Just a small bump.

I am experiencing the exact same problem (no banners for nzbdrone are downloaded). Though the issue is minor, it would be nice to have working banners. The apache access logs shows the following:

Code: Select all

<IP> - <username> [21/Jul/2014:14:42:59 +0200] "GET /api//MediaCover/31/banner.jpg?lastWrite=635414360310000000 HTTP/1.1" 401 374 "-" "Dalvik/1.6.0 (Linux; U; Android 4.4.2; GT-I9300 Build/KVT49L)"
I have setup the nzbdrone url (in the nzb360 app) with the user:password@host format, using port 443 and SSL enabled.

Could you please have another look into this? If you need any more information, please let me know.
#49
There's another reason NZB360 won't work with reverse proxies and HTTPS depending on configuration - it doesn't appear to use a HTTP client that supports SNI. So, if you have multiple HTTPS vhosts on a single IP, NZB360 won't connect to the right one because it doesn't send the hostname as part of the TLS negotiation.

I don't know what HTTP client NZB360 is using, but HttpsURLConnection supports SNI out of the box (and falls back gracefully) and is available from 2.3 up.

Attached is a logcat from a freshly reinstalled copy of NZB360 v9.2.2 attempting to connect to NZBGet via a HAProxy frontend that uses SNI to route requests. The log is not very illuminating though I'm afraid, it just shows the 404 that the server returns because without the SNI hostname, the client just ends up connecting to the first vhost (which in this case is forwards to a completely different machine.

Let me know if there's any more information I can provide, or testing I can do to help sort this part of the problem.
Attachments
nzb360.txt.gz
v9.2.2 SNI connection attempt
(2.32 KiB) Downloaded 121 times
#50
Interesting, thanks for the info. nzb360 uses slightly different network code depending on the service you're using, since I wrote some of these services years ago at this point. NZBGet isn't using HttpsURLConnection at the moment, but I plan to rewrite the connection code and port OkHttp over to it, which will resolve this issue with NZBGet.

Thanks again for bringing this to my attention!