Skip to content

net: DialContext returns "dial tcp <addr>: context deadline exceeded" error #23648

Closed

Description

@benburkert

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.9.3 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build672889649=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

A reverse proxy triggered a bunch of dial timeouts while connecting to a backend over a short period of time.

What did you expect to see?

A bunch of "dial tcp <addr>: i/o timeout" error messages.

What did you see instead?

A reverse proxy logged a quick burst of "dial tcp <addr>: context deadline exceeded" errors. The errors originated from the DialContext method a *net.Dialer with a Timeout value set.

Activity

  1. benburkert commented on Feb 1, 2018

    @benburkert
    ContributorAuthor

    My guess is that the context.DeadlineExceeded message is in the error string because mapErr isn't being called here. But I haven't been able to reproduce the error message locally.

  2. ianlancetaylor commented on Mar 28, 2018

    @ianlancetaylor
    Contributor

    Closing as dup of #22724.

  3. gopherbot commented on Mar 29, 2018

    @gopherbot
    Contributor

    Change https://golang.org/cl/103518 mentions this issue: net: map context errors from aborted dial to internal net package errors

  4. added a commit that references this issue on Mar 29, 2018
    72b0fb5
  5. locked and limited conversation to collaborators on Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions