Website for RStudio Package Manager is taking too long to respond

Configuration

I successfully installed newest RStudio Package manager on virtual machine (Ubuntu 18.04 - Bionic).

$ cat /opt/rstudio-pm/VERSION

1.1.0.1-17

I am able to see in logs and status is active and fine (without errors):


$ tail -f /var/log/rstudio-pm.log

2020/01/28 09:10:37 Using HTTPS_PROXY from configuration

2020/01/28 09:10:37 Starting licensing...

2020/01/28 09:10:37 Usage data enabled.

2020/01/28 09:10:37 Added trailing slash to the configured server address: http://IP_ADDR/

2020/01/28 09:10:37 Attempting to detect R version in a user namespace sandbox.

2020/01/28 09:10:37 Detected R version 3.6.2 at /usr/lib/R/bin/R

2020/01/28 09:10:37 Starting launcher process.

2020/01/28 09:10:37 Warning: SSL is not configured. Using Package Manager over insecure HTTP is not recommended.

2020/01/28 09:10:37 Starting admin service using sock file /var/run/rstudio-pm/rstudio-pm.sock

2020/01/28 09:10:37 Starting HTTP listener on :4242

or


$ systemctl status rstudio-pm.service

● rstudio-pm.service - RStudio Package Manager

   Loaded: loaded (/lib/systemd/system/rstudio-pm.service; enabled; vendor preset: enabled)

  Drop-In: /etc/systemd/system/rstudio-pm.service.d

           └─user.conf

   Active: active (running) since Tue 2020-01-28 09:10:36 CET; 7h ago

And my config file:


[Server]

Address = http://IP_ADDR

RVersion = /usr/lib/R/

[HTTP]

Listen = :4242

[Proxy]

URL = http://PROXY_ADDR.com:8080/

Problem

But i am not able to reach website:

http://IP_ADDR:4242/

is getting response:

The connection has timed out

The server at IP_ADDR is taking too long to respond.

but on the same machine is running apache and default page :80 is working fine, so i am confused. And i tried to redirect in apache to :80 but with same result (too long to respond)

Questions

Is something what i need to reconfigure ?

Can cause these problems proxy ?

Thanks for any advice

Solution

In the meantime I found solution. Maybe is blocked ports or something so i redirect via apache2. Useful docs https://support.rstudio.com/hc/en-us/articles/200552326-Running-RStudio-Server-with-a-Proxy

Create config file for apache and redirect port (localhost:4242 -> output:80)

/etc/apache2/sites-available/rspm.conf
<VirtualHost *:80>
 <Proxy *>
    Allow from localhost
  </Proxy>
   RewriteEngine on
   RewriteCond %{HTTP:Upgrade} =websocket
   RewriteRule /(.*)     ws://localhost:4242/$1  [P,L]
   RewriteCond %{HTTP:Upgrade} !=websocket
   RewriteRule /(.*)     http://localhost:4242/$1 [P,L]
   ProxyPass / http://localhost:4242/
   ProxyPassReverse / http://localhost:4242/
   ProxyRequests Off
</VirtualHost>

Enable apache2 configuration in console:

a2enmod rewrite
a2enmod ssl
a2enmod proxy
a2enmod proxy_http
a2enmod proxy_connect

a2enmod headers

enable site:
    a2ensite rspm.conf
disable default site:
    a2dissite 000-default.conf
restart apache2:
    systemctl restart apache2    
    systemctl reload apache2
    systemctl status apache2

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