Skip to content

Running containerd-rootless-setuptool.sh install fails on Amazon Linux 2 #888

Description

@realvz

I am trying to install nerdctl on Amazon Linux 2 using the full release archive. When I run containerd-rootless-setuptool.sh install, I receive the following error message:
[ERROR] Needs systemd (systemctl --user)

Here are the steps to reproduce the issue. Create an Amazon Linux 2 EC2 instance. SSH into it and run:

wget https://github.com/containerd/nerdctl/releases/download/v0.17.1/nerdctl-full-0.17.1-linux-amd64.tar.gz
sudo tar xvzf nerdctl-full-0.17.1-linux-amd64.tar.gz -C /usr/local

After this, running nerdctl throws this error:

FATA[0000] rootless containerd not running? (hint: use `containerd-rootless-setuptool.sh install` to start rootless containerd): stat /run/user/1001/containerd-rootless: no such file or directory

Then, running containerd-rootless-setuptool.sh install produces this error message:
[ERROR] Needs systemd (systemctl --user)

System information

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
uname -a
Linux ip-172-31-31-128.us-west-2.compute.internal 4.14.268-205.500.amzn2.x86_64 #1 SMP Wed Mar 2 18:38:38 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Its evident that the error has something to do with systemd

systemctl --user show-environment
Failed to get D-Bus connection: No such file or directory

Dbus (at least, the systemwide) service seems to be running

systemctl status dbus.service
● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/usr/lib/systemd/system/dbus.service; static; vendor preset: disabled)
   Active: active (running) since Wed 2022-03-09 00:03:24 UTC; 1 day 21h ago
     Docs: man:dbus-daemon(1)
 Main PID: 2628 (dbus-daemon)
   CGroup: /system.slice/dbus.service
           └─2628 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

Mar 09 00:03:24 ip-172-31-31-128.us-west-2.compute.internal systemd[1]: Started D-Bus System Message Bus.
echo $XDG_RUNTIME_DIR
/run/user/1000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions