Error anbox-cloud init

Bug #2043927 reported by Eduardo Henrique de Oliveira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Anbox Cloud
Incomplete
High
Unassigned

Bug Description

Hi All,

I'm trying installing anbox-cloud in a OCI instance following this guide https://discourse.ubuntu.com/t/install-the-anbox-cloud-appliance-on-a-dedicated-machine/22681 and getting an error. Can someone help?

root@instance-emu:/home/ubuntu# cat /var/snap/anbox-cloud-appliance/common/logs/bootstrap.log
2023-11-19 13:35:06 LXD network name set to lxdfan0
Since Juju 2 is being run for the first time, it has downloaded the latest public cloud information.
Only clouds with registered credentials are shown.
There are more clouds, use --all to see them.
2023-11-19 13:35:14 Public location: 144.22.143.188
2023-11-19 13:35:14 Public address: 144.22.143.188
2023-11-19 13:35:14 Private address: 10.0.0.241
2023-11-19 13:35:14 Private subnet: 10.0.0.0/24
2023-11-19 13:35:14 Running on OCI, applying firewall rules
iptables v1.8.7 (nf_tables): chain `anbox-ingress' in table `filter' is incompatible, use 'nft' tool.

iptables v1.8.7 (nf_tables): chain `anbox-forward' in table `filter' is incompatible, use 'nft' tool.

