2016-04-04 48 views
1

私は以下の設定でスプリングコアアプリケーションを持っています。Mq接続エラー2058

私はUserCredentialsConnectionFactoryAdapter、MQQueueConnectionFactory、およびjms-listenerを使用しています。

<jms:listener-container container-type="default" 
    connection-factory="userConnectionFactory" acknowledge="auto"> 
     <jms:listener destination="${QUEUE_NAME_IN_GEN}" ref="messageListener" 
     method="onMessage" /> 
    </jms:listener-container> 

    <bean id="userConnectionFactory" 
    class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter"> 
     <property name="targetConnectionFactory"> 
      <ref bean="mqConnectionFactory" /> 
     </property> 
     <property name="username" value="${MQ_USER_ID}" /> 
    </bean> 

    <bean id="mqConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"> 
    <property name="hostName"> 
     <value>${MQ_HOST_NAME}</value> 
    </property> 
    <property name="port"> 
     <value>${MQ_PORT}</value> 
    </property> 
    <property name="queueManager"> 
     <value>${QUEUE_MANAGER}</value> 
    </property> 
    <property name="transportType"> 
     <value>1</value> 
    </property> 
</bean> 

アプリケーションの起動時に、リスナーは完全に1台のマシンに似ています。

[org.springframework.jms.listener.DefaultMessageListenerContainer#0-1] ERROR org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:909) - Could not refresh JMS Connection for destination 'R.ABCDEF' - retrying in 5000 ms. Cause: MQJMS2005: failed to create MQQueueManager for 'myhost:dev'; nested exception is com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2058 
MQJE036: Queue manager rejected connection attempt 

は、第2のサーバ上のUnixのアカウント権限の問題とは何かだかどうかを把握するために、私はシンプルMQを書いた:私は別のサーバー上で同じ成果物としようとすると は、リスナーは次のエラーで起動に失敗しますクライアントアプリケーション。このプログラムはこのキュー・マネージャーに接続し、そこからメッセージを読み取ることができます。

他に何が間違っていますか?

答えて

0

A 2058は、キュー・マネージャー名が正しくないことを示唆しています。しかし、最も一般的な原因であるIBMの技術者によると、他にもあります。

次抽出物は、このtechnoteから取得され:

Ensure that the queue manager name is specified correctly on:

  • MQCONN API calls
  • QREMOTE object definitions
  • Client connection channel definitions

Debugging QCF, TCF, or Client connection problems are much more complex.

  • Ensure that the connection request is routed to the intended machine and queue manager.
  • Verify that the listener program is starting the channel on the correct queue manager.
  • Ensure that the specifications for the client environment variables are correct.
  • mqserver
  • mqchllib
  • mqchltab

If you are using a client channel table (amqclchl.tab), then verify that your client connection channel definition has the correct queue manager name (QMNAME) specified.

  • Specify the correct queue manager name.
  • Correct channel routing problems.
  • Correct inetd listener configuration problems.
  • Correct client related configuration problems.