unifios-utilities
unifios-utilities copied to clipboard
Homebridge is running, but can't access it!
Hi,
I've got homebridge running on a container in podman, but for some reason I can not view it when I open http://10.0.5.4/. Any ideas?
My /etc/cni/net.d/90-homebridge.conflist
"cniVersion": "0.4.0",
"name": "homebridge",
"plugins": [
{
"type": "bridge",
"bridge": "br5",
"ipam": {
"type": "host-local",
"ranges": [
[
{
"subnet": "10.0.5.0/24",
"rangeStart": "10.0.5.4",
"rangeEnd": "10.0.5.4",
"gateway": "10.0.5.1"
}
]
],
"routes": [
{"dst": "0.0.0.0/0"}
]
}
},
{
"type": "tuning",
"capabilities": {
"mac": true
}
}
]
}
My initial-start script
podman run -d --restart always \
--privileged \
--name homebridge \
--net homebridge \
--dns 10.0.5.1 \
--dns-search lan \
-e TZ=Europe/Berlin \
-e PGID=0 -e PUID=0 \
-e HOMEBRIDGE_CONFIG_UI=1 \
-e HOMEBRIDGE_CONFIG_UI_PORT=80 \
-v "/mnt/data/homebridge/:/homebridge/" \
-v "/mnt/data/homebridge/run/:/run/" \
oznu/homebridge:latest
@kevinrieger
Did you create a Corporate network on your controller with no DHCP and VLAN 5?
If yes, did the macvlan
network properly register?
Run podman network inspect homebridge
on your UDM. (using 192.168.4.40 here instead of 10.0.5.4)
[UDM] root@udm-pro:/mnt/data/on_boot.d# podman network inspect homebridge
[
{
"cniVersion": "0.4.0",
"name": "homebridge",
"plugins": [
{
"bridge": "br4",
"ipam": {
"ranges": [
[
{
"gateway": "192.168.4.1",
"rangeEnd": "192.168.4.40",
"rangeStart": "192.168.4.40",
"subnet": "192.168.4.0/24"
}
]
],
"routes": [
{
"dst": "0.0.0.0/0"
}
],
"type": "host-local"
},
"type": "bridge"
},
{
"capabilities": {
"mac": true
},
"type": "tuning"
}
]
}
]
Can you ping the IP address? Run ping 192.168.4.40
on your UDM and from another computer.
[UDM] root@udm-pro:/mnt/data/on_boot.d# ping 192.168.4.40
PING 192.168.4.40 (192.168.4.40): 56 data bytes
64 bytes from 192.168.4.40: seq=0 ttl=64 time=0.118 ms
64 bytes from 192.168.4.40: seq=1 ttl=64 time=0.090 ms
I'm having a similar issue, the only difference is that I'm still using br0
instead of br4
or br5
. I'm unable to ping the IP address on the Smart Home subnet that I've created, so it could be a simple firewall issue, but I'm unsure.
Have you found a solution to this?
This looks related to #93 and #240. It seems like this is caused by a restart of the default br0
interface.
May 27 02:59:36 Dream-Machine user.info kernel: [ 34.597032] device br0 entered promiscuous mode
May 27 03:00:53 Dream-Machine user.info kernel: [ 85.653026] device br0 left promiscuous mode
May 27 03:01:05 Dream-Machine user.info kernel: [ 97.381056] device br0 entered promiscuous mode
In order to fix it, one has to re-attache the interface to the bridge. In my case:
# brctl addif br0 veth775bfe90
What I found works best is putting homebridge
onto a separate network with it's own VLAN and enabling mDNS Ciao
. This stops the restarts from affecting homebridge network.
@Sewci0 That sounds promising, I'm experiencing the same issue. Homebridge works after a UDM reboot, but after just a few minutes every package starts throwing errors indicating a lack of internet connectivity -- getaddrinfo EAI_AGAIN
shows up in most of the logs.
Can you give a little more info on how I need to set this up?
@Sewci0 I am also experiencing a similar issue.
I do have the Homebridge container running in a separate network with it's own VLAN and DHCP disabled.
Each time my UDM reboots or the network stack gets restarted the Homebridge container experiences a loss of connectivity.
I need to manually stop and start the container in order to regain connectivity once more.
Not exactly elegant, but I have found that editing /mnt/data/on_boot.d/25-homebridge.sh to the following, ensures homebridge runs on startup:
if podman container exists ${CONTAINER}; then
podman start ${CONTAINER}
sleep 10
podman stop ${CONTAINER}
podman start ${CONTAINER}
else
logger -s -t homebridge -p ERROR Container $CONTAINER not found, make sure you set the proper name, you can ignore this error if it is your first time setting it up
fi
It just stops and starts the container...
Hope this helps someone. I'd be interested if there has been any movement on this issue.
@Sewci0 how were you able to setup Ciao between VLANs? I'm trying the same setup (homebridge is on VLAN 5) but can't get mDNS to work without a multicast-relay container. My CNI conf is using macvlan:
{
"cniVersion": "0.4.0",
"name": "dns-homebridge",
"plugins": [
{
"type": "macvlan",
"mode": "bridge",
"master": "br5",
"mac": "xxx",
"ipam": {
"type": "static",
"addresses": [
{
"address": "xxx",
"gateway": "xxx"
}
],
"routes": [
{"dst": "0.0.0.0/0"},{"dst": "::/0"}
]
}
}
]
}
Are you using any existing mDNS features of the UDM or do you have those disabled?
(This worked fine with unifiOS 1.x, but since upgrading to 2.x I'm having issues)