Open bapoorva opened 7 years ago
@bapoorva
The issue is most likely with run_as :HOME_USER;
in your configuration. :HOME_USER:
only applies to hosting models that run applications from user's directories. Please refer to this section of Admin Guide:
http://docs.rstudio.com/shiny-server/#home_user
If you want to use site_dir
you need to define an actual user (by default shiny
) as the run_as
user.
Or you can use :HOME_USER:
but change your hosting model to user_dirs
. Please refer to this section of Admin Guide for more on this:
http://docs.rstudio.com/shiny-server/#let-users-manage-their-own-applications
I initially kept the default config and ran it as run_as shiny. Then I changed it to user. But it does not work. I got same error in the log file even after restarting.
If i change the hosting model to user_dirs
like you mentioned, is says "page not found"
OK, there could be other thing wrong as well, but that was the first thing that needed to be fixed.
When you switch to using user_dirs
the URL to access the application changes. For example assume this is your configuration:
server {
listen 3838;
location / {
user_dirs;
}
}
ShinyApps
directory in user's home directory. Let's say you have app1 as your application:/home/username/ShinyApps/app1
(substitute actual username)
http://localhost:3838/username/app1
(substitute actual username)
Let's see if this works, or using site_dir
with run_as shiny;
.
Yes. I did that. my username is user. I switched to user_dirs using sudo opt/shiny-server/bin/deploy-example user-dirs
, copied my app to ~/ShinyApps and used the url http://hostname:3838/user/app
. It gave me a "page not found error"
Then I switched to site_dir
using sudo opt/shiny-server/bin/deploy-example default
and ran it with both run_as shiny
and run_as user
, this time using the url http://hostname:3838/Sample-Apps/app
. A copy of the same app is present in the shiny-server dir. Both times, i got
An error has occurred
The application failed to start.
The application exited during initialization.
I checked my firewall. i have given all permissions. I am at a loss.
shiny-server.conf
file:preserve_logs true;
/var/log/shiny-server
directory if you are using site_dir
, or /home/user/ShinyApps/logdirectory if you are using
user_dirs`.
I downloaded shiny-server and i am trying to configure it. But it keeps failing.
This is my shiny-server.config
I checked my firewall settings and gave this command
Yet I'm getting this error
This is how my log file looks
What is going on here ? how do I fix this ?