Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error getting stats for sub-interfaces - Failed to get stats for eth0.x #49

Closed
Guruleenyc opened this issue Jan 5, 2025 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@Guruleenyc
Copy link

Guruleenyc commented Jan 5, 2025

Describe the bug
After doing a clean installation for version 2024.12.27 , I’m seeing thousands of these errors and warnings in HA logs for interfaces.

Screenshots
See attached.

Unraid (please complete the following information):

  • Version 6.12.14

Home Assistant (please complete the following information):
Core: 2024.12.5
Supervisor: 2024.12.3

Home Assistant installation type (please complete the following information):
x86 / bare metal

Priority of Request
Low Screenshot_20250104-154958.png

@Guruleenyc Guruleenyc added the bug Something isn't working label Jan 5, 2025
@domalab
Copy link
Owner

domalab commented Jan 5, 2025

@Guruleenyc

  1. Could you please run ip link show and share the output? This will help to verify the exact interface names on your system.
  2. Are these VLAN interfaces (eth0.4, eth0.5, eth0.6) configured directly in Unraid or through another method? Understanding how they're set up will help me handle them correctly.
  3. Could you check if these interfaces appear in /sys/class/net/ by running ls -l /sys/class/net/ and share the output? This will show us exactly how the system sees these interfaces."
  4. Are these VLANs working correctly at the network level (can you pass traffic through them)?

Network Interface Information:

ip link show
ip -d link show   # Shows detailed info including VLANs
ls -l /sys/class/net/  # Shows actual interface names in sysfs

VLAN config verification

cat /proc/net/vlan/config # Shows VLAN configuration

Network configuration in Unraid

cat /boot/config/network.cfg

@Guruleenyc
Copy link
Author

Guruleenyc commented Jan 6, 2025

As you requested 👇

root@Tower:~# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP mode DEFAULT group default qlen 1000
    link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
6: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 2c:27:d7:f0:d6:58 brd ff:ff:ff:ff:ff:ff
7: eth0.4@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0.4 state UP mode DEFAULT group default qlen 1000
    link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
8: eth0.5@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0.5 state UP mode DEFAULT group default qlen 1000
    link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
9: eth0.6@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0.6 state UP mode DEFAULT group default qlen 1000
    link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
10: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
11: br0.4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
12: br0.5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
13: br0.6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
14: br-a1ddc0976202: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:36:6f:67:17 brd ff:ff:ff:ff:ff:ff
15: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:3a:e7:40:af brd ff:ff:ff:ff:ff:ff
16: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:96:a8:47 brd ff:ff:ff:ff:ff:ff
root@Tower:~#

=============

root@Tower:~#
root@Tower:~#
root@Tower:~#
root@Tower:~# ls -l /sys/class/net/
total 0
lrwxrwxrwx 1 root root 0 Dec 28 12:48 br-a1ddc0976202 -> ../../devices/virtual/net/br-a1ddc0976202/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 br0 -> ../../devices/virtual/net/br0/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 br0.4 -> ../../devices/virtual/net/br0.4/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 br0.5 -> ../../devices/virtual/net/br0.5/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 br0.6 -> ../../devices/virtual/net/br0.6/
lrwxrwxrwx 1 root root 0 Dec 28 12:49 docker0 -> ../../devices/virtual/net/docker0/
lrwxrwxrwx 1 root root 0 Dec 28 12:46 eth0 -> ../../devices/pci0000:00/0000:00:1c.4/0000:02:00.0/net/eth0/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 eth0.4 -> ../../devices/virtual/net/eth0.4/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 eth0.5 -> ../../devices/virtual/net/eth0.5/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 eth0.6 -> ../../devices/virtual/net/eth0.6/
lrwxrwxrwx 1 root root 0 Dec 28 12:46 eth1 -> ../../devices/pci0000:00/0000:00:1c.5/0000:01:00.0/net/eth1/
lrwxrwxrwx 1 root root 0 Dec 28 12:46 lo -> ../../devices/virtual/net/lo/
lrwxrwxrwx 1 root root 0 Dec 28 12:46 tunl0 -> ../../devices/virtual/net/tunl0/
lrwxrwxrwx 1 root root 0 Dec 28 12:49 virbr0 -> ../../devices/virtual/net/virbr0/
root@Tower:~#

