0

Glassfish 3.1.2.2でクラスターを作成しようとしています。クラスターを作成し、インスタンスを作成して開始しましたが、すべて問題ありませんでした。次に、AJPポートを有効にして、次の手順でmod_jkを使用してApacheからロードバランサーを作成しました(Glassfish側から) :

  • tomcat から jar ファイル (commons-logging-1.1.1.jar,commons-modeler-2.0.1.jar,tomcat-ajp.jar) を取得し、Glassfish の lib フォルダー (ドメインではない) 内に配置しました。
  • 次に、各インスタンスにシステム プロパティ (特別な値を含む) を追加しました。

    AJP_INSTANCE_NAME と AJP_PORT

  • 最後にポートを有効にするには、クラスター構成の JVM オプションで次のようにします。

    -Dcom.sun.enterprise.web.connector.enableJK=${AJP_PORT} -DjvmRoute=${AJP_INSTANCE_NAME}

そして、次のコマンドを使用してインスタンスを起動しようとしました:

./asadmin start-local-instance --sync=full --node=node1 ins1

そして、次のログで失敗します: コンソールから:

Removing all cached state for instance ins1.
Waiting for ins1 to start ...................................................................................................Error starting instance ins1.
The server exited prematurely with exit code 0.
Before it died, it produced the following output:

Launching GlassFish on Felix platform
[#|2013-04-29T16:46:55.932+0300|INFO|oracle-glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=main;|Running GlassFish Version: Oracle GlassFish Server 3.1.2.2 (build 5)|#]

[#|2013-04-29T16:46:59.585+0300|INFO|oracle-glassfish3.1.2|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=10;_ThreadName=main;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2013-04-29T16:47:08.881+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions|_ThreadID=10;_ThreadName=main;|JTS5014: Recoverable JTS instance, serverId = [100]|#]

[#|2013-04-29T16:47:16.645+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=11;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.50 started in: 1259ms - bound to [0.0.0.0:28181]|#]

[#|2013-04-29T16:47:16.646+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=12;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.50 started in: 1872ms - bound to [0.0.0.0:28080]|#]

[#|2013-04-29T16:47:16.833+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=13;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.50 started in: 219ms - bound to [0.0.0.0:24848]|#]

[#|2013-04-29T16:47:17.308+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=14;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.50 started in: 175ms - bound to [0.0.0.0:27676]|#]

[#|2013-04-29T16:47:24.329+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=main;|WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:28080]|#]

[#|2013-04-29T16:47:24.587+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=main;|WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:28181]|#]

[#|2013-04-29T16:47:24.812+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=main;|WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:24848]|#]

[#|2013-04-29T16:47:24.998+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=main;|WEB0170: Apache mod_jk/jk2 attached to virtual-server [server]  listening on port [9,090]|#]

[#|2013-04-29T16:47:25.058+0300|SEVERE|oracle-glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=10;_ThreadName=main;|Startup service failed to start : com.sun.enterprise.v3.services.impl.WebContainerStarter|#]

[#|2013-04-29T16:47:26.791+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin.cluster|_ThreadID=15;_ThreadName=Thread-19;|Server shutdown initiated|#]

[#|2013-04-29T16:47:26.879+0300|INFO|oracle-glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=15;_ThreadName=Thread-19;|Already stopped, so just returning|#]



Command start-local-instance failed.

編集:テストのためにGMSを無効にする前に最初のログを入れました.GMSを無効にしても、失敗したメッセージでコンソールにログインしました.


私は Solaris x86 OS を持っています。JDK は 1.6u37 です。ここで行ったこと 以前は 2.1.1 で行って問題なく動作していましたが、GF 3.1.2.2 では何が起こっているのかわかりません。

4

1 に答える 1

0

問題に何日も取り組んでいるのに、質問を書くと解決策が見つかるのはおかしいと思います。とにかく、私は自分の解決策を見つけましたが、まだテストしていませんが、少なくとも「LISTEN」ステータスのポートを見ました:

問題は「-Dcom.sun.enterprise.web.connector.enableJK=${AJP_PORT}」によるもので、Glassfish 2.1 では正しい方法ではないようですが、Glassfish 3.1.2 では次のことを行う必要があります。

  1. クラスター構成から --> Network Config --> Network Listeners (これをクリック)
  2. 「New...」リスナーを作成します。
  3. 新しいリスナー情報を入力します:
    • 次のように名前を付けます: jk-connector 、ポート: ${AJP_PORT} 、「JK Listener」をオンにして有効にします。プロトコルは「Use an existing protocol」を選択し、次に「http-listener-1」プロトコルを選択し、Thread Poolを選択します。 「http-thread-pool」(これについては今のところわかりませんが、別のリスナーの同じプールを使用していました)。

次にインスタンスを起動し、正常に起動した場合は、「netstat -an | grep」を使用してポートがリッスンしていることを確認します (例:「netstat -an | grep 9090」など)。

于 2013-04-30T07:27:19.910 に答える