Docker Community Forums

Share and learn in the Docker community.

DTR install Fail: rpc error: code = 2 desc = oci runtime error: exec failed: cannot exec a container that has run and stopped


(Jacob Roy) #1

Failing to Install DTR on the UCP managed Node:
Attaching the Error below. Any help to resolve this will be appreciated.

INFO[0004] Waiting for database dtr2 to exist
INFO[0010] Generated TLS certificate. domain=192.168.1.41
INFO[0010] License config copied from UCP.
INFO[0010] Migrating db…
rpc error: code = 2 desc = oci runtime error: exec failed: cannot exec a container that has run and stopped

FATA[0011] Couldn’t migrate database: exit code 126
FATA[0021] Failed to execute phase 2: Phase 2 returned non-zero status: 1


(Nicolas Bihan) #2

Which version of Docker is the node running on?
Also which command did you use to install DTR?


(Patrick Devine) #3

I’m assuming you’re using a copy of RHEL 7.2 w/ kernel ~3.10.0-327. There’s a bug in that kernel which has been patched by Red Hat. I believe you can get this to work by just upgrading your kernel ala sudo yum update -y kernel. Once you’ve upgraded the kernel, reboot and you should be able to install.


(Jacob Roy) #4

Hello Nicolas, Following are the details you asked for:

Docker version 17.03.2-ee-4, build 1e6d71e

I used two commands to install the DTR.

  1. I ran the following command on the UCP manager Node:
    docker run -it --rm
    docker/dtr:2.2.6 install
    –ucp-node
    –ucp-insecure-tls

  2. After the above command failed, I tried the following command on the node, where DTR is being deployed. I got this command from the DDC in Sandbox install.

docker run -it --rm docker/dtr install
–ucp-url
–ucp-insecure-tls
–ucp-node node2
–dtr-external-url


(Jacob Roy) #5

Hello Patrick,
Yes I am using the following version of kernel:
3.10.0-327.el7.x86_64
cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

Also I will do the update kernel and will let you know whether I am able to install DTR.


(Jacob Roy) #6

Hello Patrick,
updating the kernel as per you suggested, made the DTR install successful.

Really appreciate your help…Thank you all :slight_smile:


(Patrick Devine) #7

Hey Jaron,

Glad it worked for you! I’m going to see if we can detect the kernel version in the future and give you a warning/explanation on how to fix it.


(Parvez84) #8

Hi,

I am facing the same issue. I have Docker UCP 2.1.4 running and I am trying to install DTR 2.2.3 ( tried 2.2.5 and 2.2.6) same error.
docker info
Containers: 5
Running: 3
Paused: 0
Stopped: 2
Images: 37
Server Version: 17.03.2-ee-5
Storage Driver: devicemapper
Pool Name: docker-253:5-8435678-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 3.55 GB
Data Space Total: 107.4 GB
Data Space Available: 11.32 GB
Metadata Space Used: 5.521 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.142 GB
Thin Pool Minimum Free Space: 10.74 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.135-RHEL7 (2016-11-16)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: active
NodeID: y7w9zi8ut1d1k9wytkfg5xixs
Is Manager: false
Node Address: 172.24.33.29
Manager Addresses:
172.24.33.30:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 6c463891b1ad274d505ae3bb738e530d1df2b3c7
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-327.18.2.el7.x86_64
Operating System: Red Hat Enterprise Linux Server 7.3 (Maipo)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.695 GiB
Name:
ID: 35SN:FSSC:VLK4:FR3I:URKJ:DBI7:DMK6:CMLF:BWE4:LZUU:ZDKX:YUM7
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

docker run -it --rm docker/dtr:2.2.3 install --ucp-url https://<UCP_HOST>:9080 --ucp-node <UCP_NODE> --dtr-external-url http://<UCP_NODE>:9080/dtr --ucp-username dockeradm --ucp-password dockeradm --ucp-insecure-tls --debug

DEBU[0009] executing [rethinkops migrate --replicas 1 --debug] in container dtr-rethinkdb-f39d2f1af6ff
DEBU[0009] container wait
DEBU[0009] about to iocopy into the input
DEBU[0009] iocopied the input
rpc error: code = 2 desc = oci runtime error: exec failed: cannot exec a container that has run and stopped

DEBU[0009] finished reading output
FATA[0009] Couldn’t migrate database: exit code 126
DEBU[0015] Deleting container 7dea73e3424b31316f7bcfc57f53e0704d215f3d68b6c473cb011004556324ee
DEBU[0016] Deleting container 7dea73e3424b31316f7bcfc57f53e0704d215f3d68b6c473cb011004556324ee
DEBU[0016] Failed to remove container: Error response from daemon: Error: No such container: 7dea73e3424b31316f7bcfc57f53e0704d215f3d68b6c473cb011004556324ee
DEBU[0016] Ignored error Error response from daemon: Error: No such container: 7dea73e3424b31316f7bcfc57f53e0704d215f3d68b6c473cb011004556324ee…
FATA[0016] Failed to execute phase 2: Phase 2 returned non-zero status: 1


(Patrick Devine) #9

Hi parvez84,

You just need to sudo yum update -y kernel, reboot and then install should work fine.


(Parvez84) #10

That worked Awesome !!! . Thank you.