rstudio / shiny-server

Host Shiny applications over the web.
https://rstudio.com/shiny/server
Other
712 stars 290 forks source link

Failing to Start on RHEL 7 #382

Open aminadibi opened 5 years ago

aminadibi commented 5 years ago

Hi shiny-server and Linux gurus!

Just installed shiny-server-1.5.9.923-x86_64 on a new RHEL 7 machine, but I can't see the test page :/

Following installation, I opened port 80 with:

firewall-cmd --permanent  --zone=public --add-port=80/tcp
firewall-cmd --reload

which has apparently worked:

 sudo iptables-save | grep 80
-A IN_public_allow -p tcp -m tcp --dport 80 -m conntrack --ctstate NEW -j ACCEPT

here's the output for netstat, seems like it's' not listening to port 80,

sudo  netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1569/master
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1117/sshd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1125/cupsd
udp        0      0 127.0.0.1:323           0.0.0.0:*                           779/chronyd

And the status command:

sudo systemctl status shiny-server

 shiny-server.service - ShinyServer
   Loaded: loaded (/etc/systemd/system/shiny-server.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Thu 2018-10-18 14:52:19 PDT; 23min ago
  Process: 19655 ExecStopPost=/usr/bin/env sleep 5 (code=exited, status=0/SUCCESS)
  Process: 19642 ExecStart=/usr/bin/env bash -c exec /opt/shiny-server/bin/shiny-server >> /var/log/shiny-server.log 2>&1 (code=exited, status=0/SUCCESS)
Main PID: 19642 (code=exited, status=0/SUCCESS)

Oct 18 14:52:13 ipress systemd[1]: Started ShinyServer.
Oct 18 14:52:13 ipress systemd[1]: Starting ShinyServer...

here's 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;
  listen 80;
  # 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;
  }

}

Disabling firewalld did not work. There are no files in /var/log/shiny-server.

I can ping the server from other machines.

colearendt commented 5 years ago

This sounds like it may be a better fit (and get more readership) on https://community.rstudio.com (maybe R-Admins category?) !

skhadrao commented 5 years ago

Hi shiny-server and Linux gurus!

Just installed shiny-server-1.5.9.923-x86_64 on a new RHEL 7 machine, but I can't see the test page :/

Following installation, I opened port 80 with:

firewall-cmd --permanent  --zone=public --add-port=80/tcp
firewall-cmd --reload

which has apparently worked:

 sudo iptables-save | grep 80
-A IN_public_allow -p tcp -m tcp --dport 80 -m conntrack --ctstate NEW -j ACCEPT

here's the output for netstat, seems like it's' not listening to port 80,

sudo  netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1569/master
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1117/sshd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1125/cupsd
udp        0      0 127.0.0.1:323           0.0.0.0:*                           779/chronyd

And the status command:

sudo systemctl status shiny-server

 shiny-server.service - ShinyServer
   Loaded: loaded (/etc/systemd/system/shiny-server.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Thu 2018-10-18 14:52:19 PDT; 23min ago
  Process: 19655 ExecStopPost=/usr/bin/env sleep 5 (code=exited, status=0/SUCCESS)
  Process: 19642 ExecStart=/usr/bin/env bash -c exec /opt/shiny-server/bin/shiny-server >> /var/log/shiny-server.log 2>&1 (code=exited, status=0/SUCCESS)
Main PID: 19642 (code=exited, status=0/SUCCESS)

Oct 18 14:52:13 ipress systemd[1]: Started ShinyServer.
Oct 18 14:52:13 ipress systemd[1]: Starting ShinyServer...

here's 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;
  listen 80;
  # 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;
  }

}

Disabling firewalld did not work. There are no files in /var/log/shiny-server.

I can ping the server from other machines.

Hello,

I'm having the same issue, have you resolved it ?

colearendt commented 5 years ago

Did you post to community.rstudio.com ? As I mentioned, that is probably a better forum for this discussion, as it seems likely to be a system configuration issue and not a bug in shiny server.

When you post to community, you should include the output of cat /var/log/shiny-server.log , and (if not present) ensure that the directory itself (/var/log) is writable.