rstudio / shiny-server

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

Hello application does not show plot nor rmarkdown in centos #218

Closed madbyem closed 8 years ago

madbyem commented 8 years ago

Hello. I'm configuring Shiny server on Centos 6.4. The hello sample application works partially, but the top-right app doesn't show the plot, and the bottom-right app doesn't work. Please help! Thanks in advance. screenshot from 2016-06-22 17-22-25

fereshtehRS commented 8 years ago

Can you check the browser console? There might be some errors that help diagnose the problem.

madbyem commented 8 years ago

Hi. Sorry, how do I do that? (Chrome)

fereshtehRS commented 8 years ago

From the menu on top right corner: More Tools -> Developer Tools

Or CTRL+Alt+i short cut

And then you can select Console tab or Network tab.

madbyem commented 8 years ago

Console: Wed Jun 22 2016 17:40:04 GMT-0400 (CLT): Connection opened. http://moda.userena.cl/sample-apps/hello/ shiny-server.js:268 Wed Jun 22 2016 17:40:04 GMT-0400 (CLT): Connection opened. http://moda.userena.cl/sample-apps/rmd/

No errors as far as I see...

fereshtehRS commented 8 years ago

You can also check the log files on the server. The main server log is: /var/log/shiny-server.log

And application specific log files are located in /var/log/shiny-server directory. You need to find the correct file that matches your application, and time of loading. You can load the application, and then check the latest file in that directory.

madbyem commented 8 years ago

I just restarted the server (restart shiny-server). Main log is [2016-06-22 17:52:26.815] [INFO] shiny-server - Shiny Server v1.4.2.786 (Node.js v0.10.40) [2016-06-22 17:52:26.817] [INFO] shiny-server - Using pidfile /var/run/shiny-server.pid [2016-06-22 17:52:26.818] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf" [2016-06-22 17:52:26.874] [INFO] shiny-server - Starting listener on 0.0.0.0:80 Port is set to 80 as requested by system administrator.

`> cat hello-shiny-20160622-175322-34336.log

Listening on http://127.0.0.1:34336

Execution halted `

`> cat rmd-shiny-20160622-175322-43246.log

Listening on http://127.0.0.1:43246

Execution halted `

fereshtehRS commented 8 years ago

Let's see if changing the log level would give us more information. Please refer to this section of Admin Guide for instructions on how to change the log level:

http://docs.rstudio.com/shiny-server/#environment-variable-settings

After stopping/starting the server, load the welcome page and check the server log.

madbyem commented 8 years ago

