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

Socket connection closed! - Docker image behind apache #306

Open
pubmania opened this issue Mar 15, 2019 · 5 comments
Open

Socket connection closed! - Docker image behind apache #306

pubmania opened this issue Mar 15, 2019 · 5 comments

Comments

@pubmania
Copy link

Running docker image behind apache server, I get the error:

Socket connection closed!

Error: Socket connection closed!
    at WebSocket.ws.onclose (https://vimflowy.mydomain.com/build/app.js:81:335053)

running the docker on port 3010 and then doing a proxypass and proxypassreverse etc using following:

    ProxyPreserveHost On
    ProxyPass / http://localhost:3010/
    ProxyPassReverse / http://localhost:3010/
    ProxyPass "/websocket/"  "ws://localhost:3010/websocket"
    ProxyPass "/websocket/" "wss://localhost:3010/websocket"

I have tried variations to above configuration by commenting line 4 and / or 5, removing websocket in end of 4 and 5 but no joy. I am certain it is the Apache config that is causing this issue but I dont know how / what do i need to change. I have to use Apache and cannot use Caddy as shown in the example

@WuTheFWasThat
Copy link
Owner

could you try setting KeepAliveTimeout to some very high value?

@pubmania
Copy link
Author

I tried after setting it to 3600 but still same error... I think it is the proxypass settings that are messed up and I don't know what these should be - I am just guessing it based on the caddy conf in your guidance you see...

Trying to connect wss://vimflowy.mydomain.com
index.ts:178 WebSocket connection to 'wss://vimflowy.mydomain.com/socket' failed: Error during WebSocket handshake: Unexpected response code: 404
(anonymous) @ index.ts:178
logger.ts:57 Caught error: 'Uncaught Error: Socket connection error: [object Event]' from  https://vimflowy.mydomain.com/build/app.js:81
logger.ts:57 Error:  Uncaught Error: Socket connection error: [object Event] Error: Socket connection error: [object Event]
    at WebSocket.ws.onerror (index.ts:180) Error: Socket connection error: [object Event]
    at WebSocket.ws.onerror (https://vimflowy.mydomain.com/build/app.js:81:334978) {}

@WuTheFWasThat
Copy link
Owner

oh, so it's not working at all? it's not just that the connection closes after awhile?

@pubmania
Copy link
Author

Yep not working at all... just the web page showing the error reported in my first message

@pubmania
Copy link
Author

pubmania commented Mar 16, 2019

Would you please be able to suggest apache config for websocket like you have done for caddy and I can give it a shot before completely giving up :(

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

2 participants