Occassional "transport: Error while dialing only one connection allowed" errors

Open
#748 14 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
docker, go

Research direction

Start by reproducing the reported docker build -t docker-cli-dev -f ./dockerfiles/Dockerfile.dev . failure and inspect the gRPC session setup shown in the logs. No source file or test is identified, and reproduction is intermittent; done would mean identifying the cause of the single-connection dialing error and adding a verified fix or regression coverage.

Written by the indexing model from the issue text.

Description

Don't have a way to reproduce, but this happened to me on a couple of occasions when building the docker/cli repository;

docker build  -t docker-cli-dev -f ./dockerfiles/Dockerfile.dev .
[+] Building 0.0s (2/2) FINISHED                                                                                                                                                                                        
 => ERROR [internal] load .dockerignore                                                                                                                                                                            0.0s
 => => transferring context:                                                                                                                                                                                       0.0s
 => ERROR [internal] load build definition from Dockerfile.dev                                                                                                                                                     0.0s
 => => transferring dockerfile:                                                                                                                                                                                    0.0s
------
 > [internal] load .dockerignore:
------
------
 > [internal] load build definition from Dockerfile.dev:
------
failed to resolve dockerfile: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing only one connection allowed"
make: *** [build_docker_image] Error 1

Logs that look to be related to this;

=u80j74ehsqre5zenxww4x0mvx sessionID=u80j74ehsqre5zenxww4x0mvx
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.054243261Z" level=debug msg="Calling GET /_ping"
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.060894052Z" level=debug msg="Calling POST /session"
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.062535801Z" level=info msg="parsed scheme: \"\"" module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.062582397Z" level=info msg="scheme \"\" not registered, fallback to default scheme" module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.062769002Z" level=info msg="ccResolverWrapper: sending new addresses to cc: [{ 0  <nil>}]" module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.062787116Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.062866517Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc43b62c1a0, CONNECTING" module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.063982801Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc43b62c1a0, READY" module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.064010389Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc43b62c1a0, TRANSIENT_FAILURE" module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.064023179Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc43b62c1a0, CONNECTING" module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.065463930Z" level=warning msg="grpc: addrConn.createTransport failed to connect to { 0  <nil>}. Err :connection error: desc = \"transport: Error while dialing only one connection allowed\". Reconnecting..." module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.065531653Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc43b62c1a0, TRANSIENT_FAILURE" module=grpc
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.069936740Z" level=debug msg="Calling POST /v1.39/build?buildargs=%7B%7D&buildid=13fd68bf24a3e4796d9464b9f458f6711400bffb06ba84b4daaa743cff31ea1d&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile.dev&labels=%7B%7D&memory=0&memswap=0&networkmode=default&remote=client-session&rm=1&session=2tf3kj212c1fiq66nib001m2a&shmsize=0&t=docker-cli-dev&target=&ulimits=null&version=2"
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.083537626Z" level=debug msg="reusing ref for local: jlv21o58mudf9vdykymxq6cxj"
2018-12-11T11:20:55Z docker time="2018-12-11T11:20:55.097137031Z" level=debug msg="reusing ref for local: 69b5pv1cz6iuauwilmaxmruof"

Docker version;

Client: Docker Engine - Community
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:47:43 2018
 OS/Arch:           darwin/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:55:00 2018
  OS/Arch:          linux/amd64
  Experimental:     true

Docker info

Containers: 14
 Running: 2
 Paused: 0
 Stopped: 12
Images: 144
Server Version: 18.09.0
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
 NodeID: g5l8yjyurr8xpie3k9xb08uqz
 Is Manager: true
 ClusterID: jrnii2o76lmneq8jrt9nz72ye
 Managers: 1
 Nodes: 1
 Default Address Pool: 10.0.0.0/8  
 SubnetSize: 24
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 10
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 192.168.65.3
 Manager Addresses:
  192.168.65.3:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.125-linuxkit
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952GiB
Name: linuxkit-025000000001
ID: L3VR:6SGF:FS5T:YB7O:7IJZ:IOK3:2F2I:73K6:M5MP:55PZ:YDMN:YHUT
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 54
 Goroutines: 199
 System Time: 2018-12-11T11:30:49.96729541Z
 EventsListeners: 4
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from moby/buildkit

All issues in moby/buildkit

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.