Shiny Server on Centos configuration - r

I recently installed shiny-server on my Centos 7 server. (centos-release-7-2.1511.el7.centos.2.10.x86_64)
I am unable to get the server started however, and it appears it's not looking for the right config file on boot. I have my my shiny-server.conf file in the default location of /etc/shiny-server/shiny-server.conf
Trace:
[2016-08-03 00:25:52.907] [INFO] shiny-server - Shiny Server v1.4.2.786 (Node.js v0.10.40)
[2016-08-03 00:25:52.911] [INFO] shiny-server - Using config file "/root/start"
[2016-08-03 00:25:52.926] [ERROR] shiny-server - Error loading config: File "/root/start" does not exist
[2016-08-03 00:25:52.926] [INFO] shiny-server - Shutting down worker processes
Apparently it's just looking in root/start?
Any help would be greatly appreciated

You could use sudo systemctl start shiny-server

Related

How can I deploy shiny in docker?

I have a shiny app that is running on an EC2 instance that I'd like to deploy in docker. Running the shiny app on localhost (so the EC2 instance) works fine, albeit it takes ~5 minutes to load.
However, I've been told to run the following command to get the website running:
sudo docker run --rm -p $PORT:1234 --mount type=bind,source=/mnt/compbio/jupyter_s3contents/web/dashboard,target=/srv/shiny-server/ --mount type=bind,source=/mnt/compbio/jupyter_s3contents/,target=/home/rstudio/compbio/ --mount type=bind,source=/var/log/shiny-server/,target=/var/log/shiny-server/ shiny
However, all I get is the following output, and it doesn't run beyond this point.
[2020-11-10T15:25:36.498] [INFO] shiny-server - Shiny Server v1.5.13.944 (Node.js v12.15.0)
[2020-11-10T15:25:36.503] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2020-11-10T15:25:36.533] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
[2020-11-10T15:25:36.536] [INFO] shiny-server - Starting listener on http://[::]:1234```
I am new to docker, any idea what I am doing wrong here?

Shiny server: application failed to start on AWS

I am having trouble deploying my own shiny apps to an AWS server. I followed these instructions to a tee. I was able to install shiny and see the example applications working on my server. However when I try to launch my own app, I see the error messages:
"An error has occurred
The application failed to start.
The application exited during initialization."
According to many forums, for example this one, I need to adjust the permissions in the /etc/shiny-server/shiny-server.conf file from run_as shiny; to run_as myusername shiny. I tried this, but it didn't work.
My log looks like this:
cat /var/log/shiny-server.log
[2018-05-15T08:25:18.770] [INFO] shiny-server - Shiny Server v1.5.7.907 (Node.js v8.10.0)
[2018-05-15T08:25:18.772] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2018-05-15T08:25:18.827] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
[2018-05-15T08:25:18.831] [INFO] shiny-server - Starting listener on 0.0.0.0:3838
[2018-05-15T08:25:32.474] [INFO] shiny-server - Created bookmark state directory: /var/lib/shiny-server/bookmarks
[2018-05-15T08:25:32.475] [INFO] shiny-server - Created user bookmark state directory: /var/lib/shiny-server/bookmarks/shiny
[2018-05-16T22:31:45.674] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T22:40:21.378] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T22:40:54.257] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T22:42:02.326] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T22:42:14.474] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T22:44:18.246] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T22:56:41.494] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T23:00:17.853] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T23:09:32.642] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T23:15:39.846] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T23:16:04.410] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T23:23:36.596] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T23:26:43.907] [INFO] shiny-server - Stopping listener on 0.0.0.0:3838
[2018-05-16T23:26:43.907] [INFO] shiny-server - Shutting down worker processes (with notification)
[2018-05-16T23:26:56.234] [INFO] shiny-server - Shiny Server v1.5.7.907 (Node.js v8.10.0)
[2018-05-16T23:26:56.237] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2018-05-16T23:26:56.295] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
[2018-05-16T23:26:56.298] [INFO] shiny-server - Starting listener on 0.0.0.0:3838
[2018-05-16T23:27:00.502] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T23:30:22.786] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-16T23:31:25.808] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2018-05-17T00:35:40.060] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
Also when I type shiny-server I see:
Using config file "/etc/shiny-server/shiny-server.conf"
[2018-05-17T01:17:12.659] [ERROR] shiny-server - Error loading config: The user 'ubuntu' does not have permissions to run applications as one of the users in 'shiny'. Please restart shiny-server as one of the users in 'shiny'. (/etc/shiny-server/shiny-server.conf:2:1)
Config file:
cat /etc/shiny-server/shiny-server.conf
# Instruct Shiny Server to run applications as the user "shiny"
run_as ubuntu;
# 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;
}
}
sanitize_errors off;
Any help would be greatly appreciated. I feel like I am so close to finally launching my app!
As your error says the user ubuntu isn't allowed to start shiny apps. Make sure to login as sudo, try something below. if that doesn't work check that the shiny app is installed globally with sudo access
sudo -i
sudo systemctl restart shiny-server
or try stopping and starting it
sudo systemctl stop shiny-server
sudo systemctl start shiny-server
Im running ubuntu on my server btw

Shiny-server looking for config file in wrong path

After our server being offline all weekend I'm trying to restart our shiny server. This is run on a mac, in the terminal I'm running
sudo shiny-server start
but I'm getting a strange error
[2018-03-26 13:43:12.370] [INFO] shiny-server - Shiny Server v1. 5. 7.0
(Node.js v6.10.3)
[2018-03-26 13:43:12.373] [INFO] shiny-server - Using config file
"/Users/rgraves/start"
[2018-03-26 13:43:12.387] [ERROR] shiny-server - Error loading config: File
"/Users/rgraves/start" does not exist
[2018-03-26 13:43:12.387] [INFO] shiny-server - Shutting down worker processes
Obviously this is telling me the config file doesn't exist, which is true in this location. It exists exactly where I would expect it to at
/etc/shiny-server/shiny-server.conf
Why would shiny server not be using the default location for the config file? and how can I change it back to what it was before?

Permissions Error in Starting R Shiny Server

I had Shiny loaded on my Ubunto 14.04 machine and it was working fine. I just upgraded to 16.04 LTS and now it no longer works. I have reinstalled Shiny and followed the instructions here, to no avail.
I have made a user group called shiny-apps that has read-write permissions for my web apps:
owner#shiny-smith:/srv/shiny-server$ ls -l
total 0
lrwxrwxrwx 1 owner shiny-apps 33 Jul 13 2015 DroughtNet -> /home/owner/Documents/DroughtNet/
lrwxrwxrwx 1 owner shiny-apps 38 Jul 13 2015 index.html -> /opt/shiny-server/samples/welcome.html
lrwxrwxrwx 1 owner shiny-apps 37 Jul 13 2015 sample-apps -> /opt/shiny-server/samples/sample-apps
and both 'shiny' and 'owner' are members of shiny-apps group:
owner#shiny-smith:/srv/shiny-server$ groups owner
owner : owner adm cdrom sudo dip plugdev lpadmin sambashare shiny-apps
owner#shiny-smith:/srv/shiny-server$ groups shiny
shiny : shiny shiny-apps
However, checking the shiny-server still shows a permissions error:
owner#shiny-smith:~$ shiny-server
[2016-12-30 14:29:38.608] [INFO] shiny-server - Shiny Server v1.5.1.834 (Node.js v6.9.1)
[2016-12-30 14:29:38.612] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2016-12-30 14:29:38.648] [ERROR] shiny-server - Error loading config: The user 'owner' does not have permissions to run applications as one of the users in 'shiny'. Please restart shiny-server as one of the users in 'shiny'. (/etc/shiny-server/shiny-server.conf:2:1)
[2016-12-30 14:29:38.648] [INFO] shiny-server - Shutting down worker processes
and if I add 'owner' to the shiny server config, that doesn't fix the issue:
owner#shiny-smith:~$ sudo nano /etc/shiny-server/shiny-server.conf
owner#shiny-smith:~$ sudo systemctl restart shiny-server
owner#shiny-smith:~$ shiny-server
[2016-12-30 14:30:54.580] [INFO] shiny-server - Shiny Server v1.5.1.834 (Node.js v6.9.1)
[2016-12-30 14:30:54.584] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2016-12-30 14:30:54.621] [ERROR] shiny-server - Error loading config: The user 'owner' does not have permissions to run applications as one of the users in 'owner,shiny'. Please restart shiny-server as one of the users in 'owner,shiny'. (/etc/shiny-server/shiny-server.conf:2:1)
[2016-12-30 14:30:54.621] [INFO] shiny-server - Shutting down worker processes
Can someone help me figure out where the issue is?

Shiny server: application failed to start

I have installed the shiny server on another ubuntu ip and using it through putty on windows. But the application is failing to start as you can see on the right column (An error has occured in bold). What configuration should I make to start the application on the shiny server? Please help.
I have opened the whole path to the R file in linux and the permissions are granted to the R file. Still not working.
Moreover, when I try to open the shiny-server.config file in etc/shiny-server/shiny-server.config , it shows:
[2015-08-19 12:13:59.666] [INFO] shiny-server - Shiny Server v1.4.0.721 (Node.js v0.10.21)
[2015-08-19 12:13:59.669] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2015-08-19 12:13:59.750] [ERROR] shiny-server - Error loading config: The user 'hadoop' does not have permissions to run applications as one of the users in 'shiny'. Please restart shiny-server as one of the users in 'shiny'. (/etc/shiny-server/shiny-server.conf:2:1)
[2015-08-19 12:13:59.751] [INFO] shiny-server - Shutting down worker processes
The line Error loading config: The user 'hadoop' does not have permissions to run applications as one of the users in 'shiny'. Please restart shiny-server as one of the users in 'shiny'. (/etc/shiny-server/shiny-server.conf:2:1)
says that you are trying to start shiny-server as a user named hadoop and this is not possible because the only user who can start this shiny-server is shiny and this is written in the second line of /etc/shiny-server/shiny-server.conf file. Try to edit beggining of this file from
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
to
# Instruct Shiny Server to run applications as the user "shiny"
run_as hadoop shiny;

Resources