shiny-server running, but can't restart/stop

887 views
Skip to first unread message

Erich Seamon

unread,
Mar 22, 2018, 4:38:06 PM3/22/18
to Shiny - Web Framework for R

I'm running an instance of shiny-server on RHEL 6.9.  My instance of shiny-server has been running fine, and actually is running right now, but I can't restart.start.stop.

I have both /etc/init/shiny-server.conf and /etc/shiny-server/shiny-server.conf files, which are listed below.

When using the command 'sudo restart shiny-server', i get 'unknown job: shiny-server' (which is odd since RHEL 6 is supposed to be managed using Upstart, but i guess not)

However when i use sudo shiny-server restart - i get:

[2018-03-22 13:20:36.939] [INFO] shiny-server - Shiny Server v1.2.3.368 (Node.js v0.10.21)
[2018-03-22 13:20:36.942] [INFO] shiny-server - Using config file "/etc/shiny-server/restart"
[2018-03-22 13:20:36.951] [ERROR] shiny-server - Error loading config: File "/etc/shiny-server/restart" does not exist
[2018-03-22 13:20:36.952] [INFO] shiny-server - Shutting down worker processes

Which tells me that my system is NOT using Upstart, but using /etc/shiny-server/shiny-server.conf, right? When i just use 'sudo shiny-server', i get:

[2018-03-22 13:21:43.217] [INFO] shiny-server - Shiny Server v1.2.3.368 (Node.js v0.10.21)
[2018-03-22 13:21:43.220] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2018-03-22 13:21:43.260] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
[2018-03-22 13:21:43.264] [INFO] shiny-server - Starting listener on 0.0.0.0:3838
[2018-03-22 13:21:43.269] [ERROR] shiny-server - HTTP server error (0.0.0.0:3838): listen EADDRINUSE
[2018-03-22 13:21:43.270] [INFO] shiny-server - Shutting down worker processes

Which tells me that there is already an instance running on this port (which there is).  However that same syntax with 'restart' or 'stop' or 'start' gives me an 'error loading config'

systemctl doesn't work on my version of RHEL. (command not found) - i'm assuming its using systemd

my /etc/shiny-server/shiny-server.conf:


# 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;
  }
}

my /etc/init/shiny-server.conf

# shiny-server.conf
R = /usr/bin/R
PATH=/nethome/erichs/R/x86_64-redhat-linux-gnu-library/3.2

description "Shiny application server"

start on runlevel [2345]
stop on runlevel [016]

limit nofile 1000000 1000000

post-stop exec sleep 5

exec shiny-server --pidfile=/var/run/shiny-server.pid >> /var/log/shiny-server.log 2>&1

respawn limit 3 25

respawn



#---------

A few notes:  I upgraded my version of R to 3.4.  However shiny is pointing to libraries under 3.2.  My shiny server actually runs fine, so i'm assuming this isn't an issue, even though i should switch this out. I just can't restart.stop?  Starting R at command line pulls up 3.4.  My Rstudio server runs fine using 3.4

To me, this seems like an issue around Upstart and /etc/shiny-server/shiny-server.conf.  Should i put the contents of Upstart script in my /etc/shiny-server/shiny-server.conf file?  I never had this issues previously - so maybe the R upgrade did cause an issue?

lsb_release --id --short   --> RedHatEnterpriseServer

Anyway thanks for any help or suggestions, and my apologies if Im just missing something that is super simple.  I hope thats the issue!
Reply all
Reply to author
Forward
0 new messages