================

cat /proc/net/vlan/config # Shows VLAN configuration
VLAN Dev name    | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.4         | 4  | eth0
eth0.5         | 5  | eth0
eth0.6         | 6  | eth0
root@Tower:~#

===========

cat /boot/config/network.cfg
# Generated settings:
IFNAME[0]="br0"
BRNAME[0]="br0"
BRSTP[0]="no"
BRFD[0]="0"
DESCRIPTION[0]="Mgmt"
BRNICS[0]="eth0"
PROTOCOL[0]="ipv4"
USE_DHCP[0]="no"
IPADDR[0]="172.16.1.5"
NETMASK[0]="255.255.255.0"
GATEWAY[0]="172.16.1.1"
METRIC[0]="1"
DNS_SERVER1="172.16.1.1"
USE_DHCP6[0]="yes"
DHCP6_KEEPRESOLV="no"
DESCRIPTION[0,1]="VM_net1"
VLANID[0,1]="4"
PROTOCOL[0,1]="ipv4"
USE_DHCP[0,1]="no"
IPADDR[0,1]="172.16.4.5"
NETMASK[0,1]="255.255.255.0"
GATEWAY[0,1]="172.16.4.1"
METRIC[0,1]="2"
DESCRIPTION[0,2]="Docker_net"
VLANID[0,2]="5"
PROTOCOL[0,2]="ipv4"
USE_DHCP[0,2]="no"
IPADDR[0,2]="172.16.5.5"
NETMASK[0,2]="255.255.255.0"
GATEWAY[0,2]="172.16.5.1"
METRIC[0,2]="3"
DESCRIPTION[0,3]="Honey_net"
VLANID[0,3]="6"
PROTOCOL[0,3]="ipv4"
USE_DHCP[0,3]="no"
IPADDR[0,3]="172.16.6.5"
NETMASK[0,3]="255.255.255.0"
GATEWAY[0,3]="172.16.6.1"
METRIC[0,3]="4"
VLANS[0]="4"
SYSNICS="1"
root@Tower:~# 

These are vlan's on unraid for Mgmt., docker, and vm's respectively. Yes they're working fine and pass traffic accordingly upstream to a Opnsense firewall (default gateway).

@domalab
Copy link
Owner

domalab commented Jan 7, 2025

@Guruleenyc So the integration currently does not support eth0.x interfaces and VLANs. That is why you are seeing the errors but I have played around with the code and added it but not sure if it will work as I don't have a setup like yours.

Can you download the latest updated source code zip file from the repo and overwrite your existing custom_components\unraid folder and files, then restart HA.

Screenshot 2025-01-07 at 1 16 34 pm

@Guruleenyc
Copy link
Author

As you requested 👇

