ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » MQOPEN call fails with a 2085 on a CLUSTER ALIAS queue

Post new topic  Reply to topic
 MQOPEN call fails with a 2085 on a CLUSTER ALIAS queue « View previous topic :: View next topic » 
Author Message
klingelb
PostPosted: Thu Feb 13, 2003 12:16 pm    Post subject: MQOPEN call fails with a 2085 on a CLUSTER ALIAS queue Reply with quote

Apprentice

Joined: 25 Sep 2002
Posts: 28

I get a 2085... unknown object name when trying to open a cluster alias queue on a QM that has nothing but system queues and cluster alias queues(i.e. a loadbalancing gateway QM). My program(java using a client connection) specifies the following mqopen options:

MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_OUTPUT | MQC.MQOO_ALTERNATE_USER_AUTHORITY | MQC.MQOO_BIND_AS_Q_DEF

The defbind attribute on the cluster alias queues is set to ON_OPEN, but I have also tried NOT_FIXED. Neither seems to work.

The program makes a direct connection the the Gateway QM... it is not routed to the Gateway by some other QM.

I can however with another program(c++ using a client connection) open the same cluster alias queue on the same QM and put a message. So it seems to me that my java program is not specifying the appropriate mqopen options, but it seems like I've tried them all.

Any ideas?

ps. I have the source for the java program, but not the c++ program so I don't know what mqopen options it uses
Back to top
View user's profile Send private message
vennela
PostPosted: Thu Feb 13, 2003 3:21 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

If you are sure that both JAVA pgm and C++ program are pointing to same queue manager then may be you should double check the spelling (lower case/ upper case) of the queue name.

Can you PUT to these queues
SYSTEM.DEFAULT.LOCAL.QUEUE and SYSTEM.DEFAULT.ALIAS.QUEUE ?

If you can PUT to these queues then you should be able to PUT to the other queue also (provided the cluster queue definition is propogated)

-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
klingelb
PostPosted: Fri Feb 14, 2003 7:26 am    Post subject: Reply with quote

Apprentice

Joined: 25 Sep 2002
Posts: 28

Yes my java program can put messages to both SYSTEM.DEFAULT.LOCAL.QUEUE and SYSTEM.DEFAULT.ALIAS.QUEUE.
Doesn't matter though that these queues are local to the Gateway QM and the queue that my java program cannot put to is advertised to the cluster from a remote queue manager. In other words, when I look at the Gateway QM the only queues I see(aside from the SYSTEM queues) are the cluster queues that live on the remote qmgrs in the cluster.
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Feb 14, 2003 8:07 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If I understand your problem, I think it is caused by the fact that you are specifying both a queue manager and queue when you open the queue. By specifying both, you are telling MQ that you know that this queue (not cluster queue) exists on this QM and this is the copy that you want to use. If you can specify the code fragment where you get your qmgr and queue, it will help determine this.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
klingelb
PostPosted: Fri Feb 14, 2003 8:19 am    Post subject: Reply with quote

Apprentice

Joined: 25 Sep 2002
Posts: 28

The following are 3 functions: refreshConnProps, refreshQmgr, and refreshQ. In the 1st I create the HashTable of connection properties if it does not exist already. In the 2nd I create the qmgr connection using the
newly created HashTable. In the 3rd I create the queue handle with the
queue name, openOptions(see first topic post), qmgr name, empty string for dynamic queue name, and the uid.

//Refresh the Connection Properties
public void refreshConnProps() {
if(this.connProps == null){
Hashtable connProps = new Hashtable();
connProps.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES);
connProps.put(MQC.HOST_NAME_PROPERTY, this.host);
connProps.put(MQC.PORT_PROPERTY, new Integer(this.port));
connProps.put(MQC.CHANNEL_PROPERTY, "SYSTEM.DEF.SVRCONN");
connProps.put(MQC.USER_ID_PROPERTY, this.uid);
this.connProps = connProps;
}
}

