红联Linux门户
Linux帮助

shiny-server启动失败:start: Job failed to start

发布时间:2016-09-30 15:16:23来源:linux网站作者:常飞梦
问题:
启动shiny-server时失败,如下:
[root@hadoop2 ~]# status shiny-server
shiny-server stop/waiting
[root@hadoop2 ~]# start shiny-server 
start: Job failed to start
 
分析:
查看shiny-server日志
[root@hadoop2 ~]# tail -100f  /var/log/shiny-server.log 
[2016-09-29 22:02:59.777] [INFO] shiny-server - Shutting down worker processes
[2016-09-29 22:03:03.763] [INFO] shiny-server - Shiny Server v1.4.4.807 (Node.js v0.10.46)
[2016-09-29 22:03:03.764] [INFO] shiny-server - Using pidfile /var/run/shiny-server.pid
[2016-09-29 22:03:03.765] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2016-09-29 22:03:03.804] [ERROR] shiny-server - Error loading config: Unknown directive "auth_passwd_file" (/etc/shiny-server/shiny-server.conf:6:1)
 
发现提示是配置文件的auth_passwd_file没有认到,才想来原来我装的shiny-server是企业pro版本,因为试用期45天到期了,我就卸载了这个商业版本,重新装的一个open免费版本。
由于卸载后没删除旧的配置文件,导致免费版本的不能识别商业版本配置文件里的参数,所以才报上面的错误。
 
下面是商业版本和免费版本配置文件内容的区别
shiny-server pro版本配置内容 :
[root@hadoop2 shiny-server]# vi /etc/shiny-server/shiny-server.conf
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
# Specify the authentication method to be used.
# Initially, a flat-file database stored at the path below.
auth_passwd_file /etc/shiny-server/passwd;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location / {
# Only up tp 20 connections per Shiny process and at most 3 Shiny processes
# per application. Proactively spawn a new process when our processes reach
# 90% capacity.
utilization_scheduler 20 .9 3;
# 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;
}
}
# Provide the admin interface on port 4151
admin 4151 {
# Restrict the admin interface to the usernames listed here. Currently
# just one user named "admin"
required_user admin;
}
 
shiny-server open source 版本配置文件内容:
[root@hadoop3 shiny-server]# vi /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;
}
}        
 
解决办法:
把免费版本的配置文件 替换掉商业版本的配置文件就可以了。
[root@hadoop3 shiny-server]# cp shiny-server.conf 10.1.32.8:/etc/shiny-server/
再启动shiny-server正常
[root@hadoop2 shiny-server]# start shiny-server
shiny-server start/running, process 20221
 
本文永久更新地址:http://www.linuxdiyf.com/linux/24622.html