I am facing the same issue on RedHat 6 as the topic thread above,
I can open the Shiny server webpage but not able to execute sample "hello" program. Did you get any solution for this if yes please share ?
Do you have set proper permissions for shiny user?
sudo groupadd shiny-apps
sudo usermod -aG shiny-apps your_user # Put your regular user here
sudo usermod -aG shiny-apps shiny
cd /srv/shiny-server
sudo chown -R your_user:shiny-apps . # Put your regular user here
sudo chmod -R g+w .
sudo chmod -R g+s .
And, have you checked that the symlinks to the sample apps are working? you can repair the symlinks with something like this
Thank you for your reply... I have kept everything in my local directory and executed your mentioned commands. Still I am facing same issue. Could you please let me know how should be my config file ?
By my local directory means any other directory on which my user id "kapil" has accesses. I have executed 3 times with respective users as "root", "shiny", "kapil" with respective changes in conf file everytime it got failed. Can you please let me know what should be my user (I would like to keep it as "kapil") and permission level on directories ?
I'm still confused about what you are saying, this thread is about running apps on shiny-server, so you can access them from a browser with an address like http://your_server_ip:3838/your_app_folder. That address points to the folder specified on the site_dir variable (/srv/shiny-server by default), and runs the app on a new R session for the run_as user (shiny by default).
A default configuration file looks like this
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.
directory_index on;
}
}
What modifications have you done? and what exactly are you trying to do?
Apologies for confusion.
In first run I haven't made any changes. I have kept the config file as default.
I can open the Shiny welcome pages but when I click on /sample-apps/hello/. It is giving me below error.
When you try to access this in your browser http://your_server_ip:3838/sample-apps/hello/ What your logs say?
You can find the logs for each one of your apps in this folder /var/log/shiny-server
That error is system specific, I have never worked with RedHat but if systemctl doesn't work for you, try with this other command for checking the status of your shiny-server
The simplest way is to change user in shiny config file
from run_as shiny;
to whatever user you use when you test your project in Rstudio. In this case you don't need to install all needed packaged again every time.
Also, this helps to track detailed error messages - they go directly to browser and it says what packages you miss:
options(shiny.sanitize.errors = FALSE)