oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.58k stars 5.44k forks source link

Start the first container of RAC failed with error #1143

Closed scottwansz closed 5 years ago

scottwansz commented 5 years ago

# docker start racnode1 Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:275: applying cgroup configuration for process caused \"failed to write 95000 to cpu.rt_runtime_us: write /sys/fs/cgroup/cpu,cpuacct/docker/bc35d71f14b1f32c775f2287583aa569d1913892551472a64411f43e5d23fc71/cpu.rt_runtime_us: invalid argument\"": unknown Error: failed to start containers: racnode1

scottwansz commented 5 years ago

noticed it is the same error as: Cgroup issue i.e. RAC container is not coming up because of RT settings #837 so, I try following:

echo 950000 > /sys/fs/cgroup/cpu/cpu.rt_runtime_us echo 1000000> /sys/fs/cgroup/cpu/cpu.rt_period_us echo 95000 > /sys/fs/cgroup/cpu,cpuacct/system.slice/cpu.rt_runtime_us

Retstart container and face the same issue.

scottwansz commented 5 years ago

# docker info Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 11 Server Version: 18.09.1 Storage Driver: overlay2 Backing Filesystem: xfs Supports d_type: true Native Overlay Diff: false Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce runc version: 96ec2177ae841256168fcf76954f7177af9446eb init version: fec3683 Security Options: seccomp Profile: default Kernel Version: 4.14.35-1818.3.3.el7uek.x86_64 Operating System: Oracle Linux Server 7.6 OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 7.53GiB Name: docker.example.com ID: THEQ:KNC2:H2I7:OZWT:7OVI:HMAE:32KM:ESTL:ZNZO:IZDJ:P3LA:KO57 Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Labels: com.docker.security.seccomp=enabled Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false Product License: Unlicensed Enterprise Engine

scottwansz commented 5 years ago

solved this issue by refer: https://github.com/oracle/docker-images/issues/838

`# vi /usr/lib/systemd/system/docker.service

ExecStart=/usr/bin/dockerd

add command argument: ExecStart=/usr/bin/dockerd --cpu-rt-runtime=950000 --cpu-rt-period=1000000 --exec-opt=native.cgroupdriver=systemd

save the file. systemctl daemon-reload systemctl restart docker

systemctl status docker`

You should see dockerd daemon is running with following options: /usr/bin/dockerd --cpu-rt-runtime=950000 --cpu-rt-period=1000000 --exec-opt native.cgroupdriver=systemd

mkumar01 commented 5 years ago

Hi, am also getting the same issue while starting container. Can you please help me here: [root@192 docker]# docker start racnode1 Error response from daemon: linux init cgroups path: write /sys/fs/cgroup/cpu,cpuacct/docker/cpu.rt_runtime_us: invalid argument Error: failed to start containers: racnode1

psaini2018 commented 5 years ago

Hi,

Please try following and let me know if you still see issue:

Edit /etc/sysconfig/docker and OPTIONS to following: OPTIONS='--selinux-enabled --cpu-rt-runtime=950000'

save the file.

systemctl daemon-reload systemctl restart docker Check the cgroup driver: docker info | grep cgroupfs Cgroup Driver: cgroupfs

Also, if you want to use systemd driver , please check the thread: https://github.com/oracle/docker-images/issues/837 https://github.com/oracle/docker-images/issues/838