`root@Tower:# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: tunl0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP mode DEFAULT group default qlen 1000
link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
6: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 2c:27:d7:f0:d6:58 brd ff:ff:ff:ff:ff:ff
7: eth0.4@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0.4 state UP mode DEFAULT group default qlen 1000
link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
8: eth0.5@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0.5 state UP mode DEFAULT group default qlen 1000
link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
9: eth0.6@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0.6 state UP mode DEFAULT group default qlen 1000
link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
10: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
11: br0.4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
12: br0.5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
13: br0.6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 2c:27:d7:f0:d6:59 brd ff:ff:ff:ff:ff:ff
14: br-a1ddc0976202: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
link/ether 02:42:36:6f:67:17 brd ff:ff:ff:ff:ff:ff
15: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
link/ether 02:42:3a:e7:40:af brd ff:ff:ff:ff:ff:ff
16: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
link/ether 52:54:00:96:a8:47 brd ff:ff:ff:ff:ff:ff
root@Tower:
#

=============

root@Tower:#
root@Tower:
#
root@Tower:#
root@Tower:
# ls -l /sys/class/net/
total 0
lrwxrwxrwx 1 root root 0 Dec 28 12:48 br-a1ddc0976202 -> ../../devices/virtual/net/br-a1ddc0976202/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 br0 -> ../../devices/virtual/net/br0/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 br0.4 -> ../../devices/virtual/net/br0.4/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 br0.5 -> ../../devices/virtual/net/br0.5/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 br0.6 -> ../../devices/virtual/net/br0.6/
lrwxrwxrwx 1 root root 0 Dec 28 12:49 docker0 -> ../../devices/virtual/net/docker0/
lrwxrwxrwx 1 root root 0 Dec 28 12:46 eth0 -> ../../devices/pci0000:00/0000:00:1c.4/0000:02:00.0/net/eth0/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 eth0.4 -> ../../devices/virtual/net/eth0.4/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 eth0.5 -> ../../devices/virtual/net/eth0.5/
lrwxrwxrwx 1 root root 0 Dec 28 15:01 eth0.6 -> ../../devices/virtual/net/eth0.6/
lrwxrwxrwx 1 root root 0 Dec 28 12:46 eth1 -> ../../devices/pci0000:00/0000:00:1c.5/0000:01:00.0/net/eth1/
lrwxrwxrwx 1 root root 0 Dec 28 12:46 lo -> ../../devices/virtual/net/lo/
lrwxrwxrwx 1 root root 0 Dec 28 12:46 tunl0 -> ../../devices/virtual/net/tunl0/
lrwxrwxrwx 1 root root 0 Dec 28 12:49 virbr0 -> ../../devices/virtual/net/virbr0/
root@Tower:~#

================

cat /proc/net/vlan/config # Shows VLAN configuration
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.4 | 4 | eth0
eth0.5 | 5 | eth0
eth0.6 | 6 | eth0
root@Tower:~#

===========

cat /boot/config/network.cfg

Generated settings:

IFNAME[0]="br0"
BRNAME[0]="br0"
BRSTP[0]="no"
BRFD[0]="0"
DESCRIPTION[0]="Mgmt"
BRNICS[0]="eth0"
PROTOCOL[0]="ipv4"
USE_DHCP[0]="no"
IPADDR[0]="172.16.1.5"
NETMASK[0]="255.255.255.0"
GATEWAY[0]="172.16.1.1"
METRIC[0]="1"
DNS_SERVER1="172.16.1.1"
USE_DHCP6[0]="yes"
DHCP6_KEEPRESOLV="no"
DESCRIPTION[0,1]="VM_net1"
VLANID[0,1]="4"
PROTOCOL[0,1]="ipv4"
USE_DHCP[0,1]="no"
IPADDR[0,1]="172.16.4.5"
NETMASK[0,1]="255.255.255.0"
GATEWAY[0,1]="172.16.4.1"
METRIC[0,1]="2"
DESCRIPTION[0,2]="Docker_net"
VLANID[0,2]="5"
PROTOCOL[0,2]="ipv4"
USE_DHCP[0,2]="no"
IPADDR[0,2]="172.16.5.5"
NETMASK[0,2]="255.255.255.0"
GATEWAY[0,2]="172.16.5.1"
METRIC[0,2]="3"
DESCRIPTION[0,3]="Honey_net"
VLANID[0,3]="6"
PROTOCOL[0,3]="ipv4"
USE_DHCP[0,3]="no"
IPADDR[0,3]="172.16.6.5"
NETMASK[0,3]="255.255.255.0"
GATEWAY[0,3]="172.16.6.1"
METRIC[0,3]="4"
VLANS[0]="4"
SYSNICS="1"
root@Tower:~#

`

These are vlan's on unraid for Mgmt., docker, and vm's respectively. I'll test this out tomorrow.

@domalab
Copy link
Owner

domalab commented Jan 12, 2025

@Guruleenyc Did the latest update make any difference to the vlan interfaces?

@Guruleenyc
Copy link
Author

@Guruleenyc Did the latest update make any difference to the vlan interfaces?

Hey, sorry for the delay in my response.
Good news! I do not see any more errors in the HA logs for ethernet interface vlans.
Thank you! 🙌🤝❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants