error while creating localhost controller

Bug #1756729 reported by Cedric Djahan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Medium
Unassigned

Bug Description

I'm not able to create a juju controller on my localhost.
i tried it several times with the command juju bootstrap localhost lxd-test --debug .
I'm getting the error: ERROR juju.cmd.juju.commands bootstrap.go:528 failed to bootstrap model: subprocess encountered error code 1

The output is available form the file :
https://gist.github.com/cedrico2016/95adfa9dc5d4ffd59f3b355856b62a0c

Can anyone give me help in this situation?

description: updated
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1756729] Re: error while creating localhost controller

We are trying to talk to LXD on your host machine at 10.19.20.1:8443 but
seem to be failing to reach it.

Do you have a local firewall set up on your machine? Can you allow
10.19.200.1:8443 to be accessed from inside the containers?

2018-03-18 19:43:52 DEBUG juju.tools.lxdclient client.go:252 connecting to
LXD remote "remote": "10.19.200.1:8443"
ERROR new environ: Get https://10.19.200.1:8443/1.0: Unable to connect to:
10.19.200.1:8443
2018-03-18 19:43:53 DEBUG cmd supercommand.go:459 error stack:
Get https://10.19.200.1:8443/1.0: Unable to connect to: 10.19.200.1:8443

On Mon, Mar 19, 2018 at 12:40 AM, Cedric Djahan <email address hidden>
wrote:

> ** Description changed:
>
> I'm not able to create a juju controller on my localhost.
> - i tried it several times with the command juju bootstrap localhost
> lxd-test --debug .
> + i tried it several times with the command juju bootstrap localhost
> lxd-test --debug .
> I'm getting the error: ERROR juju.cmd.juju.commands bootstrap.go:528
> failed to bootstrap model: subprocess encountered error code 1
>
> - The output is available form the file :
> + The output is available form the file :
> https://gist.github.com/cedrico2016/95adfa9dc5d4ffd59f3b355856b62a0c
>
> - Can anyone give help me in this situation
> + Can anyone give me help in this situation?
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1756729
>
> Title:
> error while creating localhost controller
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1756729/+subscriptions
>

John A Meinel (jameinel)
Changed in juju:
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Cedric Djahan (cedrico2010) wrote :

hi John,
thank you for your reply.
However i'm running a normal desktop distribution of ubuntu 16.04 LTS, with no firewall.

```cedrico2015@cedrico2015-HP-350-G2:~$ nc -zv 10.19.200.1 8443
Connection to 10.19.200.1 8443 port [tcp/*] succeeded! ```

```cedrico2015@cedrico2015-HP-350-G2:~$ sudo ufw status
Status: inactive ```

is there anything else i have to do?

Revision history for this message
John A Meinel (jameinel) wrote :

Given that you have snap lxd installed, I'm curious if you also have lxd
from debian packages installed. Its possible that port :8443 is actually
the other LXD agent. I seem to remember there might have been an issue
where having both deb lxd and snap lxd causes one of them to switch from
:8443 to :9443 but Juju didn't realize that had changed and just assumed
:8443. (Though I just tested it with a 2.3 series client and it noticed the
port :9443 that I had used when configuring lxd).

The other general questions are:
1) Can you launch an LXD image yourself (from what I can tell the lxc image
launched successfully)
2) From inside that container can you also still reach 10.19.200.1 port
8443 ?
3) Can you show "lxc profile show default"
4) Once you have the container, does 'lxc list' show it having a correct IP
address?
Networking does seem to be working, given that we were able to apt install
packages, etc. We just weren't able to get back to the controller's IP for
LXD.

5) Do you have a proxy set? (http_proxy). You might need to
"--model-default no-proxy=10.19.200.1" if you have a proxy set. (I don't
see evidence of this from your log, just something to watch out for.)
6) I'm reasonably sure 'lxc launch' is working, otherwise we wouldn't have
spun up the original container.

I really don't see anything obvious as to why the container is unable to
talk to 10.19.200.1:8443

John
=:->

On Tue, Mar 20, 2018 at 11:47 AM, Cedric Djahan <email address hidden>
wrote:

