> と、ActiveがFailedでうまく動いておりません、、、、

これの上に貼ってもらったログは、右側が切れていないでしょうか?
「ModuleNotFoundError: No module nam」の部分はおそらく「ModuleNotFoundError: No module 
named ‘xxxx'」のような表示で、何らかのPythonライブラリが足りなくてエラーになっているはずですが、名前が見えないので何とも言えません。

> virtualenv上での
> manage.py runserver
> gunicorn –-bind 0.0.0.0:8000 project-name.wsgi
> は問題なく起動しました。
一点確認しておきたいのですが、上記動作確認のとき使ったvirtualenv環境にactivateした状態で「which 
gunicorn」したとき、gunicorn.serviceのExecStartに書いたgunicornへのパスと同じ値が表示されるでしょうか?
もし違っていたら、「which gunicorn」で表示されるパスをgunicorn.serviceのExecStartに書くようにすれば動くはずです。


> 2018/10/30 23:47、yyy so <djmaa...@gmail.com>のメール:
> 
> 環境
> django2 nginx
> で、APIを作り、アマゾンインスタンスのubuntu上にデプロイしようとしています。
> 
> virtualenv上での
> manage.py runserver
> gunicorn –-bind 0.0.0.0:8000 project-name.wsgi
> は問題なく起動しました。
> 
> その後、
> sudo vim /etc/systemd/system/gunicorn.service
> で
> [Unit]
> 
> Description=gunicorn daemon
> 
> After=network.target
> 
>  
> [Service]
> 
> User=ubuntu
> 
> Group=www-data
> 
> WorkingDirectory=/home/ubuntu/myFirstAPI
> 
> ExecStart=/home/ubuntu/myFirstAPI/myFirstAPI(envのフォルダ)/bin/gunicorn 
> --access-logfile - -- workers 3 --bind 
> unix:/home/ubuntu/myFirstAPI/project.sock project.wsgi:application
> 
>  
> [Install]
> 
> WantedBy=multi-user.target
> と記入し、
> sudo systemctl start gunicorn
> 
> sudo systemctl enable gunicorn
> 
> sudo systemctl status gunicorn
> 
> 
> 
> として動作確認したところ、
> 
> 
> 
>  gunicorn.service - gunicorn daemon
> 
>    Loaded: loaded (/etc/systemd/system/gunicorn.service; disabled; vendor 
> preset
> 
>    Active: failed (Result: exit-code) since Sun 2018-10-28 15:07:34 UTC; 1 
> day 2
> 
>  Main PID: 2001 (code=exited, status=3)
> 
> 
> 
> Oct 28 15:07:34 ip-10-0-0-186 gunicorn[2001]:   File 
> "/home/ubuntu/myFirstAPI/my
> 
> Oct 28 15:07:34 ip-10-0-0-186 gunicorn[2001]:     return 
> util.import_app(self.ap
> 
> Oct 28 15:07:34 ip-10-0-0-186 gunicorn[2001]:   File 
> "/home/ubuntu/myFirstAPI/my
> 
> Oct 28 15:07:34 ip-10-0-0-186 gunicorn[2001]:     __import__(module)
> 
> Oct 28 15:07:34 ip-10-0-0-186 gunicorn[2001]: ModuleNotFoundError: No module 
> nam
> 
> Oct 28 15:07:34 ip-10-0-0-186 gunicorn[2001]: [2018-10-28 15:07:34 +0000] 
> [2020]
> 
> Oct 28 15:07:34 ip-10-0-0-186 gunicorn[2001]: [2018-10-28 15:07:34 +0000] 
> [2001]
> 
> Oct 28 15:07:34 ip-10-0-0-186 gunicorn[2001]: [2018-10-28 15:07:34 +0000] 
> [2001]
> 
> Oct 28 15:07:34 ip-10-0-0-186 systemd[1]: gunicorn.service: Main process 
> exited,
> 
> Oct 28 15:07:34 ip-10-0-0-186 systemd[1]: gunicorn.service: Failed with 
> result '
> 
> 
> 
> と、ActiveがFailedでうまく動いておりません、、、、
> 
> https://www.youtube.com/watch?v=Xlp9G137-MI&t=531s
> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
> のサイトを参考に進め、postgresqlだけ無視(正確には失敗した)しています。
> はじめてのプログラミング、デプロイでこれまで幾多のエラーを起こしてまいりましたが、
> 今までになく見当もつきません。
> どなたかお力お借りすることができればとわらにもすがる思いで投稿させていただきます。
> どうぞお知恵をお貸しくださいませ。
> よろしくお願いいたします。
> 
> -- 
> ----------------- http://djangoproject.jp/ <http://djangoproject.jp/> 
> -----------------
> You received this message because you are subscribed to the Google Groups 
> "django-ja" group.
> To post to this group, send email to django-ja@googlegroups.com
> To unsubscribe from this group, send email to 
> django-ja-unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/django-ja 
> <http://groups.google.com/group/django-ja>
> --- 
> このメールは Google グループのグループ「django-ja」に登録しているユーザーに送られています。
> このグループから退会し、グループからのメールの配信を停止するには django-ja+unsubscr...@googlegroups.com 
> <mailto:django-ja+unsubscr...@googlegroups.com> にメールを送信してください。
> その他のオプションについては https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout> にアクセスしてください。

-- 
-----------------                       http://djangoproject.jp/                
         -----------------
You received this message because you are subscribed to the Google Groups 
"django-ja" group.
To post to this group, send email to django-ja@googlegroups.com
To unsubscribe from this group, send email to 
django-ja-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-ja
--- 
このメールは Google グループのグループ「django-ja」の登録者に送られています。
このグループから退会し、グループからのメールの配信を停止するには django-ja+unsubscr...@googlegroups.com 
にメールを送信してください。
その他のオプションについては、https://groups.google.com/d/optout にアクセスしてください。

メールによる返信