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 when copying from client to backend: websocket: close 1006 (abnormal closure): unexpected EOF #39

Open
Haomeng opened this issue Oct 19, 2020 · 4 comments

Comments

@Haomeng
Copy link

Haomeng commented Oct 19, 2020

I just encountered below error message, looks like the wss connection is closed after dial successfully:

2020/10/19 17:25:43 websocketproxy: Error when copying from client to backend: websocket: close 1006 (abnormal closure): unexpected EOF
2020/10/19 17:25:43 http: response.WriteHeader on hijacked connection from huayun.com/haihe/bare-metal-vnc/src/websocketproxy.(*WebsocketProxy).ServeHTTP.func1 (websocket_proxy.go:130)

Note:
connBackend, resp, err := dialer.Dial(backend.Url.String(), requestHeader)
This line works fine, err is nil.

So any ideas, thans a lot!

@alfrye
Copy link

alfrye commented Jun 30, 2021

I am experiencing the same issues. Are there any updates on this issue?

1 similar comment
@feiyiban
Copy link

I am experiencing the same issues. Are there any updates on this issue?

@mpisat
Copy link

mpisat commented Jun 25, 2022

Same here...

@Egr711
Copy link

Egr711 commented Oct 27, 2023

In my case, needed to copy response headers after dialing.

        # websocketproxy.go
        connBackend, resp, err := dialer.Dial(backendURL.String(), requestHeader)
	if err = wsCopyResponse(resp, respBackend); err != nil {
		errorF(w.option.logger, "websocketproxy: couldn't copy response: %v", err)
	}

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

No branches or pull requests

5 participants