2017-01-29 25 views
1

我想设置[R闪亮的服务器上我的亚马逊AWS的Linux EC2实例和正在以下错误在应用程序退出。网页上闪亮的服务器错误:发生错误应用程序无法启动。发生</p> <p>错误</p> <p>应用程序未能启动:初始化

应用程序在初始化期间退出。

我做了须藤闪亮的服务器来看看发生了什么,看到了错误EADDRINUSE:

$ sudo shiny-server 
[2017-01-29 13:21:22.724] [INFO] shiny-server - Shiny Server  v1.5.1.834 (Node.js v6.9.1) 
[2017-01-29 13:21:22.728] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf" 
[2017-01-29 13:21:22.764] [INFO] shiny-server - Starting listener on 0.0.0.0:80 
[2017-01-29 13:21:22.771] [ERROR] shiny-server - HTTP server error (0.0.0.0:80): listen EADDRINUSE 0.0.0.0:80 
[2017-01-29 13:21:22.771] [INFO] shiny-server - Shutting down worker processes 

我核实,有光泽,rmarkdown和,闪亮的服务器和R正确安装在我的实例:

R --version 
R version 3.2.2 (2015-08-14) -- "Fire Safety" 
Copyright (C) 2015 The R Foundation for Statistical Computing 
Platform: x86_64-redhat-linux-gnu (64-bit) 

R is free software and comes with ABSOLUTELY NO WARRANTY. 
You are welcome to redistribute it under the terms of the 
GNU General Public License versions 2 or 3. 
For more information about these matters see 
http://www.gnu.org/licenses/. 

> library(shiny) 
> library(rmarkdown) 
> 

我还检查了我的EC2实例的网络连接:

$ sudo netstat --tcp -nlpa | grep 80 
tcp  0  0 0.0.0.0:80     0.0.0.0:*     LISTEN  1875/shiny-server 

我的EC2实例的网络安全组:

$ aws ec2 describe-security-groups --group-name launch-wizard-7 
{ 
"SecurityGroups": [ 
    { 
     "IpPermissionsEgress": [ 
      { 
       "IpProtocol": "-1", 
       "PrefixListIds": [], 
       "IpRanges": [ 
        { 
         "CidrIp": "0.0.0.0/0" 
        } 
       ], 
       "UserIdGroupPairs": [], 
       "Ipv6Ranges": [] 
      } 
     ], 
     "Description": "launch-wizard-7 created 2017-01-28T14:22:51.817-05:00", 
     "IpPermissions": [ 
      { 
       "PrefixListIds": [], 
       "FromPort": 80, 
       "IpRanges": [ 
        { 
         "CidrIp": "0.0.0.0/0" 
        } 
       ], 
       "ToPort": 80, 
       "IpProtocol": "tcp", 
       "UserIdGroupPairs": [], 
       "Ipv6Ranges": [] 
      }, 

(还有另一个条目但SSH到我自己的机器,所以我不会把这些信息)

,这里是从我的光泽,server.conf文件/etc/shiny-server/shiny-server.conf

$ cat /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; 
} 
} 

任何帮助将非常感激。我试图让AWS监听所有IP地址和闪亮服务器的端口80的请求,因为我想这两个服务都不应该听同一个端口,但这样做不起作用。我只是想部署发光服务器附带的示例应用程序。

网址:http://34.198.107.126/sample-apps/hello/

+0

我也徘徊,如果我的AWS安全组应该允许所有IP和闪亮服务器的端口80的入站流量侦听端口3838或其他方式。 – jonathan1987

回答

1

没关系,想通了,这是什么;一切安装正确,但我的软件包不是作为root安装,而是作为ec2用户;以root用户身份进行安装,因为网页/文​​件夹权限大多是root用户。

相关问题