ERROR enabling HTTPS listener: cannot listen on https socket: listen tcp [::]:8443: socket: address family not supported by protocol

Bug #1633362 reported by thyeun
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Horacio Durán
2.1
Fix Released
Critical
Horacio Durán

Bug Description

OS : ubuntu 16.04
JUJU : 2.0.0-xenial-amd64
LXC : 2.0.4

lxd and lxc working fine, i can download the images.

But when i running the syntax sudo juju bootstrap localhost,

i getting an error "ERROR enabling HTTPS listener: cannot listen on https socket: listen tcp [::]:8443: socket: address family not supported by protocol"

so how to solve this issue?

Tags: conjure-up
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Please re-run "juju bootstrap" without sudo and with "--debug --show-log" flags, i.e.
"juju bootstrap localhost --debug --show-log".

If there is still a failure, please add produced output to the bug.

Changed in juju:
status: New → Incomplete
Revision history for this message
thyeun (thyeun) wrote :

sorry for late reply, i'm really new to juju, not really know how to produced the output log file, but i using the traditional way copy and paste it as a log file

still having the same issue, you can see the output error from the attachment file.

Revision history for this message
Andrew McDermott (frobware) wrote :

Please could you attach /etc/default/lxd-bridge. It looks like you may have IPv6 enabled, hence the listening on '::[8443]'.

Revision history for this message
thyeun (thyeun) wrote :

good day, i been disable ipv6 from grub.

Revision history for this message
Andrew McDermott (frobware) wrote :

Does 'lxcbr0' exist on your machine? I see this from your attachment: LXD_BRIDGE="lxcbr0".

Please could you attach the output of:

  $ ifconfig -a
  $ ip route

Revision history for this message
Andrew McDermott (frobware) wrote :

Please could you also run:

  $ lxc launch ubuntu:xenial my-xenial-container
  # <wait-some-time>
  $ lxc list

Revision history for this message
thyeun (thyeun) wrote :

i can download the full images without any issue by using lxc (i wont repeat the downloading image again, it is wasted time with 185mb)

and i got lxcbr0 also, if without the lxcbr0, i cant finish download the images (i have mention this from the 1st post).

this problem are not related with lxc, it is juju issue, i need feedback regarding juju, lxc and lxd totally no problem.

Revision history for this message
Andrew McDermott (frobware) wrote :

It would really help to have the output from comments #5 and #6.

You mentioned that you had disabled IPv6 in grub - what specifically did you do?

Revision history for this message
thyeun (thyeun) wrote :

i not only kill it from grub
sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"

i also kill it from sysctl
sudo nano /etc/sysctl.conf

Add below line into the conf file.
# IPv6 disabled
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

sudo sysctl -p

thyeun (thyeun)
Changed in juju:
status: Incomplete → Confirmed
Changed in juju:
status: Confirmed → Triaged
importance: Undecided → Medium
milestone: none → 2.1.0
tags: added: conjure-up
Changed in juju:
importance: Medium → Critical
Revision history for this message
Adam Stokes (adam-stokes) wrote :

Here is another system with configuration for a disabled ipv6:

```
$ cat /etc/default/lxd-bridge
# WARNING: This file is generated by a debconf template!
# It is recommended to update it by using "dpkg-reconfigure -p medium lxd"

# Whether to setup a new bridge or use an existing one
USE_LXD_BRIDGE="true"

# Bridge name
# This is still used even if USE_LXD_BRIDGE is set to false
# set to an empty value to fully disable
LXD_BRIDGE="lxdbr0"

# Update the "default" LXD profile
UPDATE_PROFILE="true"

# Path to an extra dnsmasq configuration file
LXD_CONFILE=""

# DNS domain for the bridge
LXD_DOMAIN="lxd"

# IPv4
## IPv4 address (e.g. 10.0.8.1)
LXD_IPV4_ADDR="10.155.123.1"

## IPv4 netmask (e.g. 255.255.255.0)
LXD_IPV4_NETMASK="255.255.255.0"

## IPv4 network (e.g. 10.0.8.0/24)
LXD_IPV4_NETWORK="10.155.123.1/24"

## IPv4 DHCP range (e.g. 10.0.8.2,10.0.8.254)
LXD_IPV4_DHCP_RANGE="10.155.123.2,10.155.123.254"

## IPv4 DHCP number of hosts (e.g. 250)
LXD_IPV4_DHCP_MAX="252"

## NAT IPv4 traffic
LXD_IPV4_NAT="true"

# IPv6
## IPv6 address (e.g. 2001:470:b368:4242::1)
LXD_IPV6_ADDR=""

## IPv6 CIDR mask (e.g. 64)
LXD_IPV6_MASK=""

## IPv6 network (e.g. 2001:470:b368:4242::/64)
LXD_IPV6_NETWORK=""

## NAT IPv6 traffic
LXD_IPV6_NAT="false"

# Run a minimal HTTP PROXY server
LXD_IPV6_PROXY="false"
```

Also with ipv6 disabled via grub

```
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
```

Changed in juju:
assignee: nobody → Horacio Durán (hduran-8)
Changed in juju:
milestone: 2.1.0 → 2.1-rc1
Revision history for this message
Adam Stokes (adam-stokes) wrote :

This was easily reproducible by adding the `ipv6.disable=1` to the kernel parameters.

Revision history for this message
Adam Stokes (adam-stokes) wrote :

Simplified reproducer steps:

Boot a system with kernel parameters `ipv6.disable=1`
$ sudo snap install conjure-up --classic --edge
$ sudo lxd init
[go through prompts enabling ipv4 and selecting NO for ipv6 nat]
$ juju bootstrap

