WebSocket connection issue for the app deployed docker/kubernetees

Hi

Could anyone help me out here?


connection.js:55 WebSocket connection to 'ws://myappurl/ws?bokeh-protocol-version=1.0&bokeh-session-id=asdf' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET t.connect @ connection.js:55
(anonymous) @ connection.js:286
(anonymous) @ es6-promise.js:406
e @ es6-promise.js:801
o.pull_session @ connection.js:272
(anonymous) @ server.js:33
i.add_document_from_session @ server.js:45
(anonymous) @ index.js:46
(anonymous) @ index.js:25
connection.js:287 [bokeh] Failed to connect to Bokeh server Error: Could not open websocket

It could be that you need to allow cross origin connections to the server:

“By default, cross site connections to the Bokeh server websocket are not allowed. You can enable websocket connections originating from additional hosts by specifying them with the --allow-websocket-origin option:”

bokeh serve myapp.py --allow-websocket-origin foo.com:8081

Check your bokeh server log and it should say that the WS connection request was denied due to this. Could be the host machine IP (or all of them since you’re deploying with kubernetees), not sure how your setup is but this could help.

···

On Sunday, September 16, 2018 at 6:16:54 PM UTC+2, Venugopal Madathil wrote:

Hi

Could anyone help me out here?

connection.js:55 WebSocket connection to 'ws://myappurl/ws?bokeh-protocol-version=1.0&bokeh-
session-id=asdf' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET t.connect @ connection.js:55
(anonymous) @ connection.js:286
(anonymous) @ es6-promise.js:406
e @ es6-promise.js:801
o.pull_session @ connection.js:272
(anonymous) @ server.js:33
i.add_document_from_session @ server.js:45
(anonymous) @ index.js:46
(anonymous) @ index.js:25
connection.js:287 [bokeh] Failed to connect to Bokeh server Error: Could not open websocket


Thanks for the response @omearac. I’d already given allow-websocket-origin parameter.

bokeh serve rtd.py --allow-websocket-origin myappkubeurl

But this time I looked at the server logs and I could see there is some connection issue.

Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f57b7d5f668>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’))"))>)

I see above error in the stdout. This is when bokeh app internally calls an API deployed elsewhere.

···

On Sunday, 16 September 2018 09:58:16 UTC-7, omearac wrote:

It could be that you need to allow cross origin connections to the server:

“By default, cross site connections to the Bokeh server websocket are not allowed. You can enable websocket connections originating from additional hosts by specifying them with the --allow-websocket-origin option:”

bokeh serve myapp.py --allow-websocket-origin foo.com:8081

Check your bokeh server log and it should say that the WS connection request was denied due to this. Could be the host machine IP (or all of them since you’re deploying with kubernetees), not sure how your setup is but this could help.

On Sunday, September 16, 2018 at 6:16:54 PM UTC+2, Venugopal Madathil wrote:

Hi

Could anyone help me out here?

connection.js:55 WebSocket connection to 'ws://myappurl/ws?bokeh-protocol-version=1.0&bokeh-
session-id=asdf' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET t.connect @ connection.js:55
(anonymous) @ connection.js:286
(anonymous) @ es6-promise.js:406
e @ es6-promise.js:801
o.pull_session @ connection.js:272
(anonymous) @ server.js:33
i.add_document_from_session @ server.js:45
(anonymous) @ index.js:46
(anonymous) @ index.js:25
connection.js:287 [bokeh] Failed to connect to Bokeh server Error: Could not open websocket


Hi,

This error "Temporary failure in name resolution" is not coming from Bokeh, and does not really have anything to do with Bokeh, either. There is some DNS configuration issue with your container, and when you try to hit the external service you mentioned by name, the OS is unable to resolve an IP address.

Thanks,

Bryan

···

On Sep 16, 2018, at 16:52, Venugopal Madathil <[email protected]> wrote:

Thanks for the response @omearac. I'd already given allow-websocket-origin parameter.

bokeh serve rtd.py --allow-websocket-origin myappkubeurl

But this time I looked at the server logs and I could see there is some connection issue.

Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f57b7d5f668>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))"))>)

I see above error in the stdout. This is when bokeh app internally calls an API deployed elsewhere.

On Sunday, 16 September 2018 09:58:16 UTC-7, omearac wrote:
It could be that you need to allow cross origin connections to the server:

"By default, cross site connections to the Bokeh server websocket are not allowed. You can enable websocket connections originating from additional hosts by specifying them with the --allow-websocket-origin option:"

bokeh serve myapp.py --allow-websocket-origin foo.com:8081

Check your bokeh server log and it should say that the WS connection request was denied due to this. Could be the host machine IP (or all of them since you're deploying with kubernetees), not sure how your setup is but this could help.

On Sunday, September 16, 2018 at 6:16:54 PM UTC+2, Venugopal Madathil wrote:
Hi

Could anyone help me out here?

connection.js:55 WebSocket connection to 'ws://myappurl/ws?bokeh-protocol-version=1.0&bokeh-
session-id=asdf' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET t.connect @ connection.js:55
(anonymous) @ connection.js:286
(anonymous) @ es6-promise.js:406
e @ es6-promise.js:801
o.pull_session @ connection.js:272
(anonymous) @ server.js:33
i.add_document_from_session @ server.js:45
(anonymous) @ index.js:46
(anonymous) @ index.js:25

connection.js:287 [bokeh] Failed to connect to Bokeh server Error: Could not open websocket

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/56540406-1225-4847-9671-80acd705f5d2%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.