How to configure ports used for communication between R and RStudio?

Hello,

First, I'm not a R/RStudio user at all. I'm a Windows admin with the task to configure R and RStudio on a multi-user Citrix environment. To identify users between the multiple sessions, we are using the Palo Alto Terminal Server agent which will allocate a range of ports for each user and use them to identify each users. That's then used to give limited and specific access to resources for each users.

The problem is that the TS Agent also intercept the localhost connection that's created when you start RStudio (process rsession) and RStudio then cannot connect to R. One possible solution to solve this problem is to have control on the ports used when this local session is started.

I have made multiple research on the Internet but I have been unable to find if/how you can change the ports that are used. I have found different config files but none that seem to allow me to fix a single port or a port range.

Any insights on the way to fix the ports for the rsession process so I can better control them? Or another way to look at the problem: do you know the port range used by R/RStudio when they communicate together through the rsession? I can simply avoid using these range with the TS Agent but from my tests, it looks like the port range is huge.

Most likely these are ephemeral ports. The range of these ports depends on the OS and is indeed huge.

BTW, we have had many reports of users having performance problems when installing RStudio Desktop in a Citrix environment. For centralization we recommend the open source RStudio Server or RStudio Workbench.

Thanks a lot for your answer.

As I said, I'm a complete noob with R and RStudio. Could you briefly describe what R Server and R Workbench would offer and what that would mean to me, as an admin setting this up for the users and for the users themselves?

RStudio Server and RStudio Workbench are both products that run on a Linux machine and act as a web server. So the user interacts with it via their browser. The user interface is (almost) the same as the desktop client. For you as an admin the main change would be the operating system. Typically the most challenging part is authentication, since both server products require local Linux accounts for all users. See also RStudio Server vs. RStudio Workbench for a comparison of the free and payed offerings.

Thanks for the additional information. I will discuss about this with the project lead and we will decide what to do. :slight_smile:

This topic was automatically closed 7 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.