mattlongman / Hassio-Access-Point

Hass.io addon to let you create a WiFi access point, perfect for using WiFi devices on off-grid installations.
MIT License
81 stars 62 forks source link

dnsmasq: failed to create listening socket for port 53: Address in use #3

Closed mattlongman closed 3 years ago

mattlongman commented 3 years ago

First: thanks for this add-on! Nice feature for IoT solutions :) However, DHCP is still not working for me. Running HassIO on Raspberry Pi 3B. Log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting Hass.io Access Point Addon
dnsmasq: failed to create listening socket for port 53: Address in use
Configuration file: /hostapd.conf
rfkill: Cannot open RFKILL control device
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr <mac> and ssid “said”
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED 
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: associated
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: associated
wlan0: AP-STA-CONNECTED <mac>
wlan0: STA <mac> RADIUS: starting accounting session FFDEC520E090BD6A
wlan0: STA <mac> WPA: pairwise key handshake completed (RSN)
wlan0: STA 98:01:a7:97:ce:ff IEEE 802.11: associated
wlan0: AP-STA-CONNECTED 98:01:a7:97:ce:ff
wlan0: STA 98:01:a7:97:ce:ff RADIUS: starting accounting session BBC0B5F54EC96473
wlan0: STA 98:01:a7:97:ce:ff WPA: pairwise key handshake completed (RSN)
wlan0: STA 98:01:a7:97:ce:ff IEEE 802.11: disassociated
wlan0: AP-STA-DISCONNECTED 98:01:a7:97:ce:ff
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: AP-STA-DISCONNECTED <mac>
wlan0: STA <mac> IEEE 802.11: disassociated
wlan0: STA <mac> IEEE 802.11: associated
wlan0: AP-STA-CONNECTED <mac>
wlan0: STA <mac> RADIUS: starting accounting session 93D1B0C8FCBEF90A
wlan0: STA <mac> WPA: pairwise key handshake completed (RSN)
wlan0: STA <mac> IEEE 802.11: disassociated

I've hidden my mac-address and SSID ;)

It's rather strange that the client keeps reconnecting.

Originally posted by @wschaeffer in https://github.com/mattlongman/Hassio-Access-Point/issues/1#issuecomment-713117923

mattlongman commented 3 years ago

This stands out:

dnsmasq: failed to create listening socket for port 53: Address in use

Are you using any other add-ons that would provide DNS?

Try copying the add-on to your local add-ons directory, and add port=0 to dnsmasq.conf and see if that works.

If not, please show your config (without SSID & password) & which other add-ons that you have running and I'll take a look tomorrow. I'll also look at adding some options to configure/disable DNS.

mattlongman commented 3 years ago

Replicated issue by installing another addon which uses port 53 (AdGuard). Added port=0 to dnsmasq.conf but will look at expanding DNS options in future.

mattlongman commented 3 years ago

@wschaeffer - This is fixed now. Please update the addon (to v0.3.1).