さくらVPS上のUbuntu Serverで、Webアプリを動かそうとしました。
アプリはDjangoで作成しており、nginxとgunicornで動かそうとしています。
しかし、nginxを動かそうとした所で下記エラーが出ました。
linux
1sudo nginx 2nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) 3
http://hacknote.jp/archives/15044/
上記サイトでも、同じ事象を紹介されていましたので、それを参考にして下記のとおりにしてみました。
sudo netstat -lnp | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4558/nginx: master tcp6 0 0 :::80 :::* LISTEN 4558/nginx: master
試しに、tcpを止めようと下記のとおりしてみましたが、できませんでした。
sudo service tcp stop Failed to stop tcp.service: Unit tcp.service not loaded.
そもそも他のソフトをインストールしようとしている時に、下記のエラーが生じていました。
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. invoke-rc.d: initscript nginx, action "start" failed. dpkg: error processing package nginx-full (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-six (1.10.0-3) ... Setting up python-iniparse (0.4-2.2) ... Setting up yum-utils (1.1.31-3) ... Errors were encountered while processing: nginx-full E: Sub-process /usr/bin/dpkg returned an error code (1)
そこで、systemctl status nginx.serviceを実行しました。
systemctl status nginx.service ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2016-08-15 21:29:04 JST; 52min ago Process: 5165 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE) Process: 5162 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 3962 (code=exited, status=0/SUCCESS) Aug 15 21:29:03 nginx[5165]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Aug 15 21:29:03 nginx[5165]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Aug 15 21:29:03 nginx[5165]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Aug 15 21:29:04 nginx[5165]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Aug 15 21:29:04 nginx[5165]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Aug 15 21:29:04 nginx[5165]: nginx: [emerg] still could not bind() Aug 15 21:29:04 systemd[1]: nginx.service: Control process exited, code=exited status=1 Aug 15 21:29:04 systemd[1]: Failed to start A high performance web server and a reverse proxy server. Aug 15 21:29:04 systemd[1]: nginx.service: Unit entered failed state. Aug 15 21:29:04 systemd[1]: nginx.service: Failed with result 'exit-code'.
どこに手がかりがあるかも分からないので、エラー文をできるだけ全部掲載しました。長文になり申し訳ございません。
どこに問題がありそうかお分かりの方、ご教示頂ければ幸いです。
よろしくお願いいたします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/08/15 13:55
退会済みユーザー
2016/08/15 14:12
2016/08/15 14:32
退会済みユーザー
2016/08/16 01:43
退会済みユーザー
2016/08/17 05:57