docker-machine-kvm icon indicating copy to clipboard operation
docker-machine-kvm copied to clipboard

dial tcp: missing address when running docker-machine

Open jkirklan opened this issue 8 years ago • 1 comments

When I run docker-machine I get the following error: dial tcp: missing address

I am running RHEL 7.4

$ ls -l /var/run/libvirt/libvirt-sock*
srwxrwxrwx. 1 root libvirt 0 Nov 17 14:03 /var/run/libvirt/libvirt-sock
srwxrwxrwx. 1 root libvirt 0 Nov 17 14:03 /var/run/libvirt/libvirt-sock-ro

As root I run:

# virsh net-list
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes

but as a user I run it and get:

$ virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------

I ran docker-machine as root and got the same error.

# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2017-11-17 14:03:18 EST; 15min ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 1304 (libvirtd)
   CGroup: /system.slice/libvirtd.service
           ├─1304 /usr/sbin/libvirtd
           ├─1615 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/defa...
           └─1617 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/defa...

Nov 17 14:03:18 newnuc dnsmasq[1615]: started, version 2.76 cachesize 150
Nov 17 14:03:18 newnuc dnsmasq[1615]: compile time options: IPv6 GNU-getopt...fy
Nov 17 14:03:18 newnuc dnsmasq-dhcp[1615]: DHCP, IP range 192.168.122.2 -- 1...h
Nov 17 14:03:18 newnuc dnsmasq-dhcp[1615]: DHCP, sockets bound exclusively t...0
Nov 17 14:03:18 newnuc dnsmasq[1615]: reading /etc/resolv.conf
Nov 17 14:03:18 newnuc dnsmasq[1615]: using nameserver 75.75.75.75#53
Nov 17 14:03:18 newnuc dnsmasq[1615]: using nameserver 75.75.76.76#53
Nov 17 14:03:18 newnuc dnsmasq[1615]: read /etc/hosts - 2 addresses
Nov 17 14:03:18 newnuc dnsmasq[1615]: read /var/lib/libvirt/dnsmasq/default...es
Nov 17 14:03:18 newnuc dnsmasq-dhcp[1615]: read /var/lib/libvirt/dnsmasq/def...e
Hint: Some lines were ellipsized, use -l to show in full.

# lsmod |grep -i kvm
kvm_intel             170200  0
kvm                   566604  1 kvm_intel
irqbypass              13503  1 kvm

$ virsh -c qemu:///system list
 Id    Name                           State
----------------------------------------------------

Thanks

jkirklan avatar Nov 17 '17 19:11 jkirklan

If you run docker-machine with --debug and get these types of errors:

/usr/bin/docker-machine-driver-kvm: /lib/x86_64-linux-gnu/libvirt.so.0: version `LIBVIRT_5.10.0' not found

this means the binary is incompatible to your libvirt version and you need to rebuild it from source against your version.

juliantaylor avatar May 19 '20 12:05 juliantaylor