Watch the error show up

Revision history for this message
thyeun (thyeun) wrote :

more than three months, any solution?

Revision history for this message
Horacio Durán (hduran-8) wrote :

I am actively working on this right now, sorry for the delay.

Revision history for this message
Horacio Durán (hduran-8) wrote :

After some interesting digging and consulting I figured out that the problem comes, not from IPV6 being disabled but on how.

When IPV6 is not in the kernel (such is the case of the grub option that prevents its module loading) certain things like the address family (which would resolve :: to localhost are not supported (for lo interface for instance) so we get this failure.

I reported a LXD issue too since this affects them too.

Ill implement a fallback that tries 0.0.0.0 if this error is found.

Revision history for this message
Horacio Durán (hduran-8) wrote :
Revision history for this message
Adam Stokes (adam-stokes) wrote :
Download full text (5.5 KiB)

I tested this binary and all seems to work now:

kernel param
ubuntu@bobbybooshay:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.4.0-62-generic root=UUID=3755a423-99c8-4fdd-b5a4-63948f25b8d2 ro net.ifnames=0 ipv6.disable=1

lxd bridge
ubuntu@bobbybooshay:~$ cat /etc/default/lxd-bridge
# WARNING: This file is generated by a debconf template!
# It is recommended to update it by using "dpkg-reconfigure -p medium lxd"

# Whether to setup a new bridge or use an existing one
USE_LXD_BRIDGE="true"

# Bridge name
# This is still used even if USE_LXD_BRIDGE is set to false
# set to an empty value to fully disable
LXD_BRIDGE="lxdbr0"

# Update the "default" LXD profile
UPDATE_PROFILE="true"

# Path to an extra dnsmasq configuration file
LXD_CONFILE=""

# DNS domain for the bridge
LXD_DOMAIN="lxd"

# IPv4
## IPv4 address (e.g. 10.0.8.1)
LXD_IPV4_ADDR="10.138.179.1"

## IPv4 netmask (e.g. 255.255.255.0)
LXD_IPV4_NETMASK="255.255.255.0"

## IPv4 network (e.g. 10.0.8.0/24)
LXD_IPV4_NETWORK="10.138.179.1/24"

## IPv4 DHCP range (e.g. 10.0.8.2,10.0.8.254)
LXD_IPV4_DHCP_RANGE="10.138.179.2,10.138.179.254"

## IPv4 DHCP number of hosts (e.g. 250)
LXD_IPV4_DHCP_MAX="252"

## NAT IPv4 traffic
LXD_IPV4_NAT="true"

# IPv6
## IPv6 address (e.g. 2001:470:b368:4242::1)
LXD_IPV6_ADDR=""

## IPv6 CIDR mask (e.g. 64)
LXD_IPV6_MASK=""

## IPv6 network (e.g. 2001:470:b368:4242::/64)
LXD_IPV6_NETWORK=""

## NAT IPv6 traffic
LXD_IPV6_NAT="false"

# Run a minimal HTTP PROXY server
LXD_IPV6_PROXY="false"

juju bootstrap working
19:25:29 INFO juju.cmd supercommand.go:63 running juju [2.2-alpha1 gc go1.7.2]
19:25:29 DEBUG juju.cmd supercommand.go:64 args: []string{"./juju", "bootstrap", "lxd/localhost", "--debug"}
19:25:29 DEBUG juju.tools.lxdclient client.go:203 connecting to LXD remote "local": "unix:///var/lib/lxd/unix.socket"
19:25:29 INFO juju.tools.lxdclient client.go:251 using LXD API version "1.0"
19:25:29 INFO juju.tools.lxdclient client.go:305 LXD "default" profile uses network bridge "lxdbr0"
19:25:29 INFO cmd cmd.go:141 Resolved LXD host address on bridge lxdbr0: 10.138.179.1
19:25:29 INFO cmd cmd.go:141 no credentials found, checking environment
19:25:31 DEBUG juju.tools.lxdclient client.go:203 connecting to LXD remote "local": "unix:///var/lib/lxd/unix.socket"
19:25:31 INFO juju.tools.lxdclient client.go:251 using LXD API version "1.0"
19:25:31 INFO juju.tools.lxdclient client.go:305 LXD "default" profile uses network bridge "lxdbr0"
19:25:31 DEBUG juju.cmd.juju.commands bootstrap.go:783 authenticating with region "localhost" and credential "default" ()
19:25:31 DEBUG juju.cmd.juju.commands bootstrap.go:895 provider attrs: map[]
19:25:31 INFO cmd cmd.go:141 Adding contents of "/home/ubuntu/.local/share/juju/ssh/juju_id_rsa.pub" to authorized-keys
19:25:31 DEBUG juju.cmd.juju.commands bootstrap.go:951 preparing controller with config: map[transmit-vendor-metrics:true apt-mirror: agent-stream:released http-proxy: proxy-ssh:false provisioner-harvest-mode:destroyed test-mode:false logging-config: apt-https-proxy: apt-ftp-proxy: ftp-proxy: apt-http-proxy: enable-os-refresh-update:true image-stream:released logforward-enabled:false automatically-retry-hooks...

Read more...

Revision history for this message
thyeun (thyeun) wrote :

so when will it be release the upgrade to solve this issue?

Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against develop (2.2): https://github.com/juju/juju/pull/6916

Changed in juju:
status: Triaged → In Progress
milestone: 2.1-rc1 → 2.2.0-alpha1
importance: Critical → High
Revision history for this message
Anastasia (anastasia-macmood) wrote :

@thyeun,
At this stage, the fix is on track to go into the next 2.1 release - 2.1-rc1.

Changed in juju:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
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.