闪亮的应用程序无法启动闪亮的服务器

时间:2016-04-11 16:31:56

标签: r shiny shiny-server

我想在Shiny上部署Shiny server应用,但无法从本地服务器网址访问该应用。

enter image description here

这是/var/log/shiny-server.log

的输出
[2016-04-11 21:39:24.302] [INFO] shiny-server - Starting listener on 0.0.0.0:3838
[2016-04-11 21:42:29.564] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:42:29.570] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:43:15.156] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:43:15.163] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:43:28.593] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:43:28.604] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:43:54.549] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:51:52.528] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:52:20.004] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:52:20.020] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:52:26.843] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:56:10.938] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2016-04-11 21:56:10.946] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.

有什么问题?

3 个答案:

答案 0 :(得分:1)

我遇到了这个问题,我的所有日​​志都是空的/无法打开。在我的头撞墙之后,我能够通过更改 conf 文件 (/etc/shiny-server/shiny-server.conf) 中的闪亮用户来解决这个问题。

我更改了“run_as 闪亮;”到“run_as:HOME_USER:闪亮;”。

还有这个:

https://docs.rstudio.com/shiny-server/

比我在 stackoverflow、github 或 google 群组上找到的任何内容都更有帮助。

答案 1 :(得分:0)

也许您可以看看here
我将专注于此错误

  

[2016-04-11 21:39:24.302] [INFO]闪亮服务器-在0.0.0.0:3838上启动侦听器

在提供的链接上,您会发现几个用户仔细检查了权限:在端口3838和闪亮的服务器上。

此外,我建议您看看this guide
通过遵循它,我能够在Ubuntu RStudio服务器上运行闪亮的应用程序。

答案 2 :(得分:0)

在我的R代码失败之前,我已经遇到了这种情况。由于我在Windows机器上编写R代码并在ubuntu上运行闪亮的服务器,因此某些软件包在Windows上可以正常运行,但在ubuntu上失败,或者如果我忘记在ubuntu机器上安装该软件包。要找出发生这种情况的时间,您必须转到应用程序日志而不是服务器日志。

在以下位置应有一个特定于您应用的日志:

\var\log\shiny-server\YourAppName-20191112-170851-44977.log

“应用程序名称”后的数字与应用程序尝试运行的时间戳有关。如果特定程序包有任何错误或您的R代码导致应用失败,则此日志文件将包含R输出。