compose icon indicating copy to clipboard operation
compose copied to clipboard

Error creating container: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

Open hypatiahub opened this issue 9 years ago • 14 comments

We are installing a product on a VM that has VCPU:4, RAM:8GB, Root Disk:80GB Many docker containers are created during the installation process.

We see this error: TASK [proxy : Pulling haproxy Docker images] Wednesday 08 February 2017 20:58:15 +0000 (0:00:00.050) 0:30:19.435

TASK [proxy : Starting haproxy container on proxy node] Wednesday 08 February 2017 20:58:15 +0000 (0:00:00.040) 0:30:19.475 fatal: [192.168.0.158] => Error creating container: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

Increased the timeout time by running this command export COMPOSE_HTTP_TIMEOUT=500, but this did not help. Any suggestions on how to fix this?

docker version Client: Version: 1.12.0 API version: 1.24 Go version: go1.6.3 Git commit: 5507242 Built: Fri Sep 2 21:31:29 2016 OS/Arch: linux/ppc64le

Server: Version: 1.12.0 API version: 1.24 Go version: go1.6.3 Git commit: 5507242 Built: Fri Sep 2 21:31:29 2016 OS/Arch: linux/ppc64le

docker info Containers: 41 Running: 28 Paused: 0 Stopped: 13 Images: 15 Server Version: 1.12.0 Storage Driver: devicemapper Pool Name: docker-253:1-255591-pool Pool Blocksize: 65.54 kB Base Device Size: 10.74 GB Backing Filesystem: xfs Data file: /dev/loop0 Metadata file: /dev/loop1 Data Space Used: 4.241 GB Data Space Total: 107.4 GB Data Space Available: 77.26 GB Metadata Space Used: 8.139 MB Metadata Space Total: 2.147 GB Metadata Space Available: 2.139 GB Thin Pool Minimum Free Space: 10.74 GB 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 WARNING: Usage of loopback devices is strongly discouraged for production use. Use --storage-opt dm.thinpooldev to specify a custom block storage device. Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata Library Version: 1.02.110 (2015-10-30) Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: host bridge null overlay Swarm: inactive Runtimes: runc Default Runtime: runc Security Options: apparmor seccomp Kernel Version: 4.4.0-47-generic Operating System: Ubuntu 16.04.1 LTS OSType: linux Architecture: ppc64le CPUs: 4 Total Memory: 7.972 GiB Name: cluster-1486585024522-master ID: J2JZ:6R22:DSDJ:WIFQ:S6XX:J4OL:4XIC:OIMH:YB7W:6GYT:GKJR:ZZ7H Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ WARNING: No swap limit support Insecure Registries: 127.0.0.0/8

hypatiahub avatar Feb 09 '17 18:02 hypatiahub

Any update on this issue?

juliemathew avatar Mar 27 '17 12:03 juliemathew

any update?

jinghuaz avatar Dec 29 '17 07:12 jinghuaz

Any update, hitting this with docker-compose version 1.21.1, build 5a3f1a3, docker 18.03

alexef avatar May 14 '18 10:05 alexef

Any update yet?

arohigupta avatar Jun 21 '18 23:06 arohigupta

sudo service docker restart fixed the issue (better)

or you can use

COMPOSE_HTTP_TIMEOUT=120 docker-compose up

the both solutions are worked for me

joshuansu0897 avatar Jul 26 '18 18:07 joshuansu0897

Thank you for your support! This issue has been open since Feb 2017. We moved to docker latest version. Not hitting this problem any more.. I agree to close this issue.

juliemathew avatar Jul 31 '18 09:07 juliemathew

I still get the same, and I am in 2019...

ksystemsio avatar Feb 19 '19 18:02 ksystemsio

@ksystemsio hi, What operating system do you use? docker-compose version?

joshuansu0897 avatar Feb 19 '19 19:02 joshuansu0897

@ksystemsio hi, What operating system do you use? docker-compose version?

Hi joshuansu0897 , it was fixed after I moved to Ubuntu 18.04 from 16.04

ksystemsio avatar Feb 22 '19 18:02 ksystemsio

I had the same error when starting docker with log-driver: syslog when rsyslog port was unavailable. Error starting container 0ba2fb9540ec6680001f90dce56ae3a04b831c8146357efaab79d4756253ec8b: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

levonet avatar Mar 20 '19 18:03 levonet

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 09 '19 19:10 stale[bot]

This issue has been automatically closed because it had not recent activity during the stale period.

stale[bot] avatar Oct 16 '19 20:10 stale[bot]

I had the same problem and I found the solution, I had this config in my docker-compose.yml file:

 logging:
      driver: "json-file"
      options:
        max-file: 5
        max-size: 10m

It all got fixed when i quoted the values like this:

logging:
      driver: "json-file"
      options:
        max-file: "5"
        max-size: "10m"

I think docker-compose needs a syntax checker built in.

oosswwaalldd avatar Mar 09 '20 12:03 oosswwaalldd

For future reference. Make sure you quote referenced variables too, if they contain a special characters it gives the above error.

docker-compose.yml:

version: "3.7"
services:
  mycontainer:
    build: "."
    environment:
       SECRET_PASSWORD: "${SECRET_PASSWORD}"

.env:

# Make sure you quote these values too
SECRET_PASSWORD="H3()oW0r]d"

EDIT: well, docker-compose can now create your container, but your password will have quotes around it so...

rickdgeerling avatar Apr 16 '20 07:04 rickdgeerling