> hi John,
> thank you for your reply.
> However i'm running a normal desktop distribution of ubuntu 16.04 LTS,
> with no firewall.
>
> ```cedrico2015@cedrico2015-HP-350-G2:~$ nc -zv 10.19.200.1 8443
> Connection to 10.19.200.1 8443 port [tcp/*] succeeded! ```
>
> ```cedrico2015@cedrico2015-HP-350-G2:~$ sudo ufw status
> Status: inactive ```
>
> is there anything else i have to do?
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1756729
>
> Title:
> error while creating localhost controller
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1756729/+subscriptions
>

Revision history for this message
Cedric Djahan (cedrico2010) wrote :

hi John,
I'm not really a profi about ubuntu, but I'm trying myself.

Effectively i've seen that i'm running 2 versions of the lxd (from debian and from snap)

I ran the command: dpkg-query -l | grep lxd and i got the following output:
ii lxd 2.21-0ubuntu3~16.04.1 amd64 Container hypervisor based on LXC - daemon
ii lxd-client 2.21-0ubuntu3~16.04.1 amd64 Container hypervisor based on LXC - client

I can also see the snap version. I used the tool snapweb for that.

So i'm running the 2 versions.

I've also tried to display the running services with the command: sudo lsof -i -n -P | grep lxd
the output was:

lxd 3632 root 10u IPv6 28153 0t0 TCP *:8443 (LISTEN)
dnsmasq 16872 lxd 4u IPv4 86987 0t0 UDP *:67
dnsmasq 16872 lxd 6u IPv4 86990 0t0 UDP 10.19.200.1:53
dnsmasq 16872 lxd 7u IPv4 86991 0t0 TCP 10.19.200.1:53 (LISTEN)
dnsmasq 16872 lxd 8u IPv6 86992 0t0 UDP [fe80::d482:67ff:fe82:d747]:53
dnsmasq 16872 lxd 9u IPv6 86993 0t0 TCP [fe80::d482:67ff:fe82:d747]:53 (LISTEN)

So as far as i can see, the snapd lxd container is running but listening on the port 53 and not 8443 as expected.

What could be your suggestion to remediate to the problem.

best regards.

Revision history for this message
John A Meinel (jameinel) wrote :

lxd is listening on 8443 (the first line). It is dnsmasq that is listening
on 53, which is providing DHCP for containers. All of that is fine.
The one thing I see is that you're also seeing IPv6 addresses.
You might try running
lxd init
(being careful of snap vs deb lxd)

Which you'll then want to remove ipv6 from your lxdbr0 bridge.

On Thu, Mar 22, 2018 at 6:58 PM, Cedric Djahan <email address hidden>
wrote:

> hi John,
> I'm not really a profi about ubuntu, but I'm trying myself.
>
> Effectively i've seen that i'm running 2 versions of the lxd (from
> debian and from snap)
>
> I ran the command: dpkg-query -l | grep lxd and i got the following output:
> ii lxd 2.21-0ubuntu3~16.04.1 amd64 Container hypervisor based on LXC
> - daemon
> ii lxd-client 2.21-0ubuntu3~16.04.1 amd64 Container hypervisor
> based on LXC - client
>
> I can also see the snap version. I used the tool snapweb for that.
>
> So i'm running the 2 versions.
>
> I've also tried to display the running services with the command: sudo
> lsof -i -n -P | grep lxd
> the output was:
>
> lxd 3632 root 10u IPv6 28153 0t0 TCP *:8443
> (LISTEN)
> dnsmasq 16872 lxd 4u IPv4 86987 0t0 UDP *:67
> dnsmasq 16872 lxd 6u IPv4 86990 0t0 UDP
> 10.19.200.1:53
> dnsmasq 16872 lxd 7u IPv4 86991 0t0 TCP
> 10.19.200.1:53 (LISTEN)
> dnsmasq 16872 lxd 8u IPv6 86992 0t0 UDP
> [fe80::d482:67ff:fe82:d747]:53
> dnsmasq 16872 lxd 9u IPv6 86993 0t0 TCP
> [fe80::d482:67ff:fe82:d747]:53 (LISTEN)
>
> So as far as i can see, the snapd lxd container is running but listening
> on the port 53 and not 8443 as expected.
>
> What could be your suggestion to remediate to the problem.
>
> best regards.
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1756729
>
> Title:
> error while creating localhost controller
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1756729/+subscriptions
>

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for juju because there has been no activity for 60 days.]

Changed in juju:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.