Open TrestenPool opened 1 month ago
Hi @TrestenPool, as you've noticed, we do need port 53 for dnsmasq. This is the standard port for DNS.
Any port we chose could potentially conflict with something else in the system. We could allow configuring, but I'd rather avoid complicating the configuration with backend-specific settings. We could perhaps randomize the port, but there are very few cases of people reporting collisions. And we don't actually support WSL specifically, so this is pretty much out of scope.
I am curious, why are you trying to run Multipass on WSL, rather than directly on Windows?
+1, I have the same issue, in my case need the dnsmasq because the native wsl2 not resolv the dns equal that the windows side with vpn
@osmufe, could you please clarify if you're also trying to run Multipass in WSL and why?
Describe the bug Multipass not starting up due to dnsmasq wanting to publish to port 53
To Reproduce How, and what happened?
Expected behavior Multipass should start up correctly reguardless if using wsl mirrored mode or not.
Logs trestenp@computer:~/Downloads$ tail -f /var/log/syslog May 16 16:35:29 PD-ITCADTEST6 systemd[1]: Started Service for snap application multipass.multipassd. May 16 16:35:29 PD-ITCADTEST6 multipassd[83942]: Using AppArmor support May 16 16:35:29 PD-ITCADTEST6 multipassd[83942]: Failed to enable AppArmor: AppArmor is not enabled May 16 16:35:29 PD-ITCADTEST6 multipassd[83942]: Starting dnsmasq May 16 16:35:29 PD-ITCADTEST6 multipassd[83942]: [83981] started: dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --domain=multipass --local=/multipass/ --except-interface=lo --interface=mpqemubr0 --listen-address=10.70.171.1 --dhcp-no-override --dhcp-ignore-clid --dhcp-authoritative --dhcp-leasefile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.leases --dhcp-hostsfile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.hosts --dhcp-range 10.70.171.2,10.70.171.254,infinite --conf-file=/var/snap/multipass/common/data/multipassd/network/dnsmasq-ergvWF.conf May 16 16:35:29 PD-ITCADTEST6 multipassd[83942]: May 16 16:35:29 PD-ITCADTEST6 multipassd[83942]: #012dnsmasq: failed to bind DHCP server socket: Address already in use May 16 16:35:29 PD-ITCADTEST6 dnsmasq[83981]: failed to bind DHCP server socket: Address already in use May 16 16:35:29 PD-ITCADTEST6 dnsmasq[83981]: FAILED to start up May 16 16:35:29 PD-ITCADTEST6 multipassd[83942]: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:29 PD-ITCADTEST6 multipassd[83942]: Caught an unhandled exception: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Main process exited, code=exited, status=1/FAILURE May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Failed with result 'exit-code'. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Scheduled restart job, restart counter is at 1. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: Stopped Service for snap application multipass.multipassd. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: Started Service for snap application multipass.multipassd. May 16 16:35:29 PD-ITCADTEST6 multipassd[83983]: Using AppArmor support May 16 16:35:29 PD-ITCADTEST6 multipassd[83983]: Failed to enable AppArmor: AppArmor is not enabled May 16 16:35:29 PD-ITCADTEST6 multipassd[83983]: Starting dnsmasq May 16 16:35:29 PD-ITCADTEST6 multipassd[83983]: [84023] started: dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --domain=multipass --local=/multipass/ --except-interface=lo --interface=mpqemubr0 --listen-address=10.70.171.1 --dhcp-no-override --dhcp-ignore-clid --dhcp-authoritative --dhcp-leasefile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.leases --dhcp-hostsfile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.hosts --dhcp-range 10.70.171.2,10.70.171.254,infinite --conf-file=/var/snap/multipass/common/data/multipassd/network/dnsmasq-gDNllc.conf May 16 16:35:29 PD-ITCADTEST6 multipassd[83983]: #012dnsmasq: failed to bind DHCP server socket: Address already in use May 16 16:35:29 PD-ITCADTEST6 multipassd[83983]: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:29 PD-ITCADTEST6 dnsmasq[84023]: failed to bind DHCP server socket: Address already in use May 16 16:35:29 PD-ITCADTEST6 multipassd[83983]: Caught an unhandled exception: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:29 PD-ITCADTEST6 dnsmasq[84023]: FAILED to start up May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Main process exited, code=exited, status=1/FAILURE May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Failed with result 'exit-code'. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Scheduled restart job, restart counter is at 2. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: Stopped Service for snap application multipass.multipassd. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: Started Service for snap application multipass.multipassd. May 16 16:35:29 PD-ITCADTEST6 multipassd[84025]: Using AppArmor support May 16 16:35:29 PD-ITCADTEST6 multipassd[84025]: Failed to enable AppArmor: AppArmor is not enabled May 16 16:35:29 PD-ITCADTEST6 multipassd[84025]: Starting dnsmasq May 16 16:35:29 PD-ITCADTEST6 multipassd[84025]: [84063] started: dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --domain=multipass --local=/multipass/ --except-interface=lo --interface=mpqemubr0 --listen-address=10.70.171.1 --dhcp-no-override --dhcp-ignore-clid --dhcp-authoritative --dhcp-leasefile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.leases --dhcp-hostsfile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.hosts --dhcp-range 10.70.171.2,10.70.171.254,infinite --conf-file=/var/snap/multipass/common/data/multipassd/network/dnsmasq-TjARLt.conf May 16 16:35:29 PD-ITCADTEST6 multipassd[84025]: #012dnsmasq: failed to bind DHCP server socket: Address already in use May 16 16:35:29 PD-ITCADTEST6 dnsmasq[84063]: failed to bind DHCP server socket: Address already in use May 16 16:35:29 PD-ITCADTEST6 dnsmasq[84063]: FAILED to start up May 16 16:35:29 PD-ITCADTEST6 multipassd[84025]: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:29 PD-ITCADTEST6 multipassd[84025]: Caught an unhandled exception: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Main process exited, code=exited, status=1/FAILURE May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Failed with result 'exit-code'. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Scheduled restart job, restart counter is at 3. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: Stopped Service for snap application multipass.multipassd. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: Started Service for snap application multipass.multipassd. May 16 16:35:29 PD-ITCADTEST6 multipassd[84065]: Using AppArmor support May 16 16:35:29 PD-ITCADTEST6 multipassd[84065]: Failed to enable AppArmor: AppArmor is not enabled May 16 16:35:29 PD-ITCADTEST6 multipassd[84065]: Starting dnsmasq May 16 16:35:29 PD-ITCADTEST6 multipassd[84065]: [84102] started: dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --domain=multipass --local=/multipass/ --except-interface=lo --interface=mpqemubr0 --listen-address=10.70.171.1 --dhcp-no-override --dhcp-ignore-clid --dhcp-authoritative --dhcp-leasefile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.leases --dhcp-hostsfile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.hosts --dhcp-range 10.70.171.2,10.70.171.254,infinite --conf-file=/var/snap/multipass/common/data/multipassd/network/dnsmasq-gjcazd.conf May 16 16:35:29 PD-ITCADTEST6 multipassd[84065]: #012dnsmasq: failed to bind DHCP server socket: Address already in use May 16 16:35:29 PD-ITCADTEST6 dnsmasq[84102]: failed to bind DHCP server socket: Address already in use May 16 16:35:29 PD-ITCADTEST6 dnsmasq[84102]: FAILED to start up May 16 16:35:29 PD-ITCADTEST6 multipassd[84065]: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:29 PD-ITCADTEST6 multipassd[84065]: Caught an unhandled exception: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Main process exited, code=exited, status=1/FAILURE May 16 16:35:29 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Failed with result 'exit-code'. May 16 16:35:30 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Scheduled restart job, restart counter is at 4. May 16 16:35:30 PD-ITCADTEST6 systemd[1]: Stopped Service for snap application multipass.multipassd. May 16 16:35:30 PD-ITCADTEST6 systemd[1]: Started Service for snap application multipass.multipassd. May 16 16:35:30 PD-ITCADTEST6 multipassd[84127]: Using AppArmor support May 16 16:35:30 PD-ITCADTEST6 multipassd[84127]: Failed to enable AppArmor: AppArmor is not enabled May 16 16:35:30 PD-ITCADTEST6 multipassd[84127]: Starting dnsmasq May 16 16:35:30 PD-ITCADTEST6 multipassd[84127]: [84166] started: dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --domain=multipass --local=/multipass/ --except-interface=lo --interface=mpqemubr0 --listen-address=10.70.171.1 --dhcp-no-override --dhcp-ignore-clid --dhcp-authoritative --dhcp-leasefile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.leases --dhcp-hostsfile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.hosts --dhcp-range 10.70.171.2,10.70.171.254,infinite --conf-file=/var/snap/multipass/common/data/multipassd/network/dnsmasq-fgHJjN.conf May 16 16:35:30 PD-ITCADTEST6 multipassd[84127]: #012dnsmasq: failed to bind DHCP server socket: Address already in use May 16 16:35:30 PD-ITCADTEST6 multipassd[84127]: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:30 PD-ITCADTEST6 dnsmasq[84166]: failed to bind DHCP server socket: Address already in use May 16 16:35:30 PD-ITCADTEST6 multipassd[84127]: Caught an unhandled exception: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53. May 16 16:35:30 PD-ITCADTEST6 dnsmasq[84166]: FAILED to start up May 16 16:35:30 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Main process exited, code=exited, status=1/FAILURE May 16 16:35:30 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Failed with result 'exit-code'. May 16 16:35:30 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Scheduled restart job, restart counter is at 5. May 16 16:35:30 PD-ITCADTEST6 systemd[1]: Stopped Service for snap application multipass.multipassd. May 16 16:35:30 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Start request repeated too quickly. May 16 16:35:30 PD-ITCADTEST6 systemd[1]: snap.multipass.multipassd.service: Failed with result 'exit-code'. May 16 16:35:30 PD-ITCADTEST6 systemd[1]: Failed to start Service for snap application multipass.multipassd.
Open ports on my computer trestenp@PD-ITCADTEST6:~/Downloads$ ss -tul Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process udp UNCONN 0 0 127.0.0.1:323 0.0.0.0: udp UNCONN 0 0 0.0.0.0:4789 0.0.0.0: udp UNCONN 0 0 :7946 : udp UNCONN 0 0 [::1]:323 [::]: tcp LISTEN 0 4096 0.0.0.0:domain 0.0.0.0: tcp LISTEN 0 4096 [::]:domain [::]: tcp LISTEN 0 4096 :2377 : tcp LISTEN 0 4096 :7946 : trestenp@PD-ITCADTEST6:~/Downloads$
Additional info
multipass 1.13.1
multipass get local.driver
trestenp@computer:~/Downloads$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy
Additional context The notes lead me to believe that something is running on port 53 but when I list open ports on my host port 53 is not listening. Also is there any way to tell multipass to listen on another port?