//Refresh the qmgr connection
public void refreshQmgr(int i) throws MQException {
try{
refreshConnProps();
this.qmgr = new MQQueueManager(this.qmgrname, this.connProps);
try{
this.log.write(("MQDriver: Client " + i + " is connected to queue manager: " + this.qmgrname + " with uid: " + this.uid + " at time " + new Date().toString() + "\n").getBytes());
}
catch(IOException e){
System.out.println("MQDriver: Unable to write to logfile(mqput thread)");
}
}
catch(MQException e) {
if(e.reasonCode == 2035){
System.out.println("MQDriver: Client " + i + " is not authorized to connect to QM: " + this.qmgrname + " with uid: " + this.uid);
try{
this.log.write(("MQDriver: Client " + i + " is not authorized to connect to QM: " + this.qmgrname + " with uid: " + this.uid + "\n").getBytes());
throw new MQException(e.completionCode,e.reasonCode,e.getMessage());
}
catch(IOException y){
System.out.println("MQDriver: Unable to write to logfile(mqput thread)");
throw new MQException(e.completionCode,e.reasonCode,e.getMessage());
}
}
else
throw new MQException(e.completionCode,e.reasonCode,e.getMessage());
}

//Refresh the queue handle
public void refreshQ(int i) throws MQException {
try{
this.q = this.qmgr.accessQueue(this.qname, this.qOpenOpt, this.qmgrname, "", this.uid);
try{
this.log.write(("MQDriver: Client " + i + " has opened queue: " + this.qname + "\n").getBytes());
}
catch(IOException e){
System.out.println("MQDriver: Unable to write to logfile(mqput thread)");
}
}
catch(MQException e) {
if(e.reasonCode == 2035){
System.out.println("MQDriver: Client " + i + " is not authorized to open: " + this.qname + " with uid: " + this.uid);
try{
this.log.write(("MQDriver: Client " + i + " is not authorized to open: " + this.qname + " with uid: " + this.uid + "\n").getBytes());
throw new MQException(e.completionCode,e.reasonCode,e.getMessage());
}
catch(IOException y){
System.out.println("MQDriver: Unable to write to logfile(mqput thread)");
throw new MQException(e.completionCode,e.reasonCode,e.getMessage());
}
}
else
throw new MQException(e.completionCode,e.reasonCode,e.getMessage());
}
}

}
Back to top
View user's profile Send private message
klingelb
PostPosted: Fri Feb 14, 2003 8:28 am    Post subject: Reply with quote

Apprentice

Joined: 25 Sep 2002
Posts: 28

If I don't specify a queue name how will the Gateway QM know which cluster alias queue it is that I want the message to go to.
Back to top
View user's profile Send private message
vennela
PostPosted: Fri Feb 14, 2003 8:42 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

If you go by Bower's suggestion then you should do this:



Code:
public void refreshQ(int i) throws MQException {
try{

this.q = this.qmgr.accessQueue(this.qname, this.qOpenOpt, "", "", this.uid);
// The bove line has been changed
try{
this.log.write(("MQDriver: Client " + i + " has opened queue: " + this.qname + "\n").getBytes());
}


Instead of
Code:
public void refreshQ(int i) throws MQException {
try{
this.q = this.qmgr.accessQueue(this.qname, this.qOpenOpt, this.qmgrname, "", this.uid);
try{
this.log.write(("MQDriver: Client " + i + " has opened queue: " + this.qname + "\n").getBytes());
}
Back to top
View user's profile Send private message Send e-mail Visit poster's website
klingelb
PostPosted: Fri Feb 14, 2003 8:57 am    Post subject: Reply with quote

Apprentice

Joined: 25 Sep 2002
Posts: 28

When I try...

this.q = this.qmgr.accessQueue(this.qname, this.qOpenOpt, "", "", this.uid);

I get 2097 ... Context Handle error.

Does that mean that I've passed the 2085 hurdle?
Back to top
View user's profile Send private message
vennela
PostPosted: Fri Feb 14, 2003 9:27 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

I think so.

Doesn't the file you are logging the program flow say so ?

I think you should lok at OpenOptions and PutMessageOptions for the new error

-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
klingelb
PostPosted: Fri Feb 14, 2003 9:36 am    Post subject: Reply with quote

Apprentice

Joined: 25 Sep 2002
Posts: 28

Woohoo... it works now. Thanks vennela and bower.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQOPEN call fails with a 2085 on a CLUSTER ALIAS queue
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.