doumei1955 2019-07-30 10:02
浏览 127

等待标头时超出客户端超时

I got below error, I am using go v1.10.4 linux/amd64.

I am not behind any firewall or whatsoever. New Relic in java server (same network segment) that we have runs fine.

We have tried:

  • Increasing the timeout to 60 seconds
  • Use http2 in the server
  • Using Postman return 503 with response:

    {"exception":{"message":"Server Error","error_type":"RuntimeError"}}

  • troubleshooting with ./nrdiag says “No Issues Found”

Below is our code:

    config := newrelic.NewConfig(os.Getenv("NEW_RELIC_APP_NAME"), os.Getenv("NEW_RELIC_KEY"))

    config.Logger = newrelic.NewDebugLogger(os.Stdout)

    app, err := newrelic.NewApplication(config)
    if err != nil {
        fmt.Println("Failed to create newrelic application", err)
        os.Exit(1)
    }

.................

        httpListener, err := net.Listen("tcp", *httpAddr)
        if err != nil {
            oldlog.Print("Error: ", err)
            logger.Log("transport", "HTTP", "during", "Listen", "err", err)
            os.Exit(1)
        }
        g.Add(func() error {
            logger.Log("transport", "HTTP", "addr", *httpAddr)
            return http.Serve(httpListener, nrgorilla.InstrumentRoutes(httpHandler, app))
        }, func(error) {
            httpListener.Close()
        })
    }

However this what we got,note some_key was removed:

(28422) 2019/07/29 18:08:50.058559 {"level":"warn","msg":"application connect failure","context":{"error":"Post https://collector-001.eu01.nr-data.net/agent_listener/invoke_raw_method?license_key=some_key\u0026marshal_format=json\u0026method=connect\u0026protocol_version=17: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"}}

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥60 Python如何后台操作Vmwake虚拟机键鼠
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog
    • ¥15 Excel发现不可读取的内容