Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. [Unit]
  2. Description=gunicorn daemon
  3. Requires=gunicorn.socket
  4. After=network.target
  5.  
  6. [Service]
  7. PIDFile=/run/gunicorn/pid
  8. User=root
  9. Group=root
  10. RuntimeDirectory=gunicorn
  11. WorkingDirectory=/srv/myproject/current
  12. ExecStart=/srv/venvs/myenv/bin/gunicorn --pid /run/gunicorn/pid
  13. --bind unix:/run/gunicorn/gunicorn.socket myapp.wsgi:application
  14. ExecReload=/bin/kill -s HUP $MAINPID
  15. ExecStop=/bin/kill -s TERM $MAINPID
  16. PrivateTmp=true
  17.  
  18. [Install]
  19. WantedBy=multi-user.target
  20.  
  21. gunicorn.service - gunicorn daemon
  22. Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
  23. Active: active (running) since Thu 2018-01-18 23:08:49 UTC; 3min 41s ago
  24. Process: 5852 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
  25. Main PID: 5858 (gunicorn)
  26. Tasks: 2
  27. Memory: 195.7M
  28. CPU: 1.426s
  29. CGroup: /system.slice/gunicorn.service
  30. ├─5858 /srv/venvs/myenv/bin/python3.6 /srv/venvs/myenv/bin/gunicorn --pid /run/gunicorn/pid --bind unix:/run/gunicorn/gunicorn.socket myapp.wsgi:application
  31. └─5862 /srv/venvs/myenv/bin/python3.6 /srv/venvs/myenv/bin/gunicorn --pid /run/gunicorn/pid --bind unix:/run/gunicorn/gunicorn.socket myapp.wsgi:application
  32.  
  33. Jan 18 23:08:49 python-server systemd[1]: Started gunicorn daemon.
  34. Jan 18 23:08:49 python-server gunicorn[5858]: [2018-01-18 23:08:49 +0000] [5858] [INFO] Starting gunicorn 19.7.1
  35. Jan 18 23:08:49 python-server gunicorn[5858]: [2018-01-18 23:08:49 +0000] [5858] [INFO] Listening at: unix:/run/gunicorn/socket (5858)
  36. Jan 18 23:08:49 python-server gunicorn[5858]: [2018-01-18 23:08:49 +0000] [5858] [INFO] Using worker: sync
  37. Jan 18 23:08:49 python-server gunicorn[5858]: [2018-01-18 23:08:49 +0000] [5862] [INFO] Booting worker with pid: 5862
  38.  
  39. server {
  40. server_tokens off;
  41. listen 443 ssl;
  42. server_name myserver.com;
  43. keepalive_timeout 70;
  44.  
  45. ssl_certificate /etc/ssl/certs/myserver.com.merged.crt;
  46. ssl_certificate_key /etc/ssl/private/myserver.com.key;
  47.  
  48. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  49. ssl_ciphers HIGH:!aNULL:!MD5;
  50.  
  51. #access_log /var/log/nginx/access.myserver.log;
  52. access_log /var/log/nginx/access.myserver.log;
  53. #error_log /var/log/nginx/error.myserver.log;
  54. error_log /var/log/nginx/error.myserver.log;
  55.  
  56. location / {
  57. include proxy_params;
  58. proxy_pass http://unix:/run/gunicorn/gunicorn.socket;
  59. }
  60. }
  61.  
  62. 2018/01/18 23:09:00 [crit] 5764#5764: *4 connect() to unix:/run/gunicorn/gunicorn.socket failed (2: No such file or directory) while connecting to upstream, client: 212.251.167.250, server: myserver.com, request: "GET / HTTP/1.1", upstream: "http://unix:/run/gunicorn/gunicorn.socket:/", host: "myserver.com"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement