Docker image unable to communicate with VM

Roaders

Dabbler
Joined
Sep 30, 2023
Messages
34
Hi All

I am trying to transition all my apps from a synology box to truenas and I have to say I am not loving the kubernetes aspect of this. I would be much happier to have a docker compose file and just rely on that....

Anyway, I have home assistant running in a VM and I have node-red running as a docker container. They both work fine in most respects but node-red is unable to access home assistant:

2023-10-31 17:08:50.224347+00:0031 Oct 17:08:50 - [info] [server:Kingshill HA] Connecting to http://192.168.86.154:8123
2023-10-31 17:08:58.288600+00:0031 Oct 17:08:58 - [info] [server:Kingshill HA] Connecting to http://192.168.86.154:8123
2023-10-31 17:09:06.353122+00:0031 Oct 17:09:06 - [info] [server:Kingshill HA] Connecting to http://192.168.86.154:8123
2023-10-31 17:09:14.416453+00:0031 Oct 17:09:14 - [info] [server:Kingshill HA] Connecting to http://192.168.86.154:8123
2023-10-31 17:09:22.480981+00:0031 Oct 17:09:22 - [info] [server:Kingshill HA] Connecting to http://192.168.86.154:8123
2023-10-31 17:09:30.544387+00:0031 Oct 17:09:30 - [info] [server:Kingshill HA] Connecting to http://192.168.86.154:8123

that is the ip and port that I access HA on (but it is NOT the ip that I access truenas through) and this is how node-red connected to HA when it was running on the Synology box.

I have host network selected on the config for the node-red docker image (I tried without and that didn't work either way).
I think that probably I need to use a different ip for homeassistant that it uses on the kubernetes network but as far as I can see there is no way I can find out what ip address that is. I have seen 172.x.x.x ips in logs for some docker containers I think which I assume are on the kubernetes network...

As you can probably tell I am very new to this stuff!

Any help much appreciated.
 

Roaders

Dabbler
Joined
Sep 30, 2023
Messages
34
the solution to this was that I had to setup a network bridge so that my VM could talk to the rest of the NAS.

I followed the instructions here:

 
Top