我在服务器机器上安装了Docker(使用Ubuntu 16.04),但尝试运行任何命令,我收到此错误:
"来自守护程序的错误响应:获取https://registry-1.docker.io/v2/:拨打tcp:lookup registry-1.docker.io:太多打开的文件"
请问,谁知道如何解决这个问题?
Docker Info:
Containers: 18
Running: 0
Paused: 0
Stopped: 18
Images: 4
Server Version: 17.03.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 76
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-ini
containerd version: 977c511eda0925a723debdc94d09459af49d082a
runc version: a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-59-generic
Operating System: Ubuntu 16.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.953 GiB
Name: web.renderdeal.com
ID: LXNZ:I6HH:ZVBB:KS3V:3WCT:ADWY:C2MZ:QJ37:VZUU:EZ6T:PYWO:66WQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: animarender
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
/ Docker Info
docker version
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 11:02:43 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 11:02:43 2017
OS/Arch: linux/amd64
Experimental: false
/ docker version
答案 0 :(得分:0)
考虑到Docker状态似乎没问题,请检查问题是否在您身边(如this ticket所示)
让我们检查当前打开的文件
lsof | grep "rclone" | wc -l
returns 6458
现在,检查当前的ulimit
ulimit -n
returns 1024
将其设置为9000并再次检查
ulimit -n 9000 && ulimit -n
returns 9000
要使
ulimit
更持久,您可以修改/etc/security/limits.conf
并添加:
* soft nofile 9000 + reboot
或将其写入用户的
.bashrc