I’m trying to evaluate Rancher 2.1.5 and I’ve hit a snag. I’m using ESXi 6.7 as a platform, and I’ve created a server running RancherOS. After that, I SSH in and run sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:latest -v /opt/rancher:/var/lib/rancher
That appears to work okay, however, a docker ps shows this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f7076c909706 rancher/rancher:latest "entrypoint.sh -v /o…" 35 seconds ago Restarting (0) 1 second ago awesome_wright
And looking at the logs for the container shows this:
rancher version v2.1.5
rancher version v2.1.5
rancher version v2.1.5
rancher version v2.1.5
rancher version v2.1.5
rancher version v2.1.5
rancher version v2.1.5
rancher version v2.1.5
rancher version v2.1.5
rancher version v2.1.5
Running without the -v argument works properly. How can I fix this and get the server to start properly while keeping the data persistent?
sudo docker run -p 80:80 -p 443:443 rancher/rancher:latest -v /opt/rancher:/var/lib/rancher
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4e196451d962 rancher/rancher:latest "entrypoint.sh -v /o…" 39 minutes ago Restarting (0) 18 seconds ago xenodochial_northcutt
Docker
root@debian-2gb-nbg1-1 /opt # docker version
Client:
Version: 18.09.3
API version: 1.39
Go version: go1.10.8
Git commit: 774a1f4
Built: Thu Feb 28 06:34:04 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.3
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: 774a1f4
Built: Thu Feb 28 05:59:55 2019
OS/Arch: linux/amd64
Experimental: false
#1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07)
root@debian-2gb-nbg1-1 /opt/rancher # ls -al
total 8
drwxr-xr-x 2 root root 4096 Mar 4 20:38 .
drwxr-xr-x 4 root root 4096 Mar 4 21:10 ..
I’m having the same problem. I have tried creating the “/opt/rancher” directory first, turning off SELinux, and changing the directory to 777. It made no difference, it still just goes into a restart loop.