[Bug] Interface eth0 not found. Falling back to default.
General
- [X] I have updated to the latest version of MySpeed.
- [X] My bug has not been reported yet.
The Bug
Working with myspeed with an Raspberry Pi 4 + Dockge and for a couple weeks it worked flawless and suddenly stopped with following error message:
Interface eth0 not found. Falling back to default.
Working with following compose setup:
services:
myspeed:
ports:
- 5216:5216
volumes:
- myspeed:/myspeed/data
restart: unless-stopped
container_name: MySpeed
image: germannewsmaker/myspeed
volumes:
myspeed: {}
networks:
dockge_default:
external: true
What device are you using to access the page?
In the browser
Which operating system is your MySpeed instance running on?
Linux
same problem here, use casa os. breaks after full os restart
Same problem here when running in Arch.
It looks like myspeed is looking for eth0 but as my interface is enp1s0 myspeed will not connect.
Is this correct?
Same issue.
I believe that the issue is found in server/util/loadInterfaces.js but I'm not sure why. Apologies, I am not a JS dev and not familiar with node. However, I can see that it is using the os.networkInterfaces() method to get an array of available interfaces. If I exec into my container, start the node interpreter, and execute something like i = os.networkInterfaces(), I get the following output:
> i = os.networkInterfaces()
{
lo: [
{
address: '127.0.0.1',
netmask: '255.0.0.0',
family: 'IPv4',
mac: '00:00:00:00:00:00',
internal: true,
cidr: '127.0.0.1/8'
},
{
address: '::1',
netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
family: 'IPv6',
mac: '00:00:00:00:00:00',
internal: true,
cidr: '::1/128',
scopeid: 0
}
],
eth0: [
{
address: '172.100.0.3',
netmask: '255.255.255.0',
family: 'IPv4',
mac: 'bc:24:11:ec:f1:3a',
internal: false,
cidr: '172.100.0.3/24'
}
]
}
As you can see, the first object has two child objects which are the local loopback interfaces, but the second object is the eth0 interface showing the correct ip address for the container.
I can see that the function skips over any interfaces marked as "internal," and so it should ignore those first two and proceed on to the eth0 interface, but for some reason it's bailing out of the loop and "falling back to the default." Apologies again, I get a bit lost in the code at this point and I'm not sure what it's trying to use as the default.
As a point of comparison, this issue is only occuring when I bootstrap a container using docker compose. I tried installing it using the install script and it builds the container on the same host and works just fine. Unfortunately, I want to use Docker Compose so that the container is attached to my Portainer stack and is assigned the correct IP address.
For reference, here are the relevant bits of my compose:
myspeed:
image: germannewsmaker/myspeed:latest
restart: unless-stopped
container_name: myspeed
hostname: myspeed
privileged: false
ports:
- 5216:5216
volumes:
- myspeed:/myspeed/data
networks:
tradewinds:
ipv4_address: 172.100.0.3
networks:
tradewinds:
name: tradewinds
attachable: true
driver: ipvlan
driver_opts:
parent: eth0
ipvlan_mode: l3
ipvlan_flag: bridge
ipam:
config:
- subnet: 172.100.0.0/24
gateway: 172.100.0.1
ip_range: 172.100.0.0/24
Hoping that this helps.
Same problem after restarting my raspberry pi 4 that runs CasaOS, sharing the traces I collected from the container.
An error occurred: getaddrinfo EAI_AGAIN github.com
Successfully connected to the database file
Integration "discord" loaded successfully
Integration "gotify" loaded successfully
Integration "healthChecks" loaded successfully
Integration "pushover" loaded successfully
Integration "telegram" loaded successfully
Integration "webhook" loaded successfully
Looking for network interfaces...
Interface eth0 not found. Falling back to default.
An error occurred: getaddrinfo EAI_AGAIN github.com
I found a WA for those using CasaOS and bridge network. The bridge IPV4 IPAM Gateway needs to be used, so the container can communicate with the external network: 172.17.0.1 In my case the IP is 172.17.0.1 so please check what IP has been assigned to the bridge network. The myspeed container worked as it should be after re-creating the container with the new DNS.
For me this compose works:
version: '3.9'
services:
myspeed:
image: germannewsmaker/myspeed
container_name: MySpeed
network_mode: 'host'
dns:
- 9.9.9.9
- 2a07:e340::2
volumes:
- '/home/******/.config/MySpeed:/myspeed/data'
Same here:
I have the same problem. Here is my docker compose
services:
myspeed:
image: "germannewsmaker/myspeed:latest"
container_name: myspeed
restart: always
environment:
- PUID=1000
- PGID=10
- TZ=Asia/Shanghai
ports:
- 5216:5216
volumes:
- ./data:/myspeed/data
network_mode: bridge
I have the same problem. Here is my docker compose
services: myspeed: image: "germannewsmaker/myspeed:latest" container_name: myspeed restart: always environment: - PUID=1000 - PGID=10 - TZ=Asia/Shanghai ports: - 5216:5216 volumes: - ./data:/myspeed/data network_mode: bridge
You should try deploying with your docker-compose file but configure by hand the network, it's my understanding that network needs manual configuration since the container engine set default values.
The problem is in server/tilt/loadInterfaces.js, which records whether the interface is available based on whether this interface can access speed.cloudflare.com/__down?bytes=1
Those that can be accessed will be recorded in useableInterfaces, which can override the detection logic inside to skip network checks
Try this modified version, which removes network connection detection, adds CLI download skip, and fixes the issue of SQLite initialization failure
myspeed-1.0.9-mod.zip