f18m / ha-addon-dnsmasq-dhcp-server

An Home Assistant addon that runs dnsmasq as a DHCP server
4 stars 0 forks source link

Cant start addon #11

Closed Talixme closed 2 weeks ago

Talixme commented 2 weeks ago

Hello, I have this error as soon the addon starts

cont-init: info: /etc/cont-init.d/10-dnsmasq.sh exited 0 cont-init: info: running /etc/cont-init.d/32-nginx_ingress.sh [19:53:21] INFO: Configuring nginx ingress... cont-init: info: /etc/cont-init.d/32-nginx_ingress.sh exited 0 cont-init: info: running /etc/cont-init.d/32-nginx_ssl.sh cont-init: info: /etc/cont-init.d/32-nginx_ssl.sh exited 0 s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting services-up: info: copying legacy longrun backend (no readiness notification) services-up: info: copying legacy longrun dnsmasq (no readiness notification) services-up: info: copying legacy longrun nginx (no readiness notification) [19:53:21] INFO: Starting dnsmasq... [19:53:21] INFO: Starting nginx... [19:53:21] INFO: Starting dhcp-clients-webapp-backend... dnsmasq[167]: started, version 2.90 DNS disabled dnsmasq[167]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset no-nftset auth no-cryptohash no-DNSSEC loop-detect inotify dumpfile dnsmasq-dhcp[167]: DHCP, IP range 192.168.1.20 -- 192.168.1.250, lease time 12h dnsmasq-dhcp[167]: DHCP, sockets bound exclusively to interface eno1 Web backend starting 2024/10/14 19:53:21 Reading addon config file '/data/options.json' 2024/10/14 19:53:21 Acquired 1 IP address reservations 2024/10/14 19:53:21 Acquired 1 friendly names 2024/10/14 19:53:21 Web UI logging enabled=false 2024/10/14 19:53:21 Reading DHCP client lease file '/data/dnsmasq.leases' 2024/10/14 19:53:21 Updated DHCP clients internal status with 0 entries 2024/10/14 19:53:21 Starting server to listen on port 8976 2024/10/14 19:53:21 [emerg] 165#165: bind() to 172.30.32.1:8081 failed (98: Address in use) 2024/10/14 19:53:21 [notice] 165#165: try again to bind() after 500ms nginx: [emerg] bind() to 172.30.32.1:8081 failed (98: Address in use) s6-rc: info: service legacy-services successfully started 2024/10/14 19:53:21 [emerg] 165#165: bind() to 172.30.32.1:8081 failed (98: Address in use) 2024/10/14 19:53:21 [notice] 165#165: try again to bind() after 500ms nginx: [emerg] bind() to 172.30.32.1:8081 failed (98: Address in use) 2024/10/14 19:53:21 [emerg] 165#165: bind() to 172.30.32.1:8081 failed (98: Address in use) 2024/10/14 19:53:21 [notice] 165#165: try again to bind() after 500ms nginx: [emerg] bind() to 172.30.32.1:8081 failed (98: Address in use) 2024/10/14 19:53:21 [emerg] 165#165: bind() to 172.30.32.1:8081 failed (98: Address in use) 2024/10/14 19:53:21 [notice] 165#165: try again to bind() after 500ms nginx: [emerg] bind() to 172.30.32.1:8081 failed (98: Address in use) 2024/10/14 19:53:21 [emerg] 165#165: bind() to 172.30.32.1:8081 failed (98: Address in use) nginx: [emerg] bind() to 172.30.32.1:8081 failed (98: Address in use) 2024/10/14 19:53:21 [notice] 165#165: try again to bind() after 500ms nginx: [emerg] still could not bind() 2024/10/14 19:53:21 [emerg] 165#165: still could not bind() [17:53:23] WARNING: Halt add-on s6-rc: info: service legacy-services: stopping dnsmasq[167]: exiting on receipt of SIGTERM [17:53:23] INFO: Service restart after closing [17:53:23] INFO: Service restart after closing 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

I dont Know where is the error.

Thanks.

f18m commented 2 weeks ago

Hey @Talixme , Which version have you installed?

Talixme commented 2 weeks ago

Dnsmasq-DHCP - Current version: 1.3.0 Core - 2024.10.2 Supervisor - 2024.10.2 Operating System - 13.1 Frontend - 20241002.3 Thanks!!!

f18m commented 2 weeks ago

