在 Shiny Server Pro 中使用 letsencrypt 时出错
Error using letsencrypt with Shiny Server Pro
我正在尝试使用来自 Letsencrypt 的 SSL 证书配置 Shiny Server Pro。我按照这些命令创建我的证书,如下所述:https://certbot.eff.org/#ubuntuxenial-other
sudo apt-get install letsencrypt
sudo systemctl stop shiny-server
letsencrypt certonly --standalone -d pbisny.org -d www.pbisny.org
我将这一行添加到 /etc/shiny-server/shiny-server.conf
ssl /etc/letsencrypt/live/pbisny.org/privkey.pem /etc/letsencrypt/live/pbisny.org/cert.pem
并启动服务器。
sudo systemctl start shiny-server
然后我得到这个错误:
Job for shiny-server.service failed because a configured resource limit
was exceeded. See "systemctl status shiny-server.service" and
"journalctl -xe" for details.
这里是systemctl status shiny-server.service
的详情
shiny-server.service - ShinyServer
Loaded: loaded (/etc/systemd/system/shiny-server.service; enabled; vendor preset: enabled)
Active: failed (Result: resources) since Sat 2016-10-22 12:29:19 UTC; 9s ago
Process: 18702 ExecStopPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)
Process: 18685 ExecStartPost=/bin/sleep 3 (code=exited, status=0/SUCCESS)
Process: 18684 ExecStart=/bin/bash -c /opt/shiny-server/bin/shiny-server --pidfile=/var/run/shiny-server.pid >> /var/l
Main PID: 18684 (code=exited, status=0/SUCCESS)
Oct 22 12:29:11 pbis-pro systemd[1]: Starting ShinyServer...
Oct 22 12:29:14 pbis-pro systemd[1]: shiny-server.service: PID file /var/run/shiny-server.pid not readable (yet?) after
Oct 22 12:29:19 pbis-pro systemd[1]: Failed to start ShinyServer.
Oct 22 12:29:19 pbis-pro systemd[1]: shiny-server.service: Unit entered failed state.
Oct 22 12:29:19 pbis-pro systemd[1]: shiny-server.service: Failed with result 'resources'.
我承认,我不是系统管理员。非常感谢任何帮助弄清楚此错误的含义。
我遇到过这样的问题,通常发生在配置文件末尾的大括号或分号丢失时。
终于想通了。以下命令创建证书:
sudo apt-get install letsencrypt
letsencrypt certonly --standalone -d domain.com -d www.domain.com
这是我的 /etc/shiny-server/shiny-server.conf
文件的服务器部分:
server {
listen 80;
location / {
redirect "https://domain.com" 302 true;
}
}
server {
listen 443;
ssl /etc/letsencrypt/live/domain.com/privkey.pem /etc/letsencrypt/live/domain.com/cert.pem;
# 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;
}
}
最后,重启闪亮的服务器。
sudo systemctl restart shiny-server
此错误信息:
Job for shiny-server.service failed because a configured resource
limit was exceeded. See "systemctl status shiny-server.service" and
"journalctl -xe" for details.
conf文件出现错误时出现/etc/shiny-server/shiny-server.conf
。
要查看触发此消息的错误的详细信息,请查看 /var/log/shiny-server.log
中的日志。一行应该包含 Error loading config:
后跟有助于修复配置文件的详细信息。
我正在尝试使用来自 Letsencrypt 的 SSL 证书配置 Shiny Server Pro。我按照这些命令创建我的证书,如下所述:https://certbot.eff.org/#ubuntuxenial-other
sudo apt-get install letsencrypt
sudo systemctl stop shiny-server
letsencrypt certonly --standalone -d pbisny.org -d www.pbisny.org
我将这一行添加到 /etc/shiny-server/shiny-server.conf
ssl /etc/letsencrypt/live/pbisny.org/privkey.pem /etc/letsencrypt/live/pbisny.org/cert.pem
并启动服务器。
sudo systemctl start shiny-server
然后我得到这个错误:
Job for shiny-server.service failed because a configured resource limit
was exceeded. See "systemctl status shiny-server.service" and
"journalctl -xe" for details.
这里是systemctl status shiny-server.service
shiny-server.service - ShinyServer
Loaded: loaded (/etc/systemd/system/shiny-server.service; enabled; vendor preset: enabled)
Active: failed (Result: resources) since Sat 2016-10-22 12:29:19 UTC; 9s ago
Process: 18702 ExecStopPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)
Process: 18685 ExecStartPost=/bin/sleep 3 (code=exited, status=0/SUCCESS)
Process: 18684 ExecStart=/bin/bash -c /opt/shiny-server/bin/shiny-server --pidfile=/var/run/shiny-server.pid >> /var/l
Main PID: 18684 (code=exited, status=0/SUCCESS)
Oct 22 12:29:11 pbis-pro systemd[1]: Starting ShinyServer...
Oct 22 12:29:14 pbis-pro systemd[1]: shiny-server.service: PID file /var/run/shiny-server.pid not readable (yet?) after
Oct 22 12:29:19 pbis-pro systemd[1]: Failed to start ShinyServer.
Oct 22 12:29:19 pbis-pro systemd[1]: shiny-server.service: Unit entered failed state.
Oct 22 12:29:19 pbis-pro systemd[1]: shiny-server.service: Failed with result 'resources'.
我承认,我不是系统管理员。非常感谢任何帮助弄清楚此错误的含义。
我遇到过这样的问题,通常发生在配置文件末尾的大括号或分号丢失时。
终于想通了。以下命令创建证书:
sudo apt-get install letsencrypt
letsencrypt certonly --standalone -d domain.com -d www.domain.com
这是我的 /etc/shiny-server/shiny-server.conf
文件的服务器部分:
server {
listen 80;
location / {
redirect "https://domain.com" 302 true;
}
}
server {
listen 443;
ssl /etc/letsencrypt/live/domain.com/privkey.pem /etc/letsencrypt/live/domain.com/cert.pem;
# 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;
}
}
最后,重启闪亮的服务器。
sudo systemctl restart shiny-server
此错误信息:
Job for shiny-server.service failed because a configured resource limit was exceeded. See "systemctl status shiny-server.service" and "journalctl -xe" for details.
conf文件出现错误时出现/etc/shiny-server/shiny-server.conf
。
要查看触发此消息的错误的详细信息,请查看 /var/log/shiny-server.log
中的日志。一行应该包含 Error loading config:
后跟有助于修复配置文件的详细信息。