sensor.sonarr_upcoming_media
sensor.sonarr_upcoming_media copied to clipboard
Sonarr cannot be reached
Describe the Bug Can't connect the plugin to Sonarr.
- They're running in different VMs
- Sonarr is behind proxy
- The proxy is listening to 443 and forwards based on dns
- The official sonarr plugin connects fine to sonarr, it's defo not a network issue
Version: Everything running latest
Hi. Thank you for posting your issue. We need to determine what is different about your configuration compared to the others who successfully use this integration to access their sonarr VM (via DNS) behind a reverse proxy such as NGINX'; including me.
A quick way to determine if this is a network configuration issue or not is to ping sonarr.media.home.com from your Home Assistant's Terminal exactly like my below screenshot, except replace my example sonarr.myddns.domain.com with your sonarr.media.home.com. Note: This presumes your Sonarr is accessible via port 443.
PS: Can you please tell me what you mean by "The official sonarr plugin connects fine to sonarr"? This Github repo IS the official and original Sonarr integration for Home Assistant (also available on HACS).
Hopefully, this is something simple we can narrow down quickly.
Please let me know if you were able to ping sonarr.myddns.domain.com from your Home Assistant Terminal as shown above. If I dont hear back from you, I'll presume you either weren't able to ping sonarr.myddns.domain.com (proving its a network configuration issue on your setup) or got it working after verifying your configuration settings.
Hi, I'd like to jump in if I may as I'm experiencing the same issue. I can ping the sonarr machine just fine using its DNS-name, and I've already confirmed that the issue is not certificate-related (testing via terminal as well). Anything else that might be amiss? Any logs I can generate to see what's going on?
Hi, I'd like to jump in if I may, as I'm experiencing the same issue. I can ping the sonarr machine just fine using its DNS-name, and I've already confirmed that the issue is not certificate-related (testing via terminal as well). Anything else that might be amiss? Any logs I can generate to see what's going on?
@CDRX2 @Aur0nd :
I just realized what was wrong in the screenshot posted above! So sorry I missed this!!!! I can't believe I missed something this obvious. It was easily reproducable for me.
ISSUE: The Sonarr address: field during configuration should be the DNS name:. Not the URL!!
It is my fault; I should have changed the field label to display Sonarr DNS:, not Sonarr address:. That should resolve the issue just fine, especially if you can ping its DNS name from the terminal of your Home Assistant VM.
.
Thanks for getting back! I'd already tried both with and without the https:// prefix. It has no influence, still getting sonarr cannot be reached.
Does your domain have self signed certificate or are you using some other provider @CDRX2? If you are using self signed certificate it might cause the issue since it is not trusted by default. Can you try adding it with SSL disabled? (and definitelly WITHOUT https:// or http:// at the start)
I'm using self-signed certificates. I've tried adding it with SSL unchecked, no change. I disabled SSL enforcing in my proxy, no change either with or without SSL checked.
Can you send screen on the current config while adding? Don't forget to also change the port from 443 to 80 while not using SSL
Ok, forgot about the port change... Disabling SSL on that specific proxy host and then adding it with http and not https works. The issue is therefore most likely with the certificate. Interestingly there are a few other integrations (sabznzbd or deluge for instance) configured with the same certificate and they communicate fine.
This is the configuration that fails:
This is the one that worked (after disabling SSL entirely on the sonarr proxy host):
Is there any way to debug what is happening in the background?
The sabznzbd use http and deluge use different communication entirelly so thats why for them it works for you
Well, yes and no. They are both routed through the same proxy with the same certificate. But of course, you're right about the rest. I guess I'll investigate further.
If you still consider using self signed certs and want to use https for Sonarr (and the other integration like for Radarr) you have 2 choices:
- you would have to register/add your certs as trusted for HA (may differ base on the type of your instalation like Docker or HA OS)
- or use some certificate provider like Let's Encrypt which will automatically ensure the trust part (but it is not free)
I personally use Cloudflare since it provides me with Let's Encrypt certs and allows me to easily access my apps outside local networkusing their "tunnel". There isn't really much of a benefit using self signed certs other than that you don't have to memorize all your possible app addresses with their respective ports
I hope it helped, if you have more questions don't hesitate to ask.
Thanks! I have actually registered the certs as trusted with HA. However, there was one small detail I overlooked as described in this post. I re-created my CA, re-signed my certificate and it now works!!! Thanks a lot for the support.
Thank you @Makhuta for helping out. Glad to know it wasn't a bug.