Running remotely

I am trying to solve a problem for a user on our compute cluster Rstudio servers.

We are set up so that a user gets access to one of 10 or so servers that run Rstudio by logging into a terminal shell. They are then able to connect to Rstudio from a browser using the https link provided them after they log in.
I am testing this issue. In Rstudio I run these 2 commands:


then I get this response

Listening on

and also a window that looks like a webpage but it is greyed out and I can't do anything in it.

I think this may be related to needing to tell Rstudio and/or shiny the correct place to "Listen" but I could not find any documentation on the process of setting up on a remote server.

I am a sysadmin and not an R programmer. Can someone point me in the right direction? I tried the tutorials but they are about writing shiny apps and not about this kind of detail. Thanks.

Lois Bennett, MSEE
Senior System Administrator
Channing Division of Network Medicine, Brigham & Women's Hospital
A Teaching Affiliate of Harvard Medical School and Harvard School of Public Health

From reading the manual, and pro version manual it appears that the way it is supposed to work is that the instance should run on the server IP address, not localhost, the way that it does work on a standalone system.

If you have a pro version, taking advantage of the paid support will be the quickest way to troubleshoot this. If not, this is probably the best source.

The difficulty I see is that there are many configuration options that may involve having to share information about your internal network to resolve—something that's probably not an option.

I don't have a server installation to test this with you offline. I will flag this for moderator attention to see if someone has ideas as to a way forward.

(I've been a big fan of your institution since I was born there in 1947.)

1 Like

From your description it's not entirely clear what your setup is. For example, are you using RStudio Server open source (or the Pro version)?

My completely wild guess is that perhaps you are blocking websockets on your network. By default Shiny uses websockets to communicate with the browser, but this can be changed (see for example this). (You could possibly inspect the JavaScript console for errors to confirm this.)

By the way the localhost address where shiny is listening is normal behaviour, and you should not need to modify this at all.

Thank you. Sorry I did not specify that we are using the open-source version. I do have the error

shinyapp.js:83 WebSocket connection to 'wss://' failed: Error during WebSocket handshake: Unexpected response code: 404

One solution they suggest is

including the directive disable_websockets; in your shiny-server.conf

I can't find a shiny-server.conf file. We don't, at the current time, have a server dedicated to shiny. When the user wants shiny they log into one of the compute servers that has Rstudio, run Rstudio and load the shiny libraries.

From a cursory look at the docs that is not the standard practice.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.