canonical / anbox-cloud.io

Anbox cloud demo site
https://anbox-cloud.io/
GNU General Public License v3.0
24 stars 31 forks source link

Cannot install Anbox Cloud: `ERROR: AMC client certificate is missing` #324

Closed tunahanertekin closed 10 months ago

tunahanertekin commented 10 months ago

Hey there!


This thread solved my issue. It's necessary to use ubuntu user instead of root.


I'm trying to spin up Anbox Cloud for Android development and I'm encountering the same error while installing Anbox Cloud Appliance. I would be appreciated if I can get any kind of help. Here are the methods I've tried:

Here is the screenshot of console and terminal logs (/var/snap/anbox-cloud-appliance/common/logs/bootstrap.log) when I execute the command sudo anbox-cloud-appliance init in both methods (after 5-10 minutes):

ps. I used default values for the questions the script asked except I preferred to use IPs and node ports instead of DNS name. Then I tried to use DNS name but it ended the same way.

anbox-error ps. I removed the external IP and DNS name from logs.

2024-01-09 08:08:01 LXD network name set to lxdfan0
Only clouds with registered credentials are shown.
There are more clouds, use --all to see them.
2024-01-09 08:08:02 Public location: <EXTERNAL-DNS-NAME>
2024-01-09 08:08:02 Public address: <EXTERNAL-IP>
2024-01-09 08:08:02 Private address: 172.31.84.2
2024-01-09 08:08:02 Private subnet: 172.31.0.0/16
2024-01-09 08:08:02 Using UA subscription from host
2024-01-09 08:08:02 Successfully extracted credentials from UA subscription
2024-01-09 08:08:02 Starting installation of dependencies

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

Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Hit:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1268 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1259 kB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:7 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease [7553 B]
Get:8 https://archive.anbox-cloud.io/stable jammy InRelease [2489 B]
Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [205 kB]
Get:10 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease [7456 B]
Get:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1021 kB]
Get:12 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [227 kB]
Get:13 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [42.1 kB]
Get:14 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [10.1 kB]
Get:15 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease [7450 B]
Get:16 https://archive.anbox-cloud.io/stable jammy/main amd64 Packages [7287 B]
Get:17 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease [7449 B]
Get:18 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1058 kB]
Get:19 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [200 kB]
Get:20 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1237 kB]
Get:21 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [202 kB]
Get:22 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [824 kB]
Get:23 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [37.1 kB]
Get:24 http://security.ubuntu.com/ubuntu jammy-security/multiverse Translation-en [7476 B]
Fetched 7868 kB in 2s (4448 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
40 packages can be upgraded. Run 'apt list --upgradable' to see them.

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-6.2.0-1017-aws is already the newest version (6.2.0-1017.17~22.04.1).
linux-headers-6.2.0-1017-aws set to manually installed.
linux-headers-aws is already the newest version (6.2.0.1017.17~22.04.1).
linux-modules-extra-6.2.0-1017-aws is already the newest version (6.2.0-1017.17~22.04.1).
linux-modules-extra-6.2.0-1017-aws set to manually installed.
linux-modules-extra-aws is already the newest version (6.2.0.1017.17~22.04.1).
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 40 not upgraded.
Need to get 289 kB of archives.
After this operation, 783 kB of additional disk space will be used.
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 libcpufreq0 amd64 008-2build1 [12.3 kB]
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 cpufrequtils amd64 008-2build1 [34.5 kB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 tcl-expect amd64 5.45.4-2build1 [105 kB]
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 expect amd64 5.45.4-2build1 [137 kB]
Preconfiguring packages ...
Fetched 289 kB in 0s (8351 kB/s)
Selecting previously unselected package libcpufreq0.
(Reading database ... 111297 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.5) ...
NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 6.2.0-1017-aws
NEEDRESTART-KEXP: 6.2.0-1017-aws
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
2024-01-09 08:11:14 LXD is ready, continuing with its initialization
2024-01-09 08:11:14 Using the following preseed configuration:
config:
  cluster.https_address: 172.31.84.2:8443
  core.https_address: 172.31.84.2: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: 172.31.0.0/16
    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.
2024-01-09 08:11:22 Configuring Juju for our LXD cloud
...............+.....+......+.........+.+...+..+.+.........+.....+.+.....+............+...+....+.....+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.........+..........+.........+.....+....+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+...+...+...+.+.....+.............+...........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...+..+....+...............+........+...+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+....+..+.........+.......+...+.....+.........+.......+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+....+..+............+...+.......+..+..........+...........+............+................+......+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
2024-01-09 08:11:23 Using following Juju cloud configuration:
clouds:
  appliance:
    type: lxd
    auth-types: [certificate]
    endpoint: https://172.31.84.2: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".

2024-01-09 08:11:23 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...
 - juju-e13a16-0 (arch=amd64)                   
Installing Juju agent on bootstrap instance
Juju Dashboard installation has been disabled
Waiting for address
Attempting to connect to 240.84.2.127:22
Connected to 240.84.2.127
Running machine configuration script...
Bootstrap agent now started
Contacting Juju controller at 240.84.2.127 to verify accessibility...

Bootstrap complete, controller "appliance" is now available
Controller machines are in the "controller" model
Initial model "default" added
2024-01-09 08:13:17 Finished Juju controller bootstrap
Added 'anbox-cloud' model on appliance/default with credential 'admin' for user 'admin'
2024-01-09 08:13:19 Starting to deploy bundle
Located charm "ams" in charm-hub, channel 1.20/stable
Located charm "anbox-cloud-dashboard" in charm-hub, channel 1.20/stable
Located charm "anbox-stream-agent" in charm-hub, channel 1.20/stable
Located charm "anbox-stream-gateway" in charm-hub, channel 1.20/stable
Located charm "coturn" in charm-hub, channel 1.20/stable
Located charm "etcd" in charm-hub, channel stable
Located charm "easyrsa" in charm-hub, channel stable
Located charm "easyrsa" in charm-hub, channel stable
Located charm "lxd-integrator" in charm-hub, channel stable
Located charm "nats-charmers-nats" in charm-hub, channel stable
Executing changes:
- upload charm ams from charm-hub for series jammy from channel 1.20/stable with architecture=amd64
- deploy application ams from charm-hub on jammy with 1.20/stable
- upload charm anbox-cloud-dashboard from charm-hub for series jammy from channel 1.20/stable with architecture=amd64
- deploy application anbox-cloud-dashboard from charm-hub on jammy with 1.20/stable
  added resource anbox-cloud-dashboard
- upload charm anbox-stream-agent from charm-hub for series jammy from channel 1.20/stable with architecture=amd64
- deploy application anbox-stream-agent from charm-hub on jammy with 1.20/stable
- upload charm anbox-stream-gateway from charm-hub for series jammy from channel 1.20/stable with architecture=amd64
- deploy application anbox-stream-gateway from charm-hub on jammy with 1.20/stable
- upload charm coturn from charm-hub for series jammy from channel 1.20/stable with architecture=amd64
- deploy application coturn from charm-hub on jammy with 1.20/stable
- expose all endpoints of coturn and allow access from CIDRs 0.0.0.0/0 and ::/0
- upload charm etcd from charm-hub for series jammy with revision 742 with architecture=amd64
- deploy application etcd from charm-hub on jammy with stable
  added resource core
  added resource etcd
  added resource snapshot
- upload charm easyrsa from charm-hub for series jammy with revision 39 with architecture=amd64
- deploy application etcd-ca from charm-hub on jammy with stable using easyrsa
  added resource easyrsa
- deploy application internal-ca from charm-hub on jammy with stable using easyrsa
  added resource easyrsa
- upload charm lxd-integrator from charm-hub for series jammy with revision 4 with architecture=amd64
- deploy application lxd-integrator from charm-hub on jammy with stable
- upload charm nats-charmers-nats from charm-hub for series jammy with revision 11 with architecture=amd64
- deploy application nats from charm-hub on jammy with stable using nats-charmers-nats
  added resource core
  added resource nats
- add new machine 0
- add new machine 1
- add relation etcd:certificates - etcd-ca:client
- add relation ams:etcd - etcd:db
- add relation ams - lxd-integrator
- add relation ams:rest-api - anbox-stream-agent:ams
- add relation nats:client - anbox-stream-agent:nats
- add relation nats:ca-client - internal-ca:client
- add relation anbox-stream-gateway:nats - nats:client
- add relation coturn:stun - anbox-stream-agent:stun
- add relation anbox-stream-gateway:certificates - internal-ca:client
- add relation anbox-cloud-dashboard:gateway - anbox-stream-gateway:client
- add relation anbox-cloud-dashboard:certificates - internal-ca:client
- add relation anbox-cloud-dashboard:ams - ams:rest-api
- add relation anbox-stream-agent:certificates - internal-ca:client
- add unit ams/0 to new machine 1
- add unit anbox-cloud-dashboard/0 to new machine 1
- add unit anbox-stream-agent/0 to new machine 1
- add unit anbox-stream-gateway/0 to new machine 1
- add unit coturn/0 to new machine 1
- add unit etcd/0 to new machine 1
- add unit etcd-ca/0 to new machine 0
- add unit internal-ca/0 to new machine 0
- add unit lxd-integrator/0 to new machine 0
- add unit nats/0 to new machine 1
Deploy of bundle completed.
2024-01-09 08:21:58 Deployment settled
2024-01-09 08:21:58 Applying configuration for various components
nodes:
  - lxd0
Restarted.
Device eth0 overridden for juju-6f9a66-1
Device stun added to juju-6f9a66-1
Device turn added to juju-6f9a66-1
2024-01-09 08:22:14 Updating routes and exposing services
I0109 08:22:15.930712  137451 update_routes.go:123] No address found for grafana
2024-01-09 08:22:15 Configuring image server credentials in AMS
2024-01-09 08:22:16 Added new remote to hosts amc command
+-------+---------+---------+
| NAME  |   URL   | DEFAULT |
+-------+---------+---------+
| local | unix:// | true    |
+-------+---------+---------+
ERROR: AMC client certificate is missing
morphis commented 10 months ago

Hey @tunahanertekin !

Thanks for your report. Can you file this as a bug on https://bugs.launchpad.net/anbox-cloud as this repository really only exists to track bugs on the website, not anything else. Happy to help and assist getting your problem solved over there.

Thanks!