2017-05-02 34 views
0

MQのMQIVPサンプルを自分自身のサーバー接続チャネルlocal.server.conで変更しました。うまくいきました。しかし、PCFMessageAgentで同じチャンネルに接続しようとしましたが、MQログのエラーで接続に失敗しています。私のチャンネルとSYSTEM.DEFAULT.MODEL.QUEUEの関係は何ですか?エラーが発生します。IBM MQ - Java API - PCFMessageAgent - 接続に失敗しました

C:\Program Files\IBM\WebSphere MQ\Tools\wmqjava\samples>java -Djava.library.path="C:\Program Files\IBM\WebSphere MQ\java\lib" MQIVPMod 
Websphere MQ for Java Installation Verification Program 
5724-B4 (C) Copyright IBM Corp. 2002, 2014. All Rights Reserved. 
================================================================ 

Please enter the IP address of the MQ server     :10.40.1.16 
Please enter the port to connect to       : (1414)1415 
Please enter the server connection channel name    :local.server.con 
Please enter the user name (or RETURN for none)    :test 
Please enter the password for the user      :test123 
Please enter the queue manager name       :local 
Success: Connected to queue manager. 
Success: Opened SYSTEM.DEFAULT.LOCAL.QUEUE 
Success: Put a message to SYSTEM.DEFAULT.LOCAL.QUEUE 
Success: Got a message from SYSTEM.DEFAULT.LOCAL.QUEUE 
Success: Closed SYSTEM.DEFAULT.LOCAL.QUEUE 
Success: Disconnected from queue manager 


Tests complete - 
SUCCESS: This MQ Transport is functioning correctly. 
Press Enter to continue ... 

マイPCFMessageAgentコードとエラー:

new PCFMessageAgent(host, Integer.parseInt(port), channelName); // connect 

com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2035'. 
    at com.ibm.mq.MQDestination.open(MQDestination.java:323) 
    at com.ibm.mq.MQQueue.<init>(MQQueue.java:236) 
    at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:2674) 
    at com.ibm.mq.pcf.PCFAgent.open(PCFAgent.java:448) 
    at com.ibm.mq.pcf.PCFAgent.open(PCFAgent.java:394) 
    at com.ibm.mq.pcf.PCFAgent.connect(PCFAgent.java:287) 
    at com.ibm.mq.pcf.PCFAgent.<init>(PCFAgent.java:190) 
    at com.ibm.mq.pcf.PCFMessageAgent.<init>(PCFMessageAgent.java:157) 
    at test.wmq.PCFTest.main(PCFTest.java:49) 

そして、MQログ:

5/2/2017 14:01:31 - Process(6048.60) User(MUSR_MQADMIN) Program(amqzlaa0.exe) 
         Host(BLR_SWG_N09505) Installation(Installation1) 
         VRMF(8.0.0.4) QMgr(local) 

AMQ8077: Entity '[email protected]_swg_n09505' has insufficient authority to access 
object 'SYSTEM.DEFAULT.MODEL.QUEUE'. 

EXPLANATION: 
The specified entity is not authorized to access the required object. The 
following requested permissions are unauthorized: get 
ACTION: 
Ensure that the correct level of authority has been set for this entity against 
the required object, or ensure that the entity is a member of a privileged 
group. 
----- amqzfubn.c : 518 -------------------------------------------------------- 
5/2/2017 14:01:32 - Process(8004.41) User(MUSR_MQADMIN) Program(amqrmppa.exe) 
         Host(BLR_SWG_N09505) Installation(Installation1) 
         VRMF(8.0.0.4) QMgr(local) 

AMQ9208: Error on receive from host BLR_SWG_N09505 (10.40.1.16). 

EXPLANATION: 
An error occurred receiving data from BLR_SWG_N09505 (10.40.1.16) over TCP/IP. 
This may be due to a communications failure. 
ACTION: 
The return code from the TCP/IP recv() call was 10054 (X'2746'). Record these 
values and tell the systems administrator. 
----- amqccita.c : 4076 ------------------------------------------------------- 
5/2/2017 14:01:32 - Process(8004.41) User(MUSR_MQADMIN) Program(amqrmppa.exe) 
         Host(BLR_SWG_N09505) Installation(Installation1) 
         VRMF(8.0.0.4) QMgr(local) 

AMQ9999: Channel 'local.server.con' to host '10.40.1.16' ended abnormally. 

EXPLANATION: 
The channel program running under process ID 8004(7988) for channel 
'local.server.con' ended abnormally. The host name is '10.40.1.16'; in some 
cases the host name cannot be determined and so is shown as '????'. 
ACTION: 
Look at previous error messages for the channel program in the error logs to 
determine the cause of the failure. Note that this message can be excluded 
completely or suppressed by tuning the "ExcludeMessage" or "SuppressMessage" 
attributes under the "QMErrorLog" stanza in qm.ini. Further information can be 
found in the System Administration Guide. 
----- amqrmrsa.c : 930 -------------------------------------------------------- 

答えて

1

MQ権限(つまり権限)を読み込んで読み上げる必要があります。原則(UserId)ではなく、グループに対するアクセス許可を行うのが最善です。

setmqaut -m {QM_NAME} -n SYSTEM.ADMIN.COMMAND.QUEUE -t queue -g {GROUP} +put +inq +dsp 
setmqaut -m {QM_NAME} -n SYSTEM.DEFAULT.MODEL.QUEUE -t queue -g {GROUP} +get +inq +dsp 
1

チャンネルとモデル・キューの間には関係がありません。

私はPCFMessageAgentがレスポンスを受信するためにReplyToQとして使用する動的キューを作成しようとしていると思うし、SYSTEM.DEFAULT.MODEL.QUEUEを開いて動的キューを作成しようとしているようだ。

+0

チャネル上のPCFMessageAgentのサンプルコード/ Docはありますか? – itsraja

関連する問題