Repository navigation
Description
Description
I am facing a critical issue while running oracle rac database in docker container solely as net.core* parameters are not set in the container. I also tried with --net=host but that does not seem to help as it uses host network which limit connectivity between two rac containers and also hinders the installation.
I am using Docker-version 1.12.1 on ubuntu 4.4.0-59-generic.
Parameters are set in /etc/sysctl.conf and yet on running sysctl -a i am unable to grep "net.core.rmem_default = 262144".
Steps to reproduce the issue-
- Pull basic image from a repository.
- Run docker container in --priviledged mode with --sysctl parameter to set inside the container.
docker run \
--detach \
--privileged \
--name rac1 \
--hostname rac1 \
--sysctl net.core.rmem_default=262144 \
-p 1565:1521 \
--volume /srv/docker/rac_nodes/custom_services:/usr/lib/custom_services \
--volume /oracledata/stage:/stage \
--volume /sys/fs/cgroup:/sys/fs/cgroup:ro \
--volume /oraclenfs:/oraclenfs \
--shm-size 8000m \
--dns 10.10.10.10 \
--add-host=clu-121-scan.clu-121.example.com:10.10.10.15 \
--add-host=rac1:172.17.0.8 \
giinstalled \
/usr/lib/systemd/systemd --system --unit=multi-user.target
Error-
Inspite of running --sysctl net.core.rmem_default=262144 parameter in priviledged mode shows the error-
docker: Error response from daemon: oci runtime error: open /proc/sys/net/core/rmem_default: no such file or directory.
I also tried by manually setting this parameter in file-
[@ubuntu:~rac-test/12c-rac-docker]$ docker exec rac1 "touch /proc/sys/net/core/rmem_default"
rpc error: code = 2 desc = oci runtime error: exec failed: exec: "touch /proc/sys/net/core/rmem_default": stat touch /proc/sys/net/core/rmem_default: no such file or directory
[@ubuntu:~/rac-test/12c-rac-docker]$ docker exec rac1 "echo 262144 >> /proc/sys/net/core/rmem_default"
rpc error: code = 2 desc = oci runtime error: exec failed: exec: "echo 262144 >> /proc/sys/net/core/rmem_default": stat echo 262144 >> /proc/sys/net/core/rmem_default: no such file or directory.
But all in vain as it does not allow me to make a new file in /proc/sys/net/core in running container.
Activity
rhatdan commentedon Feb 7, 2017
I have a feeling this is more of a kernel issue with the network namespace then a docker issue. We should probably bring this to the kernel list.
cpuguy83 commentedon Feb 7, 2017
Yep, docker is just trying to set this for you, if the setting doesn't exist there's not really anything we can do here.
Mishi-999 commentedon Feb 8, 2017
If i understood correctly then this means net.core.* parameters should be set on my host machine which is true ,means it is set on my machine.
justincormack commentedon Feb 8, 2017
Yes, if it is not in the namespaced version, it is a global parameter you can set on the host and it will affect all containers.
Mishi-999 commentedon Feb 9, 2017
Yes it is set on my host but is not reflected inside my container.
rhatdan commentedon Feb 9, 2017
This looks like a network namespace issue, with the kernel.
eastpav commentedon Mar 16, 2017
I have the some issue. but I need modify net.ipv4.tcp_keepalive_time net.ipv4.tcp_keepalive_intvl net.ipv4.tcp_keepalive_probes. I tried many images from docker hub, but none of them has the three parameters. all of the docker images dropped these parameters?
rhatdan commentedon Jun 15, 2017
Openend a RHEL Bugzilla on the kernel on this issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1461696
thaJeztah commentedon Jun 28, 2017
@rhatdan Looks like the issue is "private"; could it be opened up so that people can follow the status on that ticket?
thatsk commentedon May 18, 2019
thatsk commentedon May 18, 2019
looks like centos latest image is missing this also
vinujan59 commentedon Oct 10, 2019
`
ubuntu@ip:~$ docker --version
Docker version 19.03.2, build 6a30dfc
ubuntu@ip:~$ uname -r
4.15.0-1051-aws
ubuntu@ip:~$ sysctl net.core.rmem_default
net.core.rmem_default = 212992
ubuntu@ip:~$ docker run --privileged -it ubuntu:16.04 uname -r
4.15.0-1051-aws
ubuntu@ip:~$ docker run --privileged -it ubuntu:16.04 sysctl net.core.rmem_default
sysctl: cannot stat /proc/sys/net/core/rmem_default: No such file or directory
ubuntu@ip:~$ docker run --privileged --sysctl net.core.rmem_default=524288 -it ubuntu:16.04 /bin/bash
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused "write sysctl key net.core.rmem_default: open /proc/sys/net/core/rmem_default: no such file or directory"": unknown.
ubuntu@ip:~$ docker run --privileged --network="host" -it ubuntu:16.04 sysctl net.core.rmem_default
net.core.rmem_default = 212992
`
-- implies that net.core.rmem_default is namespaced
is docker doesn't support net.core.rmem_default parameter?
crazy-canux commentedon Jan 10, 2020
any update?
Is there a walkaround for this?
Asisranjan commentedon Jan 13, 2020
Hi @crazy-canux & @Mishi-999
Did you find a solution for it.
I am having this issue as well.
vinujan59 commentedon Jan 13, 2020
Updated the network mode to host which enabled us to modify the value
crazy-canux commentedon Jan 14, 2020
mode=host means you modified for host which shared to container.
I give up this function.
No workaround for docker swarm.
k8s is the best solution.
guillaumedsde commentedon Mar 16, 2021
Hi,
Does anyone know of a kernel which has these parameters namespaced?
I have tried with the following setup without sucess:
thaJeztah commentedon Apr 12, 2021
(whoops, posted on the wrong ticket: removed my comment)
tianon commentedon Jun 29, 2023
Ah, it looks like
net.core.{r,w}mem_{default,max}maybe never actually got namespaced in the kernel? (https://patchwork.ozlabs.org/project/netdev/patch/[email protected]/)thaJeztah commentedon Jun 30, 2023
Yes, at least Dan opened a ticket for it; #30778 (comment)