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

nginx-python send RST package to client cause EOF #20965

Open
suchen-sci opened this issue Sep 26, 2024 · 1 comment
Open

nginx-python send RST package to client cause EOF #20965

suchen-sci opened this issue Sep 26, 2024 · 1 comment
Assignees

Comments

@suchen-sci
Copy link

Hi Team,

We are currently running the Harbor project using Docker Compose. When accessing Nginx-Python with our Golang client, we have encountered an issue where, approximately every few hours, the client experiences an EOF error. Upon investigating with tcpdump, we observed that about one minute after the request, Nginx-Python sometimes sends a RST packet to the client, which results in the Golang client receiving an EOF.

Could you please provide any advice or insights on how to resolve this issue?

Below are the settings for our Golang client:

func HTTPClient(tlsCfg *tls.Config) *http.Client {
	dialFunc := func(ctx stdctx.Context, network, addr string) (net.Conn, error) {
		return (&net.Dialer{
			Timeout:   30 * time.Second,
			KeepAlive: 60 * time.Second,
		}).DialContext(ctx, network, addr)
	}

	client := &http.Client{
		Transport: &http.Transport{
			Proxy:              http.ProxyFromEnvironment,
			DialContext:        dialFunc,
			TLSClientConfig:    tlsCfg,
			DisableCompression: false,
			// NOTE: The large number of Idle Connections can
			// reduce overhead of building connections.
			IdleConnTimeout:       90 * time.Second,
			TLSHandshakeTimeout:   10 * time.Second,
			ExpectContinueTimeout: 1 * time.Second,
		},
	}
	return client
}

Thanks a lot!

@wy65701436
Copy link
Contributor

Hi, providing more details will help us better understand your issue.

  • What version of Harbor are you using?
  • What request did you send to the Harbor core?
  • Did you notice any non-2XX response in the Harbor proxy logs at the time of the failure?

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

No branches or pull requests

2 participants