Docker command with build / run / etc. “too many open files”

Im installed Docker on server machine (with Ubuntu 16.04), but trying run any commands, I get this error:

“Error response from daemon: Get dial tcp: lookup too many open files”

  • Unable to Make a development environment image for Docker opensource development
  • How to programmatically know if I am building with -prod flag (ng build -prod)
  • docker build inside official jenkins container
  • How to rebuild go project efficiently while using Docker Compose?
  • Jenkins docker setup
  • Docker trouble with too many link
  • Please, who know how solve this issue?

    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
     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:
      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
    Docker Root Dir: /var/lib/docker
    Debug Mode (client): false
    Debug Mode (server): false
    Username: animarender
    WARNING: No swap limit support
    Experimental: false
    Insecure Registries:
    Live Restore Enabled: false

    /Docker Info

    docker version

     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
     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

  • cURL from host-to-container works, but from container-to-container does not
  • Connect to docker containers with just service name and task slot?
  • How get the number of pulls of a docker tag?
  • wordpress docker exits immediately
  • Can Docker Compose build a ZooKeeper discovery service for Swarm?
  • How can I write Dockerfile for Yesod? “RUN yesod init -n myApp -d postgresql” didn't work as expected
  • One Solution collect form web for “Docker command with build / run / etc. “too many open files””

    Considering Docker status seems OK, check if the issue is on your side (as in this ticket)

    Let’s check on the current open files

    lsof | grep "rclone" | wc -l
    returns 6458

    Now, Check on current ulimit

    ulimit -n
    returns 1024

    Set that to 9000 and Check again

    ulimit -n 9000 && ulimit -n
    returns 9000

    To make the ulimit more persistent you can either edit /etc/security/limits.conf
    and add :

    * soft nofile 9000 + reboot

    or write it into your user’s .bashrc

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.