2
votes

I am having an incredibly difficult time getting my Shiny app to run in Shiny Server (on Ubuntu 16.04). I followed the instructions on R-Studio's website installing R and Shiny Server on Ubuntu. Running the status command shows that shiny server is running.

enter image description here

My shiny app (which works fine on my windows machine) is found in the /srv/shiny-server/HealthCheck directory.

I am trying to run this locally (not hosting on an outside web server etc), I have tried many different ways to access the app, but all have failed with either "page not found" errors or "could not connect to.." errors. I have tried accessing the app through these methods in Firefox:

http://localhost:3838/srv/shiny-server/HealthCheck

http://ipaddress:3838/srv/shiny-server/HealthCheck

http://localhost:3838/HealthCheck

http://ipaddress:3838/HealthCheck

I have tried different ports, adding and removing server_name to config file. I have tried turning on logging but nothing ever writes to the /var/log/shiny-server folder, making this hard to troubleshoot.

Any help would be greatly apprecitated. I assume i am making some simple mistake here, but cant seem to figure this one out. Here is my shiny config file:

run_as shiny;

# Define a server that listens on port 3838
server {
      listen 3838;
    server_name localhost;

    location /HealthCheck {
     app_dir /srv/shiny-server/HealthCheck;
    log_dir /var/log/shiny-server;
     simple_scheduler 15;
        }
}

preserve_logs true;
1

1 Answers

0
votes

I figured this out for anyone else who has a similar issue. Specifying the port alone wasn't enough when running as localhost. I also specified the localhost IP and then it worked.

listen 3838 127.0.0.1;