IBM MQ - Java api - PCFMessageAgent - connection fails

itsraja

I changed the MQIVP sample in MQ with a server connection channel of my own local.server.con and it is working fine. But I tried connecting to the same channel with PCFMessageAgent and the connection is failing with errors in MQ log. What is the relation between my channel and SYSTEM.DEFAULT.MODEL.QUEUE which gives the error.

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 ...

My PCFMessageAgent code and error:

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)

And the MQ log :

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 'test@blr_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 --------------------------------------------------------
Roger

You need to go and read up on MQ permissions (i.e. authorizations). It is best to do permissions on the group rather than principle (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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

IBM MQ: Establishing an SSL connection

Monitoring IBM MQ with java

ibm WebSphere MQ pausing the queue through java api

Command to Replace Connection Name in IBM MQ

JmsTemplate with CachingConnectionFactory Connection Recovery for IBM MQ Queue

Reconnecting to IBM MQ Queue on connection failure

IBM MQ 2538 error negotiating an SSL connection

Establish connection between IBM MQ and ActiveMQ

Config connection node js app with IBM MQ

Program to create a connection and access IBM MQ 7

Implement IBM MQ COA in Java

IBM MQ AMS with java clients

Can you check to see if an IBM MQ topic is up and available through a Java application before attempting to create a connection?

IBM MQ Rest Api communication via mqweb

Problem Connecting a Java Client (JMS) to a IBM MQ

Durable Subscriptions in IBM MQ Java classes

IBM MQ: reconnect to message broker in case of connection error after startup

Get IBM MQ connection factory in my spring boot application

How to use the userId in MQCSP for IBM MQ connection authentication in C client

IBM MQ : Any way to get connection interruption notification?

IBM MQ Java Error :: java.lang.ClassNotFoundException: com.ibm.mq.internal.MQCommonServices

Produce messages to IBM MQ using REST API. Apache Camel

IBM MQ - MQ Client Connecting to a MQ Cluster

OpenLiberty JakartaEE with IBM MQ Resorce Adapater - java.lang.NoClassDefFoundError

Is it possible to connect to a locally running IBM MQ Light with Java and JMS?

JMeter JMS Publisher IBM MQ Java.lang.NoClassDefFoundError

Getting error message while initializing IBM MQ from java class

Visual Studio 2017: Connection to IBM.Data.DB2 fails

Send to MQ from java always uses default installed mqm userid for IBM MQ version 6.0

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  3. 3

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  4. 4

    pump.io port in URL

  5. 5

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  8. 8

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

  9. 9

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  10. 10

    How to remove the extra space from right in a webview?

  11. 11

    java.lang.NullPointerException: Cannot read the array length because "<local3>" is null

  12. 12

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  13. 13

    flutter: dropdown item programmatically unselect problem

  14. 14

    How to use merge windows unallocated space into Ubuntu using GParted?

  15. 15

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  16. 16

    Nuget add packages gives access denied errors

  17. 17

    Svchost high CPU from Microsoft.BingWeather app errors

  18. 18

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  19. 19

    12.04.3--- Dconf Editor won't show com>canonical>unity option

  20. 20

    Any way to remove trailing whitespace *FOR EDITED* lines in Eclipse [for Java]?

  21. 21

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

HotTag

Archive