You are not logged in.

#1 2019-10-11 23:10:08

rphillips
Member
Registered: 2018-06-12
Posts: 3

[SOLVED] libvirtd 5.6.0 not listening on TCP socket

I just updated and pulled in libvirtd 5.6.0. I run libvirtd with a TCP listening socket. For some reason the tcp listening socket does not bind; however, if I run libvirtd in debug mode on the command-line it works fine. Anybody know what is going on?

Not working via systemd

● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2019-10-11 18:00:28 CDT; 4min 30s ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 15853 (libvirtd)
    Tasks: 19 (limit: 32768)
   Memory: 81.0M
   CGroup: /system.slice/libvirtd.service
           ├─  917 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
           ├─  918 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
           └─15853 /usr/bin/libvirtd --listen

Oct 11 18:00:28 hyperion systemd[1]: Started Virtualization daemon.
Oct 11 18:00:28 hyperion dnsmasq[917]: read /etc/hosts - 6 addresses
Oct 11 18:00:28 hyperion dnsmasq[917]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Oct 11 18:00:28 hyperion dnsmasq-dhcp[917]: read /var/lib/libvirt/dnsmasq/default.hostsfile

Not working

# sudo netstat -lntp |grep 16509
#

Command line (working):

[root@hyperion multi-user.target.wants]# LIBVIRT_DEBUG=1 libvirtd --listen 2>&1 | grep -i 16509                                                                                                             
2019-10-11 23:08:18.303+0000: 16797: debug : virNetServerServiceNewTCP:161 : Creating new TCP server nodename='<null>' service='16509'
2019-10-11 23:08:18.303+0000: 16797: info : virNetSocketNew:290 : RPC_SOCKET_NEW: sock=0x5584349d6940 fd=12 errfd=-1 pid=0 localAddr=0.0.0.0;16509, remoteAddr=<null>
2019-10-11 23:08:18.303+0000: 16797: info : virNetSocketNew:290 : RPC_SOCKET_NEW: sock=0x5584349d64d0 fd=13 errfd=-1 pid=0 localAddr=::;16509, remoteAddr=<null>

Command line (working)

# sudo netstat -lntp |grep 16509                                                                                                                                                    
tcp        0      0 0.0.0.0:16509           0.0.0.0:*               LISTEN      16797/libvirtd
tcp6       0      0 :::16509                :::*                    LISTEN      16797/libvirtd

Last edited by rphillips (2019-10-12 00:58:47)

Offline

#2 2019-10-12 00:58:28

rphillips
Member
Registered: 2018-06-12
Posts: 3

Re: [SOLVED] libvirtd 5.6.0 not listening on TCP socket

Figured it out. libvirtd-tcp.socket is missing from the install.

/usr/lib/systemd/system/libvirtd-tcp.socket should exist

[Unit]
Description=Libvirt non-TLS IP socket
Before=libvirtd.service
BindsTo=libvirtd.socket
After=libvirtd.socket

[Socket]
# This must match the @sysconfdir@/libvirt/@service@.conf tcp_port setting
# when using systemd version < 227
ListenStream=16509
Service=libvirtd.service

[Install]
WantedBy=sockets.target

Offline

#3 2019-10-12 01:40:49

loqs
Member
Registered: 2014-03-06
Posts: 19,099

Re: [SOLVED] libvirtd 5.6.0 not listening on TCP socket

pacman -Fo /usr/lib/systemd/system/libvirtd-tcp.socket
usr/lib/systemd/system/libvirtd-tcp.socket is owned by community/libvirt 5.6.0-1

Filesystem corruption?

Offline

#4 2019-10-12 01:46:15

rphillips
Member
Registered: 2018-06-12
Posts: 3

Re: [SOLVED] libvirtd 5.6.0 not listening on TCP socket

shoot. yeah. reinstalled the package and it was fine. thanks for the tip.

Offline

Board footer

Powered by FluxBB