Confluence のリッスン ポートの変更

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

問題

ここでは、 Confluence を開いたときにポート8090 にアクセスできず、次のようなエラーが発生した場合に行うべき作業について説明します。

次のエラーが発生した場合:

java.net.BindException: Address already in use: JVM_Bind:8090

これは、Confluence のデフォルト ポート8090で別のソフトウェアを実行していることを意味します。別のプロセスが同じポートで実行されている可能性があります。または、以前の Confluence インスタンスが完全にシャットダウンされていない可能性もあります。

ポートでリッスンしているプロセスを確認するには、コマンド プロンプトをロードし、「 netstat -an 」と入力します。

 -a : Displays all active TCP connections and the TCP and UDP ports on which the computer is listening.
 -n : Displays active TCP connections, however, addresses and port numbers are expressed numerically and no attempt is made to determine names.

Process Explorer ツールを利用して 8090 ポートをバインドしているものを特定することも可能です。

ソリューション: Confluence がリッスンするポートを変更する

Confluence 用のポートを変更するには、Confluence インストール ディレクトリで conf/server.xml ファイルを開きます。ファイルの最初の 4 行は以下のように表示されます。

Modified conf/server.xml

<Server port="8000" shutdown="SHUTDOWN" debug="0">
    <Service name="Tomcat-Standalone">
        <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8090" minProcessors="5" maxProcessors="75"
            enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000" useURIValidationHack="false"/>
        ...

You need to modify both the server port (default is 8000) and the connector port (default is 8090) to ports that are free on your machine. The server port is required by Tomcat but is not user facing in any way. The connector port is what your users will use to access Confluence, eg in the snippet above, the URL would be http://example.com:8090.

(tick) Hint: You can use netstat to identify free ports on your machine. See more information on using netstat on Windows or on Linux.

たとえば、これは、ポート "8020" と "8099" を使用して修正した server.xml ファイルの始めの 4 行です。

ポート 8020 と 8099 を使用して修正した conf/server.xml
<Server debug="0" shutdown="SHUTDOWN" port="8020">
    <Service name="Tomcat-Standalone">
        <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8099" minProcessors="5" maxProcessors="75"
            enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000" useURIValidationHack="false"/>
        ...

この設定で Confluence にアクセスするには、Web ブラウザで http://localhost:8099/ を指定します。

最終的な構成

  • この URL が、ユーザーが Confluence にアクセスするために使用するものである場合、 ベース URL を更新して新しい URL を示すようにします。

  • ファイアウォールを使用している場合、この時点で、http/https トラフィックが選択したポートで許可されるかどうかを確認します。 
注意

[1] netstat の詳細情報については「Windows で netstat を使用する」または netstat の man ページ (Linux) をご確認ください。

[2] Jira のディストリビューションは、既定ではポート 8080 で実行されます。Jira アプリケーションのディストリビューション用のポートを変更する場合、「Jira アプリケーションの TCP ポートの変更」を参照してください。

[3] この変更を有効にするには、server.xml を編集したあとに Confluence を再起動する必要があります。

最終更新日 2020 年 11 月 6 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.