WebSocket issue within corporate environment

424 views
Skip to first unread message

Chris Beeley

unread,
Jan 4, 2017, 6:59:56 AM1/4/17
to Shiny - Web Framework for R
Hello-

I've just updated to the newest version of Shiny Server for Ubuntu 14.04 and now find that my Shiny applications (including the demo one included with Shiny Server) crash, i.e. grey out, within the corporate environment I need to access them from, but not from a normal browser. The server itself isn't in a corporate environment, it's just a normal Linux server in the cloud, but I work in a large organisation and people need to access the application from the machines there. I set up the server to listen on port 8080 again because of the corporate environment, it blocks 3838 and other non-standard ports.

The error messages from the JavaScript console of Chrome are as follows:

WebSocket connection to 'ws://109.74.194.173:8080/sample-apps/rmd/__sockjs__/n=uQE4hU1BhPyKPR49Vq/660/tmdibuuk/websocket' failed: WebSocket is closed before the connection is established.

(index):1 WebSocket connection to 'ws://109.74.194.173:8080/sample-apps/hello/__sockjs__/n=kKTgeUnbmB8ojlDEdh/791/39gkfj_6/websocket' failed: WebSocket is closed before the connection is established.

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:55 GMT+0000 (GMT Standard Time) [INF]: Error: WebSocket closed

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:55 GMT+0000 (GMT Standard Time) [INF]: Connection closed. Info: {"isTrusted":false}

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:55 GMT+0000 (GMT Standard Time) [DBG]: SockJS connection closed

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:55 GMT+0000 (GMT Standard Time) [DBG]: Channel 0 is closed

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:55 GMT+0000 (GMT Standard Time) [DBG]: Removed channel 0, 0 left

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:56 GMT+0000 (GMT Standard Time) [INF]: Error: WebSocket closed

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:56 GMT+0000 (GMT Standard Time) [INF]: Connection closed. Info: {"isTrusted":false}

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:56 GMT+0000 (GMT Standard Time) [DBG]: SockJS connection closed

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:56 GMT+0000 (GMT Standard Time) [DBG]: Channel 0 is closed

shiny-server-client.min.js:1 Wed Jan 04 2017 11:47:56 GMT+0000 (GMT Standard Time) [DBG]: Removed channel 0, 0 left


They're similar in IE9, the other browser I need to get this working in, but not as informative.


Any ideas?

Bill Nussbaumer

unread,
Jan 4, 2017, 2:17:16 PM1/4/17
to Shiny - Web Framework for R
I also had issues accessing a Shiny server I built in the cloud from within the corporate firewall. I finally solved them by using Apache to host the sites securely over TLS (https://) and our firewall was happy once again. Maybe you can try the same.

Joe Cheng

unread,
Jan 4, 2017, 2:20:56 PM1/4/17
to Bill Nussbaumer, Shiny - Web Framework for R
You might try adding the directive "disable_websockets;" into /etc/shiny-server/shiny-server.conf, and reload or restart Shiny Server.

Can you send the IE9 errors as well?

On Wed, Jan 4, 2017 at 11:17 AM Bill Nussbaumer <bill...@gmail.com> wrote:
I also had issues accessing a Shiny server I built in the cloud from within the corporate firewall. I finally solved them by using Apache to host the sites securely over TLS (https://) and our firewall was happy once again. Maybe you can try the same.

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/2a5f8529-b005-4eb9-8464-86681b8747fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Beeley

unread,
Jan 10, 2017, 6:10:44 AM1/10/17
to Joe Cheng, Bill Nussbaumer, Shiny - Web Framework for R
So after lots of trial and error I found that this problem, too, was caused by various websocket-y protocols that weren't playing nicely. In order to get it working on IE9, I had to disable xdr-polling. However, Google Chrome also required disabling of xhr-streaming, iframe-eventsource and iframe-htmlfile.

I can't offer any insight into what on Earth is going on, I'm afraid, but I offer this in the hope that it helps someone else with the same problem.

Thanks to all.

You received this message because you are subscribed to a topic in the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/shiny-discuss/Iz3kzHPLs_k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/CAF_jjKo1u%3Ds0gzHJ1psYRD6MgV1VEpZ42oyRtBEP6fB%3DCb%3D66g%40mail.gmail.com.

Joe Cheng

unread,
Jan 10, 2017, 10:52:50 AM1/10/17
to Chris Beeley, Bill Nussbaumer, Shiny - Web Framework for R
Wow, that's crazy. You might turn to using TLS/SSL, as that often cures these problems (assuming that the corporate proxy lets the traffic through at all, there's not much it can do to screw things up).

Chris Beeley

unread,
Jan 10, 2017, 11:02:37 AM1/10/17
to Joe Cheng, Bill Nussbaumer, Shiny - Web Framework for R
Having no experience of SSL I'm a little intimidated, but I guess I'll have to learn eventually. I'll have a go and report back if it gets things working normally.

Thanks.
Reply all
Reply to author
Forward
0 new messages