[root@moda shiny-server]# cat /var/log/shiny-server.log [2016-06-23 08:28:47.309] [INFO] shiny-server - Shiny Server v1.4.2.786 (Node.js v0.10.40) [2016-06-23 08:28:47.311] [INFO] shiny-server - Using pidfile /var/run/shiny-server.pid [2016-06-23 08:28:47.312] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf" [2016-06-23 08:28:47.367] [INFO] shiny-server - Starting listener on 0.0.0.0:80 [2016-06-23 08:28:47.371] [DEBUG] shiny-server - No access log configured [2016-06-23 08:28:47.371] [TRACE] shiny-server - Config loaded [2016-06-23 08:30:18.657] [TRACE] shiny-server - Spawning new instance [2016-06-23 08:30:18.660] [TRACE] shiny-server - Launching /srv/shiny-server/sample-apps/hello as shiny with on port 46312 [2016-06-23 08:30:18.663] [TRACE] shiny-server - Starting R [2016-06-23 08:30:18.664] [TRACE] shiny-server - Attempting to connect to port 46312 [2016-06-23 08:30:18.666] [TRACE] shiny-server - Spawning new instance [2016-06-23 08:30:18.667] [TRACE] shiny-server - Launching /srv/shiny-server/sample-apps/rmd as shiny with on port 35764 [2016-06-23 08:30:18.686] [TRACE] shiny-server - Failed to connect to port 46312 [2016-06-23 08:30:18.687] [TRACE] shiny-server - Starting R [2016-06-23 08:30:18.687] [TRACE] shiny-server - Attempting to connect to port 35764 [2016-06-23 08:30:18.699] [TRACE] shiny-server - Failed to connect to port 35764 [2016-06-23 08:30:18.715] [TRACE] shiny-server - Attempting to connect to port 46312 [2016-06-23 08:30:18.716] [TRACE] shiny-server - Failed to connect to port 46312 [2016-06-23 08:30:18.739] [TRACE] shiny-server - Attempting to connect to port 35764 [2016-06-23 08:30:18.740] [TRACE] shiny-server - Failed to connect to port 35764 [2016-06-23 08:30:18.767] [TRACE] shiny-server - Attempting to connect to port 46312 [2016-06-23 08:30:18.769] [TRACE] shiny-server - Failed to connect to port 46312 [2016-06-23 08:30:18.792] [TRACE] shiny-server - Attempting to connect to port 35764 [2016-06-23 08:30:18.792] [TRACE] shiny-server - Failed to connect to port 35764 [2016-06-23 08:30:18.870] [TRACE] shiny-server - Attempting to connect to port 46312 [2016-06-23 08:30:18.870] [TRACE] shiny-server - Failed to connect to port 46312 [2016-06-23 08:30:18.892] [TRACE] shiny-server - Attempting to connect to port 35764 [2016-06-23 08:30:18.892] [TRACE] shiny-server - Failed to connect to port 35764 [2016-06-23 08:30:18.970] [TRACE] shiny-server - Attempting to connect to port 46312 [2016-06-23 08:30:18.971] [TRACE] shiny-server - Failed to connect to port 46312 [2016-06-23 08:30:18.993] [TRACE] shiny-server - Attempting to connect to port 35764 [2016-06-23 08:30:18.994] [TRACE] shiny-server - Failed to connect to port 35764 [2016-06-23 08:30:19.038] [TRACE] shiny-server - Using R version: 3.3.0 [2016-06-23 08:30:19.038] [TRACE] shiny-server - Using shiny version: 0.13.2 [2016-06-23 08:30:19.039] [TRACE] shiny-server - Using rmarkdown version: 0.9.6 [2016-06-23 08:30:19.043] [TRACE] shiny-server - Using R version: 3.3.0 [2016-06-23 08:30:19.043] [TRACE] shiny-server - Using shiny version: 0.13.2 [2016-06-23 08:30:19.044] [TRACE] shiny-server - Using rmarkdown version: 0.9.6 [2016-06-23 08:30:19.072] [TRACE] shiny-server - Attempting to connect to port 46312 [2016-06-23 08:30:19.072] [TRACE] shiny-server - Failed to connect to port 46312 [2016-06-23 08:30:19.095] [TRACE] shiny-server - Attempting to connect to port 35764 [2016-06-23 08:30:19.095] [TRACE] shiny-server - Failed to connect to port 35764 [2016-06-23 08:30:19.172] [TRACE] shiny-server - Attempting to connect to port 46312 [2016-06-23 08:30:19.173] [TRACE] shiny-server - Failed to connect to port 46312 [2016-06-23 08:30:19.196] [TRACE] shiny-server - Attempting to connect to port 35764 [2016-06-23 08:30:19.196] [TRACE] shiny-server - Failed to connect to port 35764 [2016-06-23 08:30:19.273] [TRACE] shiny-server - Attempting to connect to port 46312 [2016-06-23 08:30:19.274] [TRACE] shiny-server - Failed to connect to port 46312 [2016-06-23 08:30:19.297] [TRACE] shiny-server - Attempting to connect to port 35764 [2016-06-23 08:30:19.297] [TRACE] shiny-server - Failed to connect to port 35764 [2016-06-23 08:30:19.299] [TRACE] shiny-server - R process spawned with PID 1835 [2016-06-23 08:30:19.306] [TRACE] shiny-server - R process spawned with PID 1849 [2016-06-23 08:30:19.474] [TRACE] shiny-server - Attempting to connect to port 46312 [2016-06-23 08:30:19.475] [TRACE] shiny-server - Successfully connected to port 46312 after 800ms [2016-06-23 08:30:19.476] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 0 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.476] [TRACE] shiny-server - No clients connected to worker #e886f88929af24f7. Starting timer [2016-06-23 08:30:19.476] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.477] [TRACE] shiny-server - Proxying request: / [2016-06-23 08:30:19.497] [TRACE] shiny-server - Attempting to connect to port 35764 [2016-06-23 08:30:19.498] [TRACE] shiny-server - Successfully connected to port 35764 after 800ms [2016-06-23 08:30:19.498] [TRACE] shiny-server - Worker #2806e03f39247c1a releasing http port. 0 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.498] [TRACE] shiny-server - No clients connected to worker #2806e03f39247c1a. Starting timer [2016-06-23 08:30:19.498] [TRACE] shiny-server - Worker #2806e03f39247c1a acquiring http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.499] [TRACE] shiny-server - Proxying request: / [2016-06-23 08:30:19.530] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 0 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.530] [TRACE] shiny-server - No clients connected to worker #e886f88929af24f7. Starting timer [2016-06-23 08:30:19.548] [TRACE] shiny-server - Worker #2806e03f39247c1a releasing http port. 0 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.548] [TRACE] shiny-server - No clients connected to worker #2806e03f39247c1a. Starting timer [2016-06-23 08:30:19.685] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.686] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.686] [TRACE] shiny-server - Proxying request: /shared/json2-min.js [2016-06-23 08:30:19.687] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.687] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.687] [TRACE] shiny-server - Proxying request: /shared/jquery.min.js [2016-06-23 08:30:19.703] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.703] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.703] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.703] [TRACE] shiny-server - Proxying request: /shared/shiny.css [2016-06-23 08:30:19.704] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.704] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 3 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.704] [TRACE] shiny-server - Proxying request: /shared/shiny.min.js [2016-06-23 08:30:19.705] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.706] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 4 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.706] [TRACE] shiny-server - Proxying request: /shared/ionrangeslider/css/ion.rangeSlider.css [2016-06-23 08:30:19.707] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.707] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 5 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.707] [TRACE] shiny-server - Proxying request: /shared/ionrangeslider/css/ion.rangeSlider.skinShiny.css [2016-06-23 08:30:19.716] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 4 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.721] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 3 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.725] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.725] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 4 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.725] [TRACE] shiny-server - Proxying request: /shared/bootstrap/css/bootstrap.min.css [2016-06-23 08:30:19.735] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 3 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.736] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.737] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.752] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.752] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.752] [TRACE] shiny-server - Proxying request: /shared/ionrangeslider/js/ion.rangeSlider.min.js [2016-06-23 08:30:19.755] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.755] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.755] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.755] [TRACE] shiny-server - Proxying request: /shared/strftime/strftime-min.js [2016-06-23 08:30:19.761] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.762] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 3 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.762] [TRACE] shiny-server - Proxying request: /shared/bootstrap/js/bootstrap.min.js [2016-06-23 08:30:19.763] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.763] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 4 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.764] [TRACE] shiny-server - Proxying request: /shared/bootstrap/shim/html5shiv.min.js [2016-06-23 08:30:19.770] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 3 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.776] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.794] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.795] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.796] [TRACE] shiny-server - Worker #2806e03f39247c1a acquiring http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.796] [TRACE] shiny-server - Proxying request: /shared/shiny.css [2016-06-23 08:30:19.799] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 0 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.799] [TRACE] shiny-server - No clients connected to worker #e886f88929af24f7. Starting timer [2016-06-23 08:30:19.805] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.805] [TRACE] shiny-server - Worker #2806e03f39247c1a acquiring http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.805] [TRACE] shiny-server - Proxying request: /rmd_resources/rmd_loader.css [2016-06-23 08:30:19.807] [TRACE] shiny-server - Worker #2806e03f39247c1a releasing http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.813] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.814] [TRACE] shiny-server - Worker #e886f88929af24f7 acquiring http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.814] [TRACE] shiny-server - Proxying request: /shared/bootstrap/shim/respond.min.js [2016-06-23 08:30:19.819] [TRACE] shiny-server - Worker #2806e03f39247c1a releasing http port. 0 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.819] [TRACE] shiny-server - No clients connected to worker #2806e03f39247c1a. Starting timer [2016-06-23 08:30:19.820] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.821] [TRACE] shiny-server - Worker #2806e03f39247c1a acquiring http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.821] [TRACE] shiny-server - Proxying request: /shared/json2-min.js [2016-06-23 08:30:19.828] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.828] [TRACE] shiny-server - Worker #2806e03f39247c1a acquiring http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.829] [TRACE] shiny-server - Proxying request: /shared/shiny.min.js [2016-06-23 08:30:19.831] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.833] [TRACE] shiny-server - Worker #2806e03f39247c1a acquiring http port. 3 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.833] [TRACE] shiny-server - Proxying request: /shared/jquery.min.js [2016-06-23 08:30:19.834] [TRACE] shiny-server - Worker #e886f88929af24f7 releasing http port. 0 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.834] [TRACE] shiny-server - No clients connected to worker #e886f88929af24f7. Starting timer [2016-06-23 08:30:19.835] [TRACE] shiny-server - Worker #2806e03f39247c1a releasing http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.836] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.836] [TRACE] shiny-server - Worker #2806e03f39247c1a acquiring http port. 3 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.837] [TRACE] shiny-server - Proxying request: /rmd_resources/rmd_loader.js [2016-06-23 08:30:19.850] [TRACE] shiny-server - Worker #2806e03f39247c1a releasing http port. 2 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.851] [TRACE] shiny-server - Worker #2806e03f39247c1a releasing http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.852] [TRACE] shiny-server - Worker #2806e03f39247c1a releasing http port. 0 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.852] [TRACE] shiny-server - No clients connected to worker #2806e03f39247c1a. Starting timer [2016-06-23 08:30:19.854] [TRACE] shiny-server - Reusing existing instance [2016-06-23 08:30:19.854] [TRACE] shiny-server - Worker #2806e03f39247c1a acquiring http port. 1 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.854] [TRACE] shiny-server - Proxying request: /rmd_resources/rmd_loader.gif [2016-06-23 08:30:19.861] [TRACE] shiny-server - Worker #2806e03f39247c1a releasing http port. 0 open HTTP connection(s), 0 open WebSocket connection(s). [2016-06-23 08:30:19.862] [TRACE] shiny-server - No clients connected to worker #2806e03f39247c1a. Starting timer [2016-06-23 08:30:24.839] [TRACE] shiny-server - Timeout expired. Killing process. [2016-06-23 08:30:24.839] [TRACE] shiny-server - Interrupting process on socket port 46312 [2016-06-23 08:30:24.839] [TRACE] shiny-server - Sending SIGINT to 1835 [2016-06-23 08:30:24.865] [TRACE] shiny-server - Port 46312 returned [2016-06-23 08:30:24.865] [TRACE] shiny-server - Port 46312 proxy closed [2016-06-23 08:30:24.865] [TRACE] shiny-server - Declining to delete log file of successful execution: /var/log/shiny-server/hello-shiny-20160623-083018-46312.log [2016-06-23 08:30:24.874] [TRACE] shiny-server - Timeout expired. Killing process. [2016-06-23 08:30:24.874] [TRACE] shiny-server - Interrupting process on socket port 35764 [2016-06-23 08:30:24.874] [TRACE] shiny-server - Sending SIGINT to 1849 [2016-06-23 08:30:25.891] [TRACE] shiny-server - Port 35764 returned [2016-06-23 08:30:25.891] [TRACE] shiny-server - Port 35764 proxy closed [2016-06-23 08:30:25.892] [TRACE] shiny-server - Declining to delete log file of successful execution: /var/log/shiny-server/rmd-shiny-20160623-083018-35764.log

[root@moda shiny-server]# cat hello-shiny-20160623-083018-46312.log

Listening on http://127.0.0.1:46312

Execution halted [root@moda shiny-server]# cat rmd-shiny-20160623-083018-35764.log

Listening on http://127.0.0.1:35764

Execution halted

fereshtehRS commented 8 years ago

No useful info in the TRACE log. A couple of things to try:

1- Access this URL: https://websocketstest.com/

to see whether or not websockets work for you.

2- If you have RStudio IDE installed on the same machine, see if you can bring up any Shiny applications (in local mode)

madbyem commented 8 years ago

Thank you for your help. It was indeed a problem between websocket and the firewall. It's been fixed now.

fereshtehRS commented 8 years ago

good to hear that it is resolved.

jplu17 commented 5 years ago

Hi @gaussito, I also met this problem in Centos 7. Would you like to tell me what's the problem and how to solve it? Many Thanks.