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

DHCP server addon fails to start after (and before) resetting configuration #3621

Closed
SzDavidHUN opened this issue Jun 3, 2024 · 3 comments
Closed
Labels

Comments

@SzDavidHUN
Copy link

Describe the issue you are experiencing

Even after resetting config, reinstalling the addon, it would fail to start, even with the default configuration.

Two interesting log messages, there appears when I try to start the addon with the default config:

Multiple interfaces match the same shared network: eth0 enu1u1
Failed to get interface index: No such device

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

DHCP Server

What is the version of the add-on?

1.4.0

Steps to reproduce the issue

  1. Previously I tried to use the addon, but it failed to start with a different error message. Therefore I reset the config to default, and then uninstalled it.
  2. (Re)Install DHCP server from Addon store
  3. Configuration -> Reset to defaults -> Save
  4. Start the addon
  5. Observe the error message and stopped service in the Logs tab

System Health information

System Information

version core-2024.5.5
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.28-haos-raspi
arch aarch64
timezone Europe/Budapest
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.34.0
Stage running
Available Repositories 1397
Downloaded Repositories 4
HACS Data ok
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 12.3
update_channel stable
supervisor_version supervisor-2024.05.1
agent_version 1.6.0
docker_version 25.0.5
disk_total 28.6 GB
disk_used 9.1 GB
healthy true
supported true
board rpi3-64
supervisor_api ok
version_api ok
installed_addons Advanced SSH & Web Terminal (18.0.0), Nginx Proxy Manager (1.0.1), MariaDB (2.7.1), phpMyAdmin (0.9.1), Mosquitto broker (6.4.1), Dnsmasq (1.8.1), AdGuard Home (5.1.0), DHCP server (1.4.0)
Dashboards
dashboards 4
resources 0
views 6
mode storage
Recorder
oldest_recorder_run May 24, 2024 at 14:22
current_recorder_run May 26, 2024 at 00:34
estimated_db_size 92.93 MiB
database_engine sqlite
database_version 3.44.2
Sonoff
version 3.7.3 (e240aaf)
cloud_online 1 / 2
local_online 1 / 1

Anything in the Supervisor logs that might be useful for us?

No response

Anything in the add-on logs that might be useful for us?

[06:15:40] INFO: Creating DHCP configuration...
[06:15:41] INFO: Starting DHCP server...
Internet Systems Consortium DHCP Server 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcpd.conf
Database file: /data/dhcpd.lease
PID file: /run/dhcp/dhcpd.pid
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.
Multiple interfaces match the same shared network: eth0 enu1u1
Failed to get interface index: No such device

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging.

exiting.
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Additional information

Bit of backstory:
I had trouble with AdGuard DHCP server, therefore I disabled it, and installed the Simple DHCP server addon.
After I configured it, it failed to start with various errors (even though the UI found the config valid).
To make it easier to find the errors, I removed some parts of the configuration, and eventually I just gave up, and used the "Reset to defaults" option in the configuration tab.

@guerstec
Copy link

guerstec commented Jun 8, 2024

Did you check your network setup in HA? Does the adapter have a static IP in HA? And did you specify the adapter you want in dhcp server configuration?

I have three network adapters in my HA and one runs my frigate cameras with the dhcp server. After the last update HA 'forgot' the routing and while I was trouble shooting, I temporarily had this message when dhcp adapter spelling did not match hassio selling. It works for me now, in the end all I had to do was add the broadcast manually via ip addr add .

@SzDavidHUN
Copy link
Author

Does the adapter have a static IP in HA?

Yes, I set static IP in HA.

And did you specify the adapter you want in dhcp server configuration?

I used the default configuration which is eth0. I managed to completely skip that option, neither the documentation nor the UI gives that setting much attention, nor explains it how to get the correct value for it. I'm used to HA prompting me for settings that I must provide.
Maybe the documentation should be improved, or even a dropdown provided with the possible interfaces? (Like how AdGuard the addon does it)

Anyway, In Settings -> System -> Network -> Configure network interfaces, it has two interfaces: ENU1U1 and WLAN0. Since this Raspberry Pi is connected via ethernet, therefore I think I need to use the first.

So this should be the valid configuration I'm looking for?

- broadcast: 192.168.255.255
  gateway: 192.168.0.1
  interface: enu1u1
  netmask: 255.255.0.0
  range_end: 192.168.4.1
  range_start: 192.168.4.250
  subnet: 192.168.0.0

If yes, I can give it a try later when I will have a bit more free time, and give feedback if the problem still exists.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 15, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants