Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restart shiny-server on centos

I have shiny-server installed and I am using it to host my shiny apps installed on a centos server. I'm pretty sure its installed correctly because it was working as expected until the server crashed, since the server recently crashed I need to restart shiny-server.

I tried both:

sudo systemctl restart shiny-server 

and

sudo systemctl restart shiny-server.service 

but I get the error message:

Failed to issue method call: Unit shiny-server.service failed to load: No such file or directory.

However I can see the file shiny-server.service in the folder I am running the command from. Does anyone know why this is or what I should do to fix it?

If it helps the shiny-server.service file is located in the directory /opt/shiny-server/config/systemd/shiny-server.service

like image 723
clairekelley Avatar asked Apr 07 '16 20:04

clairekelley


People also ask

Where is Shiny server config?

This is the default configuration that Shiny Server will use until you provide a custom configuration in /etc/shiny-server/shiny-server. conf . This guide will show you how to serve multiple applications from a single directory on disk -- /srv/shiny-server/ .

Can you run Shiny app locally?

You might be eager to deploy your Shiny app to a remote server. But the simplest way to run a Shiny app is to run it locally. You only need the shiny R package installed, and you can run the app in your browser. In this post you'll see a few ways of how to organize your files to be served locally.

How do I run a Shiny code in R?

Open the app. R script in your RStudio editor. RStudio will recognize the Shiny script and provide a Run App button (at the top of the editor). Either click this button to launch your app or use the keyboard shortcut: Command+Shift+Enter (Control+Shift+Enter on Windows).


1 Answers

It sounds like the service has not been registered.

Try;

chkconfig --list shiny-server it should return something like;

shiny-server 0:off 1:off 2:off 3:on 4:off 5:off 6:off

If nothing comes back then you need to chkconfig --add shiny-server then re run the above commands to verify its registered, then you should be able to access it via the service manager.

  • I'm presuming the service is called shiny-server but if not replace it with the correct name.

This link may also provide some additional info.

like image 169
user3788685 Avatar answered Oct 13 '22 14:10

user3788685