Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to retrieve dnsmasq leases from /var/lib/libvirt/dnsmasq/docker-machines.leases #60

Open
virtcruiser opened this issue Sep 25, 2017 · 6 comments

Comments

@virtcruiser
Copy link

Versioning information:

OS: SUSE Linux Enterprise Server 12 Patch 1

virsh version
Compiled against library: libvirt 1.2.18
Using library: libvirt 1.2.18
Using API: QEMU 1.2.18
Running hypervisor: QEMU 2.3.1

dnsmasq --version
Dnsmasq version 2.76 Copyright (c) 2000-2016 Simon Kelley
Compile time options: IPv6 GNU-getopt no-DBus i18n IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify

docker-machine --version
docker-machine version 0.12.2, build 9371605

docker-machine-driver-kvm version v0.10.0

When running:

docker-machine -D create -d "kvm" default

I get the following:

(default) DBG | Creating VM data disk...
(default) DBG | Creating 20000 MB hard disk image...
(default) DBG | Defining VM...
(default) DBG | Starting VM default
(default) DBG | GetIP called for default
(default) DBG | Failed to retrieve dnsmasq leases from /var/lib/libvirt/dnsmasq/docker-machines.leases
(default) Failed to decode dnsmasq lease status: unexpected end of JSON input
(default) DBG | Unable to locate IP address for MAC 52:54:00:6c:d5:d8

As can be seen the ISO downloads and the VM starts. I can see the VM in virt-manager and also connect to it. The lease failure repeats until it times out. I have no /var/lib/libvirt/dnsmasq/docker-machines.leases file present. The assumption is that the failure is because that file is missing but what is supposed to be creating that file in the process and any idea why it isn't being automatically created? Using virsh net-dumpxml I can see "docker-machines" and it has the following configuration:

docker-machines 221c842f-27b9-4b17-83d2-f9233971bb9e

Using virsh net-list it shows with an active state.

@cchet
Copy link

cchet commented Oct 16, 2017

I experience the same issue since some days.
After a stop of the VM the VM cannot be started again, because it hungs on the following issue until it timeouts.

Fedora: 27
Image: B2D
docker-machine-kvm: 0.10.0
minishift: v1.3.1+a2d3799
CDK: v3.1.1-1

Getting to WaitForSSH function...
(minishift) Calling .GetSSHHostname
(minishift) DBG | GetIP called for minishift
(minishift) DBG | Failed to retrieve dnsmasq leases from /var/lib/libvirt/dnsmasq/docker-machines.leases
(minishift) DBG | IP address: 192.168.42.18
(minishift) DBG | Unable to locate IP address for MAC 52:54:00:6b:70:e6
(minishift) Calling .GetSSHPort
(minishift) Calling .GetSSHKeyPath
(minishift) Calling .GetSSHKeyPath
(minishift) Calling .GetSSHUsername
Using SSH client type: external
Using SSH private key: /home/herzog/.minishift/machines/minishift/id_rsa (-rw-------)
&{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none [email protected] -o IdentitiesOnly=yes -i /home/herzog/.minishift/machines/minishift/id_rsa -p 22] /usr/bin/ssh }
About to run SSH command:
exit 0
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : ssh command error:
command : exit 0
err : exit status 255
output :

@karmab
Copy link

karmab commented Nov 7, 2017

i think it's addressed by #63

@gabx
Copy link

gabx commented Feb 18, 2018

Same issue here with Fedora 27

$ minikube start --vm-driver kvm --v=10 --alsologtostderr
.......
Found binary path at /usr/local/bin/docker-machine-driver-kvm
Launching plugin server for driver kvm
Plugin server listening at address 127.0.0.1:34667
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minikube) Calling .GetState
(minikube) DBG | Getting current state...
(minikube) DBG | Fetching VM...
I0218 13:32:44.944455   21624 cluster.go:83] Machine state:  Running
(minikube) Calling .DriverName
Waiting for SSH to be available...
Getting to WaitForSSH function...
(minikube) Calling .GetSSHHostname
(minikube) DBG | GetIP called for minikube
(minikube) DBG | Failed to retrieve dnsmasq leases from /var/lib/libvirt/dnsmasq/docker-machines.leases

@wadadli
Copy link

wadadli commented May 9, 2018

similar issue here,
Fedora 28 Server
Host KVM

`[michael@hawksbill ~]$ docker-machine create --driver kvm myvm1
Running pre-create checks...
Creating machine...
(myvm1) Image cache directory does not exist, creating it at /home/michael/.docker/machine/cache...
(myvm1) No default Boot2Docker ISO found locally, downloading the latest release...
(myvm1) Latest release for github.com/boot2docker/boot2docker is v18.03.1-ce
(myvm1) Downloading /home/michael/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v18.03.1-ce/boot2docker.iso...
(myvm1) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
(myvm1) Copying /home/michael/.docker/machine/cache/boot2docker.iso to /home/michael/.docker/machine/machines/myvm1/boot2docker.iso...
(myvm1) Creating SSH key...
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(myvm1) Failed to decode dnsmasq lease status: unexpected end of JSON input
^C

[michael@hawksbill ~]$ systemctl status dnsmasq
● dnsmasq.service - DNS caching server.
Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[michael@hawksbill ~]$ dnsmasq --test
dnsmasq: syntax check OK.
[michael@hawksbill ~]$ docker-machine create --driver virtualbox myvm2
Running pre-create checks...
Creating machine...
(myvm2) Copying /home/michael/.docker/machine/cache/boot2docker.iso to /home/michael/.docker/machine/machines/myvm2/boot2docker.iso...
(myvm2) Creating VirtualBox VM...
(myvm2) Creating SSH key...
(myvm2) Starting the VM...
(myvm2) Check network to re-create if needed...
(myvm2) Found a new host-only adapter: "vboxnet0"
Error creating machine: Error in driver during machine creation: Unable to start the VM: /usr/bin/VBoxManage startvm myvm2 --type headless failed:
VBoxManage: error: VT-x is being used by another hypervisor (VERR_VMX_IN_VMX_ROOT_MODE).
VBoxManage: error: VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

Details: 00:00:00.174426 Power up failed (vrc=VERR_VMX_IN_VMX_ROOT_MODE, rc=NS_ERROR_FAILURE (0X80004005))`

@alexellis
Copy link

I got the same error message. Was there a resolution released for this? I'm using Ubuntu 16.04 LTS without any special configuration and KVM.

(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
(docker1) Failed to decode dnsmasq lease status: unexpected end of JSON input
Linux ts 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Minikube is working fine with its KVM2 driver.

@wadadli
Copy link

wadadli commented Aug 25, 2018

It's deprecated, use the kvm2 driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants