私の質問は、Phusion PassengerとPlesk Onyx 17.5.3をうまく連携させることです。私はUbuntu 16.04を実行している新しいサーバーを持っています。Passenger、Plesk、Node.js:アドレスは既に使用中
Node.jsアプリのデプロイに関する公式のPhusion Passenger tutorialに従っており、私がtell Passenger to listen on port 80に必要な箇所まで正常にフォローしています。ここで
は私の手順は次のとおりです。私のレジストラに
- 、私はPleskのインターフェースでサブドメイン
pass.domain.com
- のDNSエントリを設定私は
http://pass.domain.com
を訪問した場合、私は新しいサブドメイン - を定義します私のブラウザでは、デフォルトのPlesk Webページを取得します。
- 私は "のPhusion旅客:Node.jsのチュートリアル" に従うI reach this commandまで:
sudo passenger start --port 80 --user someusername --environment production --daemonize
- 注:私は `someusername」の代わりに有効なカスタムのユーザー名を使用しています。
- 私はこのエラーを取得する:
Could not start the Nginx engine: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] still could not bind()
Pleskのは、すでにこのアドレスのデフォルトのWebページを提供していることが表示されますので、のPhusion旅客がそれにアクセスすることはできません。パッセンジャーがそれを使用できるようにアドレスを公開するためにPleskを追加または編集するにはどのようなファイルが必要ですか?
EDIT 4:同様の症状を説明するthis questionが見つかりました。しかし、OPはメテオアップを使用しており、私は旅客を使用しています。彼の解決策はMeteor Upを使ってNode.jsにポート3001で実行するように指示し、nginxにポート80とポート3001へのプロキシ要求を聞かせた。私はPhusion Passengerがすでに同様のことをしていることを理解していた。
これを明確にするためにpassenger start
コマンドを変更する方法はありますか?
OLDER EDITS
EDIT 1:@TarunLalwaliに応じて、ここでは、このサーバー上のsudo netstat -plnat
の出力は次のとおりです。
$ sudo netstat -plnat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 127.0.0.1:12768 0.0.0.0:* LISTEN 15654/psa-pc-remote
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 2293/mongod
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN 1315/.spamassassin
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 26659/nginx
tcp 0 0 0.0.0.0:8880 0.0.0.0:* LISTEN 23894/config
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 2142/master
tcp 0 0 172.17.0.1:53 0.0.0.0:* LISTEN 17312/named
tcp 0 0 94.76.206.212:53 0.0.0.0:* LISTEN 17312/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 17312/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1413/sshd
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 12563/passenger-sta
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 17312/named
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2142/master
tcp 0 0 94.76.206.212:443 0.0.0.0:* LISTEN 26659/nginx
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 23894/config
tcp 0 0 94.76.206.212:993 92.130.47.95:49994 ESTABLISHED 15322/imap-login
tcp 0 0 127.0.0.1:51168 127.0.0.1:12768 TIME_WAIT -
tcp 0 0 94.76.206.212:25 200.188.141.75:51400 TIME_WAIT -
tcp 0 188 94.76.206.212:22 92.130.47.95:34414 ESTABLISHED 4035/sshd: blacksla
tcp6 0 0 :::4190 :::* LISTEN 15234/dovecot
tcp6 0 0 :::993 :::* LISTEN 15234/dovecot
tcp6 0 0 :::995 :::* LISTEN 15234/dovecot
tcp6 0 0 :::7080 :::* LISTEN 26432/apache2
tcp6 0 0 :::7081 :::* LISTEN 26432/apache2
tcp6 0 0 127.0.0.1:3306 :::* LISTEN 10040/mysqld
tcp6 0 0 :::106 :::* LISTEN 1532/xinetd
tcp6 0 0 :::110 :::* LISTEN 15234/dovecot
tcp6 0 0 :::143 :::* LISTEN 15234/dovecot
tcp6 0 0 ::1:783 :::* LISTEN 1315/.spamassassin
tcp6 0 0 2a02:af8:1:900::3860:80 :::* LISTEN 26659/nginx
tcp6 0 0 :::8880 :::* LISTEN 23894/config
tcp6 0 0 :::465 :::* LISTEN 2142/master
tcp6 0 0 :::53 :::* LISTEN 17312/named
tcp6 0 0 :::21 :::* LISTEN 1532/xinetd
tcp6 0 0 :::22 :::* LISTEN 1413/sshd
tcp6 0 0 :::25 :::* LISTEN 2142/master
tcp6 0 0 2a02:af8:1:900::386:443 :::* LISTEN 26659/nginx
tcp6 0 0 :::8443 :::* LISTEN 23894/config
注:私はすでにこのことについて尋ねてきましたPlesk forumに発行されましたが、応答はありませんでした。ここでPhusion Passengerコミュニティに求めることはより生産的になることを願っています。実用的な解決策ができたら、Pleskフォーラムからここへのリンクを投稿します。あなたの洞察力を事前に
おかげで、
ジェームズ
EDIT 2:TarunLalwaliのアドバイス@以下は、私はnginxのを停止しようとしたが、これは不明なエラーを生成:
$ sudo nginx -s stop
$ sudo passenger start --port 80 --user node --environment production --daemonize
Could not start the Nginx engine:
nginx: [alert] Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Unable to start the Passenger core: it seems to have crashed during startup for an unknown reason, with exit code 1 (-1: Unknown error)
EDIT 3:乗客を呼び出す前にnginxサーバー全体を無効にしようとしました:
$ sudo systemctl disable nginx
Synchronizing state of nginx.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable nginx
insserv: warning: current start runlevel(s) (empty) of script `nginx' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `nginx' overrides LSB defaults (0 1 6).
$ systemctl status nginx
* nginx.service - Startup script for nginx service
Loaded: loaded (/lib/systemd/system/nginx.service; disabled; vendor preset: enabled)
Active: inactive (dead)
$ sudo passenger start --port 80 --user node --environment production --daemonize
Could not start the Nginx engine:
nginx: [alert] Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Unable to start the Passenger core: it seems to have crashed during startup for an unknown reason, with exit code 1 (-1: Unknown error)
'sudo netstat -plnat'を実行して質問を出力してください –
@TarunLalwaniあなたの提案をありがとう。 –
nginxのような感じがしていますか?あなたは 'nginx -s stop'を使ってそれを止めることができます –