4-10 nginx 의 mysite 설정관련 오류 문의 드립니다.
alrpj 파일은
server {
listen 80;
server_name allroundplatform.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static {
alias /home/ubuntu/venvs/alrpj/static;
}
location / {
include proxy_params;
proxy_pass http://unix:/tmp/gunicorn.sock;
}
}
server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/xxx.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xxx.com/privkey.pem;
access_log /var/log/nginx/443_access.log;
error_log /var/log/nginx/443_error.log;
}
이렇게 설정이 되어 있는데요.
실행을 하면.
● alrpj.service - gunicorn daemon
Loaded: loaded (/etc/systemd/system/alrpj.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-02-19 17:56:02 UTC; 34s ago
Process: 16168 ExecStart=/home/ubuntu/venvs/bin/gunicorn --workers 2 --bind unix:/tmp/gunicorn.sock alrpj.wsgi:application (cod>
Main PID: 16168 (code=exited, status=1/FAILURE)
Feb 19 17:56:02 ip-172-26-4-83 gunicorn[16168]: self.stop()
Feb 19 17:56:02 ip-172-26-4-83 gunicorn[16168]: File "/home/ubuntu/venvs/lib/python3.8/site-packages/gunicorn/arbiter.py", line 3>
Feb 19 17:56:02 ip-172-26-4-83 gunicorn[16168]: time.sleep(0.1)
Feb 19 17:56:02 ip-172-26-4-83 gunicorn[16168]: File "/home/ubuntu/venvs/lib/python3.8/site-packages/gunicorn/arbiter.py", line 2>
Feb 19 17:56:02 ip-172-26-4-83 gunicorn[16168]: self.reap_workers()
Feb 19 17:56:02 ip-172-26-4-83 gunicorn[16168]: File "/home/ubuntu/venvs/lib/python3.8/site-packages/gunicorn/arbiter.py", line 5>
Feb 19 17:56:02 ip-172-26-4-83 gunicorn[16168]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
Feb 19 17:56:02 ip-172-26-4-83 gunicorn[16168]: gunicorn.errors.HaltServer:
Feb 19 17:56:02 ip-172-26-4-83 systemd[1]: alrpj.service: Main process exited, code=exited, status=1/FAILURE
Feb 19 17:56:02 ip-172-26-4-83 systemd[1]: alrpj.service: Failed with result 'exit-code'.
계속 이런 오류가 뜹니다.
혹시 이유가 뭘까요?
nakchun 님 566
2022년 2월 20일 3:04 오전
1개의 답변이 있습니다. 1 / 1 Page
ngnix를 리로드 하고 다시 명령어를 입력했더니, 아까와는 조금 다르게 나오는데요.
(venvs) ubuntu@ip-172-26-4-83:~/venvs/alrpj$ sudo systemctl status alrpj.service
● alrpj.service - gunicorn daemon
Loaded: loaded (/etc/systemd/system/alrpj.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-02-19 18:16:04 UTC; 25s ago
Process: 16280 ExecStart=/home/ubuntu/venvs/bin/gunicorn --workers 2 --bind unix:/tmp/gunicorn.sock alrpj.wsgi:application (code=exited, status=3)
Main PID: 16280 (code=exited, status=3)
Feb 19 18:16:03 ip-172-26-4-83 gunicorn[16283]: File "
Feb 19 18:16:03 ip-172-26-4-83 gunicorn[16283]: File "
Feb 19 18:16:03 ip-172-26-4-83 gunicorn[16283]: File "
Feb 19 18:16:03 ip-172-26-4-83 gunicorn[16283]: ModuleNotFoundError: No module named 'alrpj.settings.prod'; 'alrpj.settings' is not a package
Feb 19 18:16:03 ip-172-26-4-83 gunicorn[16283]: [2022-02-19 18:16:03 +0000] [16283] [INFO] Worker exiting (pid: 16283)
Feb 19 18:16:03 ip-172-26-4-83 gunicorn[16280]: [2022-02-19 18:16:03 +0000] [16280] [WARNING] Worker with pid 16283 was terminated due to signal 15
Feb 19 18:16:04 ip-172-26-4-83 gunicorn[16280]: [2022-02-19 18:16:04 +0000] [16280] [INFO] Shutting down: Master
Feb 19 18:16:04 ip-172-26-4-83 gunicorn[16280]: [2022-02-19 18:16:04 +0000] [16280] [INFO] Reason: Worker failed to boot.
Feb 19 18:16:04 ip-172-26-4-83 systemd[1]: alrpj.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Feb 19 18:16:04 ip-172-26-4-83 systemd[1]: alrpj.service: Failed with result 'exit-code'.
책에 나온데로 다 했거든요..그런데 계속 이렇게 나와요.
nakchun 님
2022년 2월 20일 3:19 오전