run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables save
run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables save
2023-11-19 13:35:14 Using UA subscription from host
2023-11-19 13:35:14 Successfully extracted credentials from UA subscription
2023-11-19 13:35:15 Starting installation of dependencies

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Hit:1 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:3 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Hit:4 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease
Hit:5 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease
Hit:6 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:7 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease
Get:8 https://archive.anbox-cloud.io/stable jammy InRelease [2489 B]
Hit:9 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease
Get:10 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1162 kB]
Get:11 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [998 kB]
Fetched 2392 kB in 7s (327 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
All packages are up to date.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
linux-headers-5.15.0-1047-oracle is already the newest version (5.15.0-1047.53).
linux-headers-5.15.0-1047-oracle set to manually installed.
linux-headers-oracle is already the newest version (5.15.0.1047.42).
linux-modules-extra-5.15.0-1047-oracle is already the newest version (5.15.0-1047.53).
linux-modules-extra-5.15.0-1047-oracle set to manually installed.
The following additional packages will be installed:
  libcpufreq0 tcl-expect
Suggested packages:
  tk8.6
The following NEW packages will be installed:
  cpufrequtils expect libcpufreq0 tcl-expect
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 289 kB of archives.
After this operation, 783 kB of additional disk space will be used.
Get:1 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy/universe amd64 libcpufreq0 amd64 008-2build1 [12.3 kB]
Get:2 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy/universe amd64 cpufrequtils amd64 008-2build1 [34.5 kB]
Get:3 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy/universe amd64 tcl-expect amd64 5.45.4-2build1 [105 kB]
Get:4 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy/universe amd64 expect amd64 5.45.4-2build1 [137 kB]
Preconfiguring packages ...
Fetched 289 kB in 1s (211 kB/s)
Selecting previously unselected package libcpufreq0.
(Reading database ... 106260 files and directories currently installed.)
Preparing to unpack .../libcpufreq0_008-2build1_amd64.deb ...
Unpacking libcpufreq0 (008-2build1) ...
Selecting previously unselected package cpufrequtils.
Preparing to unpack .../cpufrequtils_008-2build1_amd64.deb ...
Unpacking cpufrequtils (008-2build1) ...
Selecting previously unselected package tcl-expect:amd64.
Preparing to unpack .../tcl-expect_5.45.4-2build1_amd64.deb ...
Unpacking tcl-expect:amd64 (5.45.4-2build1) ...
Selecting previously unselected package expect.
Preparing to unpack .../expect_5.45.4-2build1_amd64.deb ...
Unpacking expect (5.45.4-2build1) ...
Setting up tcl-expect:amd64 (5.45.4-2build1) ...
Setting up libcpufreq0 (008-2build1) ...
Setting up expect (5.45.4-2build1) ...
Setting up cpufrequtils (008-2build1) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 5.15.0-1047-oracle
NEEDRESTART-KEXP: 5.15.0-1047-oracle
NEEDRESTART-KSTA: 1
Packages installation done in parallel
fs.inotify.max_queued_events = 1048576
fs.inotify.max_user_instances = 1048576
fs.inotify.max_user_watches = 1048576
vm.max_map_count = 262144
kernel.dmesg_restrict = 1
kernel.pid_max = 4194304
net.ipv4.neigh.default.gc_thresh3 = 8192
net.ipv6.neigh.default.gc_thresh3 = 8192
kernel.keys.maxkeys = 2000
kernel.keys.maxbytes = 2000000
fs.aio-max-nr = 524288
net.ipv4.ping_group_range = 0 2147483647
2023-11-19 13:38:16 LXD is ready, continuing with its initialization
2023-11-19 13:38:16 Using the following preseed configuration:
config:
  cluster.https_address: 10.0.0.241:8443
  core.https_address: 10.0.0.241:8443
cluster:
  enabled: true
  server_name: lxd0
networks:
- name: lxdfan0
  type: bridge
  config:
    ipv4.nat: true
    ipv4.dhcp.expiry: infinite
    fan.overlay_subnet: 240.0.0.0/8
    fan.underlay_subnet: 10.0.0.0/24
    bridge.mode: fan
profiles:
- name: default
  devices:
    root:
      path: /
      pool: data
      type: disk
    eth0:
      type: nic
      nictype: bridged
      parent: lxdfan0
storage_pools:
- name: data
  driver: zfs
  config:
    size: 32212254720
Storage volume backups created
Storage volume images created
Restarted.
2023-11-19 13:38:44 Configuring Juju for our LXD cloud
......+.....+.+...+..+................+........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*......+............+..........+...+.....+.......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.............+...+.....+....+........+......................+...+...+.....+.+...+...+........+.......+..+.........................+........+...+.......+...+..............+.+..+...+..........+...........+...+.......+.....+......+..........+..+...+....+......+...+.....+................+...+.....+...............+.+...........+.+.........+.....+...+............+.+.....+..................+....+............+..................+...+...+..+....+.....+..........+.....+....+..+...............+.........+.........+......+..........+........+...+.......+...+...+.........+............+...............+..............+.......+........+......+......+.......+........+....+...+...+...+..+..........+.........+.........+..+...............+.............+.....+............+.......+........+.......+...+........+......................+...+.....+.+.............................+....+...+.........+........+......+.......+............+...+........+.........+.......+...+..+...+...+.........+......+...+..........+......+...+...........+.+...........+...+....+..+...+......+................+......+..+...+....+....................+...+..................+...+..........+..+.......+.....+...............+......+.+.....+.+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
..+...+..+...+....+..+......+.........+....+......+........+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.......+......+......+.......+......+......+...+............+...+...+.....+.........+..........+..............+....+..+.+..+......+....+..+....+..+..........+..+...+.........+...+.+.........+......+..+.........................+..+.+......+...........+.......+......+...........+.+.........+........+...+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.....................+.......+.....+.+...........+....+.................+..........+...+......+........+.......+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
2023-11-19 13:38:51 Using following Juju cloud configuration:
clouds:
  appliance:
    type: lxd
    auth-types: [certificate]
    endpoint: https://10.0.0.241:8443
    config:
      ssl-hostname-verification: false
Cloud "appliance" successfully added to your local client.
You will need to add a credential for this cloud (`juju add-credential appliance`)
before you can use it to bootstrap a controller (`juju bootstrap appliance`) or
to create a model (`juju add-model <your model name> appliance`).
Credential "admin" added locally for cloud "appliance".

2023-11-19 13:38:58 Successfully configured Juju
Creating Juju controller "appliance" on appliance/default
Looking for packaged Juju agent version 2.9.42 for amd64
Located Juju agent version 2.9.42-ubuntu-amd64 at https://streams.canonical.com/juju/tools/agent/2.9.42/juju-2.9.42-linux-amd64.tgz
To configure your system to better support LXD containers, please see: https://linuxcontainers.org/lxd/docs/master/explanation/performance_tuning/
Launching controller instance(s) on appliance/default...
ERROR failed to bootstrap model: cannot start bootstrap instance in availability zone "lxd0": write tcp 10.0.0.241:52076->10.0.0.241:8443: i/o timeout

ty

Revision history for this message
Simon Fels (morphis) wrote :

Hey Eduardo,

the actual problem seems to be

2023-11-19 13:35:14 Running on OCI, applying firewall rules
iptables v1.8.7 (nf_tables): chain `anbox-ingress' in table `filter' is incompatible, use 'nft' tool.
iptables v1.8.7 (nf_tables): chain `anbox-forward' in table `filter' is incompatible, use 'nft' tool.

We have to apply additional firewall rules as OCI is a bit special in its instance firewalling. As the commands fails we subsequent Juju bootstrap will fail as well as external access on 10.0.0.241:8443 (LXD) is denied.

I will try and reproduce this and come up with a workaround and fix for the next patch release.

Changed in anbox-cloud:
assignee: nobody → Simon Fels (morphis)
status: New → Triaged
importance: Undecided → High
milestone: none → 1.20.1
Revision history for this message
Simon Fels (morphis) wrote :

I tried to reproduce this but on an OCI instance with instance security groups set up (see https://anbox-cloud.io/docs/ref/network-ports#appliance) and latest Ubuntu 22.04 images things went through smoothly.

Can you provide us a few more details:

* Can it be that you tried the initialization multiple times on the same machine?
* Have you configured a security group for the instance allowing all ports as documented on https://anbox-cloud.io/docs/ref/network-ports#appliance?

Next to the answers, can you also share the output of

$ sudo anbox-cloud-appliance.buginfo

Feel free to strip any information from it you don't want to share or share separately.

Changed in anbox-cloud:
status: Triaged → Incomplete
Revision history for this message
Eduardo Henrique de Oliveira (adviou) wrote :
Download full text (29.1 KiB)

Hi Simon,

I create a fresh instance and allowed ports documented on https://anbox-cloud.io/docs/ref/network-ports#appliance as attachment.

ubuntu@instance-emu:~$ sudo anbox-cloud-appliance.buginfo
cat: /var/snap/anbox-cloud-appliance/common/logs/upgrade.log: No such file or directory
# Appliance Status

status: error
error: Failed to bootstrap Juju controller
update-available: false
reboot-needed: false
version: 1.20.0

# Appliance Status Flags

total 24K
drwxr-xr-x 5 root root 4.0K Nov 20 13:24 .
drwxr-xr-x 4 root root 4.0K Nov 20 13:12 ..
-rw-r--r-- 1 root root 0 Nov 20 13:24 .bootstrap_failed
-rw------- 1 root root 59 Nov 20 13:16 appliance.conf
drwxr-xr-x 2 root root 4.0K Nov 20 13:16 logs
drwxr-xr-x 2 root root 4.0K Nov 20 13:12 service
drwxr-xr-x 4 root root 4.0K Nov 20 13:12 traefik

# Appliance Bootstrap Log

2023-11-20 13:16:28 LXD network name set to lxdfan0
Since Juju 2 is being run for the first time, it has downloaded the latest public cloud information.
Only clouds with registered credentials are shown.
There are more clouds, use --all to see them.
2023-11-20 13:16:36 Public location: X.X.X.X
2023-11-20 13:16:36 Public address: X.X.X.X
2023-11-20 13:16:36 Private address: 10.0.0.33
2023-11-20 13:16:36 Private subnet: 10.0.0.0/24
2023-11-20 13:16:36 Running on OCI, applying firewall rules
iptables v1.8.7 (nf_tables): chain `anbox-ingress' in table `filter' is incompatible, use 'nft' tool.

iptables v1.8.7 (nf_tables): chain `anbox-forward' in table `filter' is incompatible, use 'nft' tool.

run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables save
run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables save
2023-11-20 13:16:36 Using UA subscription from host
2023-11-20 13:16:36 Successfully extracted credentials from UA subscription
2023-11-20 13:16:36 Starting installation of dependencies

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Hit:1 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://sa-saopaulo-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:5 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease
Get:6 https://archive.anbox-cloud.io/stable jammy InRelease [2489 B]
Hit:7 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease
Hit:8 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease
Hit:9 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease
Fetched 2489 B in 6s (451 B/s)
Reading package lists...
Building dependency tree...
Reading state information...
All packages are up to date.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/anbox-cloud.list:1 and /etc/apt/sources.list.d/ubuntu-anbox-cloud.list:1
W: Target Translations (main/i18n/Translation-en) is config...

Revision history for this message
Simon Fels (morphis) wrote :

So something is still blocking network traffic to LXD on port 8443:

ERROR failed to bootstrap model: cannot start bootstrap instance in availability zone "lxd0": write tcp 10.0.0.33:41174->10.0.0.33:8443: i/o timeout

Can you give us the output of

$ sudo iptables -S
$ sudo iptables -S -t nat

Thanks!

Simon Fels (morphis)
Changed in anbox-cloud:
assignee: Simon Fels (morphis) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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