tomaae / homeassistant-truenas

TrueNAS integration for Home Assistant
Apache License 2.0
183 stars 16 forks source link

No Response from Host [Bug] #157

Closed bchevreau closed 4 months ago

bchevreau commented 4 months ago

Describe the issue

When adding the integration, it loads for a few seconds and results in an error "No response from Host".

My setup is a bit particular, as Home Assistant runs as HA-OS in a VM inside the TrueNAS Scale system I am trying to monitor. I do not know if there is an issue with the routing of IPs inside of it that could cause the issue? Network configuration is not my forte...

How to reproduce the issue

Expected behavior

Screenshots

image

Software versions

Diagnostics data

Traceback/Error logs

2024-05-07 01:36:47.017 WARNING (SyncWorker_6) [custom_components.truenas.api] TrueNAS 192.168.1.122 unable to fetch data "pool" (no_response) 2024-05-07 01:36:47.017 ERROR (MainThread) [custom_components.truenas.config_flow] TrueNAS connection error (no_response) 2024-05-07 01:37:25.267 WARNING (SyncWorker_10) [custom_components.truenas.api] TrueNAS 192.168.1.121/24 unable to fetch data "pool" (no_response) 2024-05-07 01:37:25.268 ERROR (MainThread) [custom_components.truenas.config_flow] TrueNAS connection error (no_response)

Additional context

tomaae commented 4 months ago

Your VM most likely cannot access truenas host. Try to access your nas from HA command line.

bchevreau commented 4 months ago

I created a bridge so that they can communicate from each other, but sadly I am still getting the same error. I can ping my truenas IP just fine from HAOS Terminal now, so this is even weirder now!...

The logs aren't very chatty either...

2024-05-11 00:28:11.496 WARNING (SyncWorker_5) [custom_components.truenas.api] TrueNAS 192.168.1.121 unable to fetch data "pool" (no_response)
2024-05-11 00:28:11.497 ERROR (MainThread) [custom_components.truenas.config_flow] TrueNAS connection error (no_response)
tomaae commented 4 months ago

are you using standard port for web and do you have valid certificate?

bchevreau commented 4 months ago

All of this is inside my network, I am using the self-signed certificate from truenas, and nothing special on ports. It's not a truenas instance that's outside of my network that I'm trying to reach, that's why I find it weird that it can't reach, especially since I can ping the nas just fine from inside the HAOS shell.

bchevreau commented 4 months ago

I somehow fixed it by trying again all the combinations of options above related to SSL (Use SSL on/off, Verify Certificate on/off). But didn't record which one worked, so sorry again for disturbing you and thank you so much for your help !

PS: I did have to create a bridge and assign that br0 to both main truenas and the VM for it to work, but that's a truenas quirk. If anyone has an issue with it ping or PM me I'll be happy to help with that.