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

dial tcp: missing address #13

Open
padcom opened this issue Mar 6, 2016 · 16 comments
Open

dial tcp: missing address #13

padcom opened this issue Mar 6, 2016 · 16 comments

Comments

@padcom
Copy link

padcom commented Mar 6, 2016

Error while creating KVM-based machine using docker-machine 0.6.0

$ docker-machine create --driver kvm -v node01
dial tcp: missing address

Using v0.6.0 for both kvm plugin and docker-machine on Linux Mint 17.3 (based on Ubuntu 14.04.4).

Is there anything else I should specify or is this a bug?

@dhiltgen
Copy link
Owner

dhiltgen commented Mar 6, 2016

I'm not sure, but that might be a case of missing permissions on the libvirt socket. I'd like to improve the driver to verify permissions and what not, and provide better error messages when things aren't quite set up properly. Until then, you should try to use another libvirt client to make sure you can create a VM first using your account (not sudo'd) You can try virsh, or the virt-manager GUI.

If you're able to successfully create a VM with other tools, and the driver still doesn't work, try running a create with debug enabled and post the results on this issue.

@ogrisel
Copy link

ogrisel commented Mar 30, 2016

I had the same issue. I could fix it by adding my user id to the libvirtd group in /etc/group and creating a new session with that user on the machine (either via a new ssh connection to localhost or by logging out and logging in again from my desktop environment).

@R-omk
Copy link

R-omk commented May 26, 2016

I want to run docker machine with kvm driver inside a docker container, but "dial tcp: missing address". I need to run docker machine for ci.

@ekuefler
Copy link

ekuefler commented Jul 6, 2016

My situation is the same as @R-omk's in that I'm trying to run inside of a docker container, so logout/login is trickier. In case anyone wants to try and reproduce this, the following commands will do it on my Ubuntu machine:

$ docker run --privileged -it debian
root@22567f5ad1d7:/# apt-get update && apt-get install libvirt-bin qemu-kvm curl wget
root@22567f5ad1d7:/# curl -L https://github.com/docker/machine/releases/download/v0.8.0-rc2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine &&   chmod +x /usr/local/bin/docker-machine
root@22567f5ad1d7:/#  wget https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.7.0/docker-machine-driver-kvm && chmod +x docker-machine-driver-kvm && mv docker-machine-driver-kvm /usr/local/bin/
root@22567f5ad1d7:/# docker-machine create -d kvm myengine0
dial tcp: missing address

@phillipp
Copy link

I have the exact same problem. Debugging said:

() DBG | Failed to connect to libvirt: [Code-38] [Domain-7] Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

What I don't know is: what/who should be creating said socket?

@karora
Copy link

karora commented Aug 3, 2016

I am seeing the same symptoms, but I think the underlying issue is different. This is on Debian Sid:

If I run the docker-machine-driver-kvm as myself, I get:
Failed to connect to libvirt: [Code-89] [Domain-47] error from service: CheckAuthorization: Message recipient disconnected from message bus without replying

As root, things work as expected.

However, as my own user I can happily use (e.g.) virsh create ... to create a VM, a network, etc. This is using the qemu:///session connection rather than qemu:///system and if I change:

connectionString   = "qemu:///session"

and now when I run docker-machine-driver-kvm as myself, I get:

This is a Docker Machine plugin binary.
Plugin binaries are not intended to be invoked directly.
Please use this plugin through the main 'docker-machine' binary.
(API version: 1)

Yay! :-)

Hope this helps...

Note that my ~/.config/libvirt/libvirt.conf

uri_default = "qemu:///session"

And my environment also has:

LIBVIRT_DEFAULT_URI=qemu:///session

So neither of those are being used, although strace does show the ~/.config/libvirt/libvirt.conf being opened, which was how I discovered the file in the first place.

Thanks,
Andrew McMillan

@jgedarovich
Copy link

I had same issue as phillipp on fedora 24 - fixed with a restart.

@paoloantinori
Copy link

On Fedora 24, I'm seeing the same issue discussed here, but nothing worked so far.

Not working even for root user and strace does not suggest what the problem might be.

@gliptak
Copy link

gliptak commented Jun 7, 2017

On Red Hat Enterprise Linux Server release 7.1 (Maipo) after a reboot

docker-machine create -d kvm myengine0
Creating CA: /home/user/.docker/machine/certs/ca.pem
Creating client certificate: /home/user/.docker/machine/certs/cert.pem
Running pre-create checks...
Error with pre-create check: "[Code-43] [Domain-19] Network not found: no network with matching name 'default'"

@gliptak
Copy link

gliptak commented Jun 7, 2017

http://wiki.libvirt.org/page/Networking

# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 docker-machines      active     yes           yes

Is there a (command line) override available? Thanks

@ceridwen
Copy link

ceridwen commented Jun 8, 2017

Was #18 supposed to have fixed all instances of this issue? I ran into this problem while trying to get Minikube running inside a Docker container (kubernetes/minikube#927 and kubernetes/minikube#278). The container is Debian Jessie, freshly downloaded from Dockerhub, Docker version 17.03.1-ce build c6d412e, docker-machine version 0.12.0 build 45c69ad, docker-machine-vm 10.0. Running docker-machine create --driver kvm dev while logged into the container as root gives dial tcp: missing address. The outer Docker version is the same. It's running on MacOS 10.12.5 (16F73).

@insidewhy
Copy link

Getting this problem on archlinux with the latest version of everything. Whether I am root or not I get this error and nothing suggested helps.

@diegom626
Copy link

For anyone who is having troubles with this error. if you're trying to install the plugin under Debian 8 the last release of this plugin uses a recent version of "libvirt.so.0" library, Debian Jessie use the libvirt.so.0.1002.9, so you have to install an older release of this plugin like docker-machine-kvm "v0.6.0". it should work that way.

@anjannath
Copy link

anjannath commented Sep 7, 2017

@ohjames I too had the issue, starting the libvirtd service fixed it.
sudo systemctl start libvirtd
But other errors starts to show up. like: Requested operation is not valid: network 'default' is not active

To fix the second error, you have to set the default network interface to active, to fix it
sudo virsh net-start deafult active
you can list the network cards by sudo virsh net-list --all

@zchef2k
Copy link

zchef2k commented Feb 7, 2018

Not sure if its relevant here or better suited for the Rancher folks, but trying to import the driver into a Rancher container running docker-machine yields the same result.

Error dialing to plugin server's address(), err=dial tcp: missing address

@tariksimsek
Copy link

anyone solved this for rancher?

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