Reputation: 101
I am writing a simple java program to connect to remote WebSphere MQ Queue Manager but its showing the error: MQJE001: Completion Code '2', Reason '2009'
Yet when I connect using WMQ Explorer, its getting connected and I am able to see the messages in the queue there. Kindly help. My code is:
public void init(){
props.put(MQC.HOST_NAME_PROPERTY, "sailmq3d.pok.ibm.com");
props.put(MQC.CHANNEL_PROPERTY, "PLM.SECURE.SVRCONN");
props.put(MQC.PORT_PROPERTY, 1423); // port number
props.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES);
}
public void start(){
try {
// Create a connection to the queue manager
qMgr = new MQQueueManager("PLMESB_SBMD2",props);
Upvotes: 2
Views: 2805
Reputation: 31842
Wow, this is kinda cool - for once I can actually see the QMgr from the SO posted question!
The PLM.SECURE.SVRCONN
channel definition looks like this:
AMQ8414: Display Channel details.
CHANNEL(PLM.SECURE.SVRCONN) CHLTYPE(SVRCONN)
ALTDATE(2011-01-30) ALTTIME(15.02.56)
COMPHDR(NONE) COMPMSG(NONE)
DESCR( ) HBINT(300)
KAINT(AUTO) MAXINST(999999999)
MAXINSTC(999999999) MAXMSGL(4194304)
MCAUSER(nobody) MONCHL(QMGR)
RCVDATA( ) RCVEXIT( )
SCYDATA( )
SCYEXIT(/var/mqm/exits64/PLMESB_SBMD2/ESBSecurityExit(ChannelExit))
SENDDATA( ) SENDEXIT( )
SHARECNV(10) SSLCAUTH(REQUIRED)
SSLCIPH( ) SSLPEER( )
TRPTYPE(TCP)
Given that there is a custom security exit on that channel, it's not possible to say why you receive a 2009 return code. Probably the best bet is to look at the security exit logs.
The connection through WMQ Explorer is probably using SYSTEM.ADMIN.SVRCONN
which has no exit.
I see that there is also a CLNTCONN defined for that channel and it requires a client-side exit. If your Java client uses a Client Conn Definition Table (CCDT) then this would further complicate matters. The fact that the CLNTCONN exists and lists a client-side exit suggests that PLM.SECURE.SVRCONN
won't work without that client-side exit.
Upvotes: 0