uselagoon / lagoon

Lagoon, the developer-focused application delivery platform
https://docs.lagoon.sh/
Apache License 2.0
568 stars 148 forks source link

dnsmasq conflict #409

Closed amjad-wp closed 6 years ago

amjad-wp commented 6 years ago

Keep getting the error when I run docker-compose up or build ERROR: Service "cli" mounts volumes from "amazeeio-ssh-agent", which is not the name of a service or container.

When I did pygmy up it fails

Error: failed to start containers: amazeeio-dnsmasq
/var/lib/gems/2.3.0/gems/pygmy-0.9.8/lib/pygmy/docker_service.rb:13:in `start': Failed to run amazeeio-dnsmasq.  Command docker run -d -p 53:53/tcp -p 53:53/udp --name=amazeeio-dnsmasq --cap-add=NET_ADMIN andyshinn/dnsmasq:2.75 -A /docker.amazee.io/127.0.0.1 failed (RuntimeError)
    from /var/lib/gems/2.3.0/gems/pygmy-0.9.8/bin/pygmy:120:in `exec_up'
    from /var/lib/gems/2.3.0/gems/pygmy-0.9.8/bin/pygmy:33:in `up'
    from /usr/lib/ruby/vendor_ruby/thor/command.rb:27:in `run'
    from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:in `invoke_command'
    from /usr/lib/ruby/vendor_ruby/thor.rb:369:in `dispatch'
    from /usr/lib/ruby/vendor_ruby/thor/base.rb:444:in `start'
    from /var/lib/gems/2.3.0/gems/pygmy-0.9.8/bin/pygmy:300:in `<top (required)>'
    from /usr/local/bin/pygmy:22:in `load'
    from /usr/local/bin/pygmy:22:in `<main>'

Followed lagoon documentation fully. I am on Ubuntu 17: Additional port information as follow:

tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      10984/dnsmasq       
tcp        0      0 192.168.1.105:53        0.0.0.0:*               LISTEN      10984/dnsmasq       
tcp        0      0 172.17.0.1:53           0.0.0.0:*               LISTEN      10984/dnsmasq       
tcp        0      0 172.18.0.1:53           0.0.0.0:*               LISTEN      10984/dnsmasq       
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1865/dnsmasq        
tcp6       0      0 ::1:53                  :::*                    LISTEN      10984/dnsmasq       
tcp6       0      0 fe80::b52c:90c0:550f:53 :::*                    LISTEN      10984/dnsmasq       
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           8258/chrome         
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           894/avahi-daemon: r 
udp        0      0 127.0.0.1:53            0.0.0.0:*                           10984/dnsmasq       
udp        0      0 192.168.1.105:53        0.0.0.0:*                           10984/dnsmasq       
udp        0      0 172.17.0.1:53           0.0.0.0:*                           10984/dnsmasq       
udp        0      0 172.18.0.1:53           0.0.0.0:*                           10984/dnsmasq       
udp        0      0 127.0.1.1:53            0.0.0.0:*                           1865/dnsmasq        
udp6       0      0 :::5353                 :::*                                8258/chrome         
udp6       0      0 :::5353                 :::*                                894/avahi-daemon: r 
udp6       0      0 ::1:53                  :::*                                10984/dnsmasq       
udp6       0      0 fe80::b52c:90c0:550f:53 :::*                                10984/dnsmasq       
unix  2      [ ACC ]     STREAM     LISTENING     55394    5801/code --unity-l  /run/user/1000/vscode-ce967cf1-1.23.1-main.sock
unix  2      [ ACC ]     STREAM     LISTENING     50351    5853/app --node-int  /run/user/1000/vscode-ce967cf1-1.23.1-shared.sock
unix  2      [ ACC ]     STREAM     LISTENING     31253    1581/tor             /var/run/tor/control
unix  2      [ ACC ]     STREAM     LISTENING     45314    4941/Keybase         /tmp/.org.chromium.Chromium.jQeMvP/SS
unix  2      [ ACC ]     STREAM     LISTENING     19253    1/init               /run/cups/cups.sock
rtprio commented 6 years ago

@amjad-wp ,

The error message is misleading but it seems the problem here is the dnsmasq running locally on your Ubuntu system, thus the pygmy dnsmasq container is unable to start.

Configuring systemd-resolvd to no longer open port 53 should fix it; https://unix.stackexchange.com/a/358485

dasrecht commented 6 years ago

Hi @amjad-wp we'll release pygmy 0.9.9 soon which opens up the possibility to disable the start of the local dnsmasq - https://github.com/amazeeio/pygmy/pull/9

amjad-wp commented 6 years ago

Hi @dasrecht,

Excellent. I will be waiting for it.

fubhy commented 6 years ago

Also waiting for this. Nice idea to just disable the resolver. Quick and reasonable fix :). This problem usually occurs when any incarnation of dnsmasq or libvirt is also working locally (e.g. when on one of the later versions of Ubuntu or when using Minishift, etc.)

dasrecht commented 6 years ago

Closing this was solved with the release of pygmy 0.9.9 https://github.com/amazeeio/pygmy/pull/9

sher1 commented 6 years ago

This problem is still showing up on the latest version. I downloaded it today, after installing pygmy and I have a conflict with my Ubuntu 18.10 install. Error starting userland proxy: listen tcp 0.0.0.0:53: bind: address already in use Pygmy version is /opt/lagoon] master 1 ± pygmy --version Pygmy - Version: 0.9.9

rtprio commented 6 years ago

@sher1 and you're running it with pygmy up --no-resolver?

sher1 commented 6 years ago

@rtprio I did not, that was the magic I needed. Thanks!