2016-10-22 6 views
0

Letsencrypt에서 SSL 인증서를 사용하여 Shiny Server Pro를 구성하려고합니다. 나는 여기에 설명 된대로 내 인증서를 만들려면 다음 명령을 따르 https://certbot.eff.org/#ubuntuxenial-otherShiny Server Pro에서 letsencrypt를 사용하는 중 오류가 발생했습니다.

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. 

내가 SYS 관리자 아니다, 나는 인정할 것이다 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'. 

의 세부 사항입니다. 이 오류가 무엇을 의미하는지 알아내는 데 큰 도움이됩니다.

+1

Pro를 사용하는 경우 RStudio 지원 채널을 통해 빠른 지원을받을 수 있습니다. – hrbrmstr

답변

2

마지막으로 알아 냈습니다. 다음 명령은 인증서를 만들 :

여기
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 
0

필자는 이러한 문제가 있었는데, 일반적으로 끝에있는 둥근 괄호 또는 세미콜론을 구성 파일에서 생략했을 때 발생합니다.