Ubuntu 22.04 LTS

Hi,

I tried to install Rancher as standalone docker but it is not starting. It seems 2.6.5 is not support on Ubuntu 22.04 LTS. I can run this on RHEL 7.9 though.

OS: Ubuntu 22.04 LTS

Rancher Docker: rancher/rancher:latest

Command: docker run -d --restart=unless-stopped --privileged -p 8080:80 -p 8443:443 -v /usr/local/share/ca_certs.crt:/etc/pki/trust/anchors/tls-ca-bundle.pem -e CATTLE_SYSTEM_DEFAULT_REGISTRY=test -e CATTLE_SYSTEM_CATALOG=bundled test/rancher/rancher:latest

2022/05/26 08:26:12 [INFO] Waiting for server to become available: Get “https://127.0.0.1:6444/version?timeout=15m0s”: dial tcp 127.0.0.1:6444: connect: connection refused

I just tested and it’s not working either…
Here is the system:

cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

This is how I created the container:

docker run -d --restart=unless-stopped \
  -p 80:80 -p 443:443 \
  -v /opt/rancher:/var/lib/rancher \
  --privileged \
--name=rancher_docker_server \
rancher/rancher:latest

After spinning up the docker container, the following logs were generated:

docker logs --tail 10 -f  876fe1abae97
2022/05/26 22:11:43 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/26 22:11:45 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/26 22:11:47 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/26 22:11:49 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/26 22:11:51 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/26 22:11:53 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/26 22:11:55 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/26 22:11:57 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/26 22:12:01 [FATAL] k3s exited with: exit status 1

I think the issue is not related to the OS. The issue is the latest docker installation.
I just tried it on the Rocky Linux and I am getting the same error:

cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.6 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.6 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

Logs:

docker logs --tail 10 -f 3a915f10fcd1
2022/05/28 20:27:18 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:27:20 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:27:22 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:27:24 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:27:26 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:27:28 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:27:30 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:27:32 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:27:41 [FATAL] k3s exited with: exit status 2
INFO: Running k3s server --cluster-init --cluster-reset
2022/05/28 20:28:07 [INFO] Rancher version v2.6.5 (c4d59fa88) is starting
2022/05/28 20:28:07 [INFO] Rancher arguments {ACMEDomains:[] AddLocal:true Embedded:false BindHost: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false Trace:false NoCACerts:false AuditLogPath:/var/log/auditlog/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLevel:0 Features: ClusterRegistry:}
2022/05/28 20:28:07 [INFO] Listening on /tmp/log.sock
2022/05/28 20:28:07 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:28:09 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:28:11 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:28:13 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:28:15 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:28:17 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:28:19 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:28:21 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2022/05/28 20:28:31 [FATAL] k3s exited with: exit status 2

Hi,

Sorry for the confusion, its also not working on RHEL 7.9 as am getting below errors on RHEL 7.9

cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 (Maipo)

But getting the below error when it installs helm charts

Waiting for API to be available

I am very surprised, there is no information about the bugs or issues or support who can verify this and have any ETA to fix this. I am sure we are not only few people who are trying to install on Ubuntu 22.04 LTS and RHEL 7.9, there will be many more.

Can you double check your code?

Sorry, I didn’t get it. I am just creating docker from the latest image rancher/rancher:latest

What docker version are you running? I know that in CentOS 7 the Docker in the EPEL repo is too old for a lot of things and you’re often recommended to upgrade to Docker CE 19 or 20.

It is 1.13 but am not fussy about RHEL/Centos as we are migrating to Ubuntu 22.04 LTS but rancher/rancher:latest doesnt work either on Ubuntu 22.04 LTS which is running docker 20

I don’t see Ubuntu 22.04 on the latest support matrix (20.04 is there), but have you tried running a “real” instance…meaning install RKE or k3s then using a helm install vs the test docker (unsupported) method? The errors seem to point to something blocking that port or otherwise preventing access to :6444.

Docker 1.13 definitely has problems, but I’ve seen Rancher work on CentOS 7 with Docker CE 19 several months ago. If you still have your CentOS 7 I’d try updating Docker (I had docker-ce & docker-ce-cli in my yum install command, but I had also needed to grab containerd.io from the Docker yum repo to my local repo as a dependency, it pulled the rest from main repos or EPEL).

Hi,

Yes, I installed k3s on Ubuntu 22.04 and all working but when I installed rancher image, it is being failed and getting below error

2022/06/03 09:22:21 [INFO] Waiting for server to become available: Get “https://127.0.0.1:6444/version?timeout=15m0s”: dial tcp 127.0.0.1:6444: connect: connection refused

How did you attempt to install rancher? I’m not sure what you mean by “rancher image”. This should be a resolvable name vs localhost so if you are using helm or the helm operator, share your values used.

Here is the command I ran

docker run -d --restart=unless-stopped --privileged -p 8080:80 -p 8443:443 rancher/rancher:latest

Below is the k3s.log within the rancher docker

77 kubelet.go:2040] "Skipping pod synchronization" err="[container runtime status check may not have completed yet, PLEG is not healthy: pleg has yet to be successful]"
E0603 23:16:46.873365      77 node_container_manager_linux.go:61] "Failed to create cgroup" err="cannot enter cgroupv2 \"/sys/fs/cgroup/kubepods\" with domain controllers -- it is in an invalid state" cgroupName=[kubepods]
W0603 23:16:46.873365      77 watcher.go:93] Error while processing event ("/sys/fs/cgroup/kubepods": 0x40000100 == IN_CREATE|IN_ISDIR): inotify_add_watch /sys/fs/cgroup/kubepods: no such file or directory
E0603 23:16:46.873395      77 kubelet.go:1431] "Failed to start ContainerManager" err="cannot enter cgroupv2 \"/sys/fs/cgroup/kubepods\" with domain controllers -- it is in an invalid state"