shiny-server - HTTP server error (0.0.0.0:3838): listen EADDRINUSE

2,516 views
Skip to first unread message

Christopher Meaney

unread,
Dec 6, 2013, 11:29:49 PM12/6/13
to shiny-...@googlegroups.com
Hi I've tried to set up shiny server a number of different ways with no success:

http://www.rstudio.com/shiny/server/install-opensource
https://github.com/rstudio/shiny-server/wiki/Ubuntu-step-by-step-install-instructions
http://withr.me/blog/2013/07/23/configure-shiny-server-under-ubuntu/
http://withr.me/blog/2013/08/05/configure-shiny-server-under-virtual-machine/

Essentially, I follow the step by step instructions listed in each URL above. When I start shiny-server with the following commands I get the following error:

sudo start shiny-server
sudo shiny-server

[2013-12-06 23:06:09.171] [INFO] shiny-server - Shiny Server v0.4.0.15 (Node.js v0.10.21)
[2013-12-06 23:06:09.174] [INFO] shiny-server - Using config file "/opt/shiny-server/config/default.config"
[2013-12-06 23:06:09.222] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
[2013-12-06 23:06:09.225] [INFO] shiny-server - Starting listener on 0.0.0.0:3838
[2013-12-06 23:06:09.231] [ERROR] shiny-server - HTTP server error (0.0.0.0:3838): listen EADDRINUSE
[2013-12-06 23:06:09.236] [INFO] shiny-server - Shutting down worker processes

When I try to see what's going on on port 3838 I get:

netstat -lpt

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:3838                  *:*                     LISTEN      -              
tcp        0      0 localhost:domain        *:*                     LISTEN      -              
tcp        0      0 localhost:ipp           *:*                     LISTEN      -


Some details about my install:

My configuration script is located at: /opt/shiny-server/config/default.config. It looks like:

run_as shiny;

server {
  listen 3838;

  location / {
    site_dir /srv/shiny-server;
    log_dir /var/log/shiny-server;
    directory_index on;
  }
}

I am trying to host the simple 01_hello shiny example app over the web.

I put the ui.r and server.r files in the following location: /srv/shiny-server/01_hello.

My log file is located at: /var/log/shiny-server. Something does get written to these locations. The log for one run looks like this:

Listening on port 56201
Execution halted


A bit about my system:
Running Linux Ubuntu 12.04 OS via Virtual Box on a Mac OS X system. Platform: x86_64-pc-linux-gnu (64-bit). I have loaded R 3.02 on Ubuntu. I am using shiny version 0.80. I have shiny-server version 0.4.0.15 downloaded using gdebi.  


If I go to Firefox (on Ubuntu Virtual Box) and enter the URL http://<hostname>:3838/01_hello, I believe it or not, actually see a functional app. However, if I try the same on Safari in Mac OS X, I get:

"Safari can't open page http://<hostname>:3838/01_hello/" because the server where the page is located is not responding.

I have little/no Ubuntu experience or networking experience. Can someone help explain what is going on? And why I can't host a simple app using shiny-server when I follow the step by step instructions listed above. Thanks in advance. 







 
 









Christopher Meaney

unread,
Dec 7, 2013, 5:50:06 PM12/7/13
to shiny-...@googlegroups.com
Figured it out. Changed Virtual Box network settings to Bridged connection. Now things appear to be working. Thanks.
Reply all
Reply to author
Forward
0 new messages