Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hypatiahub opened this issue Feb 9, 2017 · 14 comments
Labels

Comments

@hypatiahub
Copy link

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

@juliemathew
Copy link

Any update on this issue?

@jinghuaz
Copy link

any update?

@alexef
Copy link

alexef commented May 14, 2018

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

@arohigupta
Copy link

Any update yet?

@joshuansu0897
Copy link

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

@juliemathew
Copy link

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.

@ksystemsio
Copy link

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

@joshuansu0897
Copy link

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

@ksystemsio
Copy link

@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

@levonet
Copy link

levonet commented Mar 20, 2019

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)

@stale
Copy link

stale bot commented Oct 9, 2019

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 stale bot added the stale label Oct 9, 2019
@stale
Copy link

stale bot commented Oct 16, 2019

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

@stale stale bot closed this as completed Oct 16, 2019
@oosswwaalldd
Copy link

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.

@tuxmachine
Copy link

tuxmachine commented Apr 16, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants