リモートでホストされているJNDIおよびHornetQサーバーでHornetQ jms/queueの例を実行しようとしています。JNDIルックアップがHornetQキューの例でハングする
HornetQサーバーは10.0.10.102で動作しています。クライアントは10.0.2.62で動作しています。サーバーマシンとクライアントマシンはどちらもLinuxボックスです。
次のように私は、クライアント側のclient-jndi.propertiesファイルを設定した: java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://10.0.10.102:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
を次のように私はHornetQの-beans.xmlの設定ファイルでJNDIの設定を構成し:
<bean name="JNDIServer" class="org.jnp.server.Main">
<property name="namingInfo">
<inject bean="Naming"/>
</property>
<property name="port">1099</property>
<property name="bindAddress">10.0.10.102</property>
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">10.0.10.102</property>
</bean>
「接続が拒否されました」というエラーが表示されるか、サーバー側のLinuxマシン(10.0.10.102)で「rmiregistry」を実行したかどうかによってクライアントがJNDIサービスを検索してハングアップします。
"のrmiregistry" を実行しなければ、私はクライアント側で次のエラーを取得する:私は、サーバーのホスト上で "のrmiregistry" を実行して行うと
[java] javax.naming.CommunicationException: Could not obtain connection to any of these urls: 10.0.10.102:30199 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server /10.0.10.102:30199 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /10.0.10.102:30199 [Root exception is java.net.ConnectException: Connection refused]]]
、JNDIルックアップはハング:
[java] Jan 12, 2012 2:23:47 PM org.hornetq.common.example.HornetQExample getContext
[java] INFO: using server0/client-jndi.properties for jndi
ここにハングアップします...
JNDIルックアッププロセス用にJNDIまたはJava環境を構成するために必要なことは何ですか?ありがとうございました。
[OK]をので、間違ったファイルを変更していると思う、私はHornetQののネッティー/リモート設定を読み込みます。私は一度それを読んだが、多分何かを見過ごした。 – rlee