You are not logged in.

#1 2024-04-23 06:51:07

M440
Member
Registered: 2023-08-24
Posts: 28

[solved] dnsmasq: failed to create listening socket

hello,

please help

cant start virsh default network

sudo virsh net-start default
error: Failed to start network default
error: internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper) unexpected exit status 2:
dnsmasq: failed to create listening socket for 192.168.122.1: Address already in use
sudo lsof -i -P -n | grep LIST
cupsd      717    root   7u  IPv4    2427      0t0  TCP *:631 (LISTEN)
cupsd      717    root   8u  IPv6    2428      0t0  TCP *:631 (LISTEN)
sshd       724    root   3u  IPv4    8740      0t0  TCP *:22 (LISTEN)
sshd       724    root   4u  IPv6    8742      0t0  TCP *:22 (LISTEN)
dnsmasq    729 dnsmasq   5u  IPv4   10487      0t0  TCP *:53 (LISTEN)
dnsmasq    729 dnsmasq   7u  IPv6   10489      0t0  TCP *:53 (LISTEN)
smbd      1029    root  29u  IPv6   12790      0t0  TCP *:445 (LISTEN)
smbd      1029    root  30u  IPv6   12791      0t0  TCP *:139 (LISTEN)
smbd      1029    root  31u  IPv4   12792      0t0  TCP *:445 (LISTEN)
smbd      1029    root  32u  IPv4   12793      0t0  TCP *:139 (LISTEN)
mm@desktop ~
❯ sudo lsof -i -P -n | grep dns
dnsmasq    729 dnsmasq   4u  IPv4   10486      0t0  UDP *:53
dnsmasq    729 dnsmasq   5u  IPv4   10487      0t0  TCP *:53 (LISTEN)
dnsmasq    729 dnsmasq   6u  IPv6   10488      0t0  UDP *:53
dnsmasq    729 dnsmasq   7u  IPv6   10489      0t0  TCP *:53 (LISTEN)
mm@desktop ~
❯ sudo virsh net-dumpxml default
<network>
  <name>default</name>
  <uuid>467a7357-68ea-431d-b3c4-099379c6cb53</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='52:54:00:9e:37:8c'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>
❯ bat /var/log/pacman.log | rg dnsmasq
[2023-08-01T22:50:07+0200] [PACMAN] Running 'pacman -S dnsmasq'
[2023-08-01T22:50:13+0200] [ALPM] installed dnsmasq (2.89-1)
[2023-08-01T22:50:13+0200] [ALPM-SCRIPTLET] Creating group 'dnsmasq' with GID 963.
[2023-08-01T22:50:13+0200] [ALPM-SCRIPTLET] Creating user 'dnsmasq' (dnsmasq daemon) with UID 963 and GID 963.
[2023-08-20T19:22:48+0200] [PACMAN] Running 'pacman -S --needed qemu-full virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat ebtables iptables libguestfs'
[2024-02-14T09:57:24+0100] [ALPM] upgraded dnsmasq (2.89-1 -> 2.90-1)
binary file matches (found "\0" byte around offset 3450180)

Last edited by M440 (2024-04-23 13:27:33)

Offline

#2 2024-04-23 13:27:04

M440
Member
Registered: 2023-08-24
Posts: 28

Re: [solved] dnsmasq: failed to create listening socket

i had to disable the dnsmasq as a service,

❯ sct status dnsmasq.service
○ dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
     Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; disabled; preset: disabled)
     Active: inactive (dead)
       Docs: man:dnsmasq(8)

❯ sudo lsof -i -P -n | rg dns
dnsmasq    823 nobody   3u  IPv4   2595      0t0  UDP *:67
dnsmasq    823 nobody   5u  IPv4   2598      0t0  UDP 192.168.122.1:53
dnsmasq    823 nobody   6u  IPv4   2599      0t0  TCP 192.168.122.1:53 (LISTEN)

Offline

Board footer

Powered by FluxBB