Docker Community Forums

Share and learn in the Docker community.

Systctl fail since some file missing

docker

(Studx) #1

hi, i run inside a privileged container and do some setting with systctl:

bash-4.2# cat sysctl.conf
kernel.shmmax = 1000000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
kernel.sem = 250 512000 100 2048
kernel.sysrq = 1
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.msgmni = 2048
net.ipv4.tcp_syncookies = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_syn_backlog = 200000
net.ipv4.conf.all.arp_filter = 1
net.ipv4.ip_local_port_range = 32768 65535
net.core.netdev_max_backlog = 200000
vm.overcommit_memory = 2
fs.nr_open = 3000000
kernel.threads-max = 798720
kernel.pid_max = 798720
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152

bash-4.2# sysctl -p sysctl.conf
kernel.shmmax = 1000000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
kernel.sem = 250 512000 100 2048
kernel.sysrq = 1
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.msgmni = 2048
sysctl: cannot stat /proc/sys/net/ipv4/tcp_syncookies: No such file or directory
net.ipv4.conf.default.accept_source_route = 0
sysctl: cannot stat /proc/sys/net/ipv4/tcp_tw_recycle: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/tcp_max_syn_backlog: No such file or directory
net.ipv4.conf.all.arp_filter = 1
net.ipv4.ip_local_port_range = 32768 65535
sysctl: cannot stat /proc/sys/net/core/netdev_max_backlog: No such file or directory
vm.overcommit_memory = 2
fs.nr_open = 3000000
kernel.threads-max = 798720
kernel.pid_max = 798720
sysctl: cannot stat /proc/sys/net/core/rmem_max: No such file or directory
sysctl: cannot stat /proc/sys/net/core/wmem_max: No such file or directory

Some proc file missed, i do not know how to fix.
here is my env:

[root@001 makeimage]# docker info
Containers: 1
 Running: 1
 Paused: 0
 Stopped: 0
Images: 28
Server Version: 17.06.2-ce
Storage Driver: devicemapper
 Pool Name: docker-253:1-1009778822-pool
 Pool Blocksize: 65.54kB
 Base Device Size: 53.69GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 1.042GB
 Data Space Total: 1.074TB
 Data Space Available: 475.8GB
 Metadata Space Used: 5.444MB
 Metadata Space Total: 2.147GB
 Metadata Space Available: 2.142GB
 Thin Pool Minimum Free Space: 10.74GB
 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.140-RHEL7 (2017-05-03)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 6e23458c129b551d5c9871e5174f6b1b7f6d1170
runc version: 810190ceaa507aa2727d7ae6f4790c76ec150bd2
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-514.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 31.26GiB
Name: skydata_003
ID: 3FMA:CIIC:S4WS:UKGO:PVTU:FENF:2TWV:HQZS:VMFE:6HLT:ICDP:52TW
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 192.168.20.38
 127.0.0.0/8
Live Restore Enabled: false
[root@001 makeimage]# uname -a
Linux 001 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@001 makeimage]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core)