Dnsmasq-DHCP - Current version: 1.3.0 Core - 2024.10.2 Supervisor - 2024.10.2 Operating System - 13.1 Frontend - 20241002.3 Thanks!!!

ok thanks. Can you try to:

Thanks!

Talixme commented 2 weeks ago

hello, not working but with different problem.

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting cont-init: info: running /etc/cont-init.d/10-dnsmasq.sh [08:19:22] INFO: Resolving NTP hostnames eventually provided... [08:19:22] INFO: NTP servers are 0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org DNS resolved 0.europe.pool.ntp.org -> 158.220.97.17 DNS resolved 1.europe.pool.ntp.org -> 193.219.61.120 DNS resolved 2.europe.pool.ntp.org -> 45.136.155.37 [08:19:22] INFO: Configuring dnsmasq... [08:19:22] INFO: Full dnsmasq config: 1 # Automatically generated do not edit 2 # See https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html 3
4 # To disable dnsmasq's DNS server functionality. 5 port=0 6
7 no-resolv 8 no-hosts 9 keep-in-foreground 10 log-facility=- 11 no-poll 12 user=root 13
14 log-dhcp # log dhcp related messages 15
16
17 interface=eno1 18
19 # the /data folder for HomeAssistant addons is mounted on the host and is writable, let's save DHCP client list there: 20 dhcp-leasefile=/data/dnsmasq.leases 21
22 # Activate DHCP by enabling a range of IP addresses to be provisioned by DHCP server 23 dhcp-range=192.168.1.20,192.168.1.250,255.255.255.0,12h 24
25 # Set gateway -- i.e. option #3 of DHCP specs 26 dhcp-option=3,192.168.1.1 27
28
29
30 # Set DNS server(s)) -- i.e. option #6 of DHCP specs 31 dhcp-option=6,8.8.8.8,8.8.4.4 32
33
34
35
36
37 # Set NTP server(s)) -- i.e. option #42 of DHCP specs 38 dhcp-option=42,158.220.97.17,193.219.61.120,45.136.155.37 39
40
41
42
43
44
45 # Set static IP address reservations 46 dhcp-host=aa:bb:cc:dd:ee:ff,An-important-host-with-reserved-IP,192.168.1.15,12h 47
48
49
cont-init: info: /etc/cont-init.d/10-dnsmasq.sh exited 0 cont-init: info: running /etc/cont-init.d/32-nginx_ingress.sh [08:19:23] INFO: Configuring nginx ingress... [08:19:23] INFO: ingress_port=8100 [08:19:23] INFO: ingress_interface=172.30.32.1 [08:19:23] INFO: ingress_entry=/api/hassio_ingress/KlhXhRr89xR0Y-luSmB8r1dX5-RA6aBTPTohxE8EXnc [08:19:23] INFO: web_ui_port=8976 sed: /etc/nginx/servers/ssl.conf: No such file or directory cont-init: info: /etc/cont-init.d/32-nginx_ingress.sh exited 1 cont-init: warning: some scripts exited nonzero s6-rc: warning: unable to start service legacy-cont-init: command exited 1 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. 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

Thanks!!!!

f18m commented 2 weeks ago

@Talixme , can you retry once more with the BETA addon? Before hitting "start", please log via ssh on your Home Assistant box and run:

docker pull ghcr.io/f18m/amd64-addon-dnsmasq-dhcp:beta

This will make sure that you will be running the latest fix I deployed. After this is successful complete, just go to the "Dnsmasq-DHCP BETA" component in HA user interface and click "start"

Talixme commented 2 weeks ago

Now it works perfectly, just one thing which I know is due to the color theme, but just so you know, it doesn’t display correctly. Captura de pantalla 2024-10-16 095249

And one more request that would be great: the ability to change the names and force the MAC address to an IP from the web service. It would be much more convenient this way.

Thank you very much for your effort, for sharing your project, and for the quick support. Best regards.

f18m commented 2 weeks ago

hey @Talixme , about the color theme: can you open a new ticket and explain there which theme are you using and how to apply that in HA? I didn't even know it was possible in HA :)

And one more request that would be great: the ability to change the names and force the MAC address to an IP from the web service. It would be much more convenient this way.

Yeah I might open a ticket to track this and indeed I agree it would be more convenient. OTOH it's not a trivial development and... typically DHCP configuration is changed a lot in the first stages of a network rollout, but then you stop making changes... so I wonder if the effort is worth it...