Docker를 시작하지 못했습니다.

Docker를 시작하지 못했습니다.

오늘 docker에 문제가 있습니다. 중지되어 시작할 수 없습니다.

 systemctl status docker

● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2020-01-28 09:59:03 +0330; 1min 51s ago
     Docs: https://docs.docker.com
  Process: 2327 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=205/LIMITS)
 Main PID: 2327 (code=exited, status=205/LIMITS)

Jan 28 09:59:03 example.com systemd[1]: Starting Docker Application Container Engine...
Jan 28 09:59:03 example.com systemd[1]: docker.service: main process exited, code=exited, status=205/LIMITS
Jan 28 09:59:03 example.com systemd[1]: Stopped Docker Application Container Engine.
Jan 28 09:59:03 example.com systemd[1]: Unit docker.service entered failed state.
Jan 28 09:59:03 example.com systemd[1]: docker.service failed.

3일 전에 구성을 status=205/LIMITS변경한 것을 기억합니다 .ulimit

# /etc/security/limits.d/custom.conf

root soft nofile 1000000
root hard nofile 1000000
* soft nofile 1000000
* hard nofile 1000000
# /etc/sysctl.conf

fs.file-max = 1000000
fs.nr_open = 1000000

변경 사항 실행 취소 후 docker가 성공적으로 시작된 후 fd를 1백만으로 늘렸습니다.

여기서 정확히 무슨 문제가 있는 걸까요??

답변1

status=205/LIMITS이 한도 히트 중 하나를 의미합니다.LimitCPU=, LimitFSIZE=, LimitDATA=, LimitSTACK=, LimitCORE=, LimitRSS=, LimitNOFILE=, LimitAS=, LimitNPROC=, LimitMEMLOCK=, LimitLOCKS=, LimitSIGPENDING=, LimitMSGQUEUE=, LimitNICE=, LimitRTPRIO=, LimitRTTIME=

귀하의 OS 버전은 확실하지 않지만 Ubuntu 16에 대한 한 가지 예를 제공하면 /etc/systemd/system/docker.service.d/customexec.conf아래 콘텐츠가 없으면 이 파일을 생성하십시오.

[Service]
LimitNOFILE=1000000

새로고침하세요systemctl daemon-reload

docker 패키지가 새로운 한도보다 더 높은 한도를 설정했기 때문에 프로세스가 시작되지 못했습니다. 위의 옵션이 작동하지 않으면 아래에서 시도해 볼 수 있습니다.

sysctl -w fs.nr_open=1048576

관련 정보