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 » Cannot access Websphere MQ on new Windows machine

Post new topic  Reply to topic
 Cannot access Websphere MQ on new Windows machine « View previous topic :: View next topic » 
Author Message
plivingstone
PostPosted: Tue Nov 11, 2014 9:05 am    Post subject: Cannot access Websphere MQ on new Windows machine Reply with quote

Novice

Joined: 11 Nov 2014
Posts: 11

Hi,

I am a newbie on Websphere MQ setup and configuration, so I am sorry of this question has already been asked ...

I have an application that has been working fine on a Windows XP box, and a Windows Server 2008 server (64 bit).

It connects to an IBM iSeries/AS400 Message Queue.

Now I need to upgrade the code and deploy it on a new Win7 64 bit machine.

So I ran the setup for Websphere MQ (it's in a folder 'mqc6_6.0.2.6_win\Windows') and it then ran the Prepare Websphere MQ Wizard which also finished successfully.

But when I run my application I get the error
Quote:
MQRC_Q_MGR_NAME_ERROR


as I say, this application runs fine on other machines including a 64 bit machine with the same Message Queue, so what am I missing?

Is there something else I need to do for the setup?

Thanks for any help
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Nov 11, 2014 10:34 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Look at the error logs on the iSeries box. What error do you find there?

How does the app execution on Windows specify connection information? MQSERVER= or client channel definition table (CCDT) to the iSeries box?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
plivingstone
PostPosted: Tue Nov 11, 2014 11:26 am    Post subject: RE: connection Reply with quote

Novice

Joined: 11 Nov 2014
Posts: 11

Hi,

Thanks for your reply. here is the code that tries to access the queue (in c#):

Code:

Hashtable connectionProperties = init(connectionType);

MQQueueManager gMQQueueManager = new MQQueueManager(); // IBM.WMQ.MQQueueManager
MQQueue gMQQueue;

// Initialise new queue manager
gMQQueueManager = new MQQueueManager(QManager, connectionProperties);

if (gMQQueueManager != null)
    {
    //int openOptions = MQC.MQOO_INQUIRE;
    gMQQueue = gMQQueueManager.AccessQueue(QName, MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_BROWSE + MQC.MQOO_FAIL_IF_QUIESCING + MQC.MQOO_INQUIRE); //AccessQueue(qName, openOptions);
    depth = gMQQueue.CurrentDepth;
    MQDepth = (depth > 0) ? depth.ToString() : "0";

    // Close MQ Queue
    gMQQueue.Close();
    }


and the settings used are:

* hostname="IP ADDRESS"
* channel="SYSTEM.DEF.SVRCONN"
* qmanager="BOCTEST"
* QName="BOC.TO.EDB"

plus of course there are the standard connection properties. stored in the HashTable connectionProperties and these are set in the 'init' function like this:

Code:

    connectionProperties.Add(MQC.TRANSPORT_PROPERTY, connectionType);

    // Set up the rest of the connection properties, based on the
    // connection type requested
    switch (connectionType)
        {
        case MQC.TRANSPORT_MQSERIES_BINDINGS:
            break;
        case MQC.TRANSPORT_MQSERIES_CLIENT:
        case MQC.TRANSPORT_MQSERIES_XACLIENT:
        case MQC.TRANSPORT_MQSERIES_MANAGED:
            connectionProperties.Add(MQC.HOST_NAME_PROPERTY, hostName);
            connectionProperties.Add(MQC.CHANNEL_PROPERTY, channel);
            break;
        }
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Nov 11, 2014 1:38 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Look at the error logs on the iSeries box. What error do you find there?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
plivingstone
PostPosted: Wed Nov 12, 2014 2:07 am    Post subject: Environment Variabls (DOH!) Reply with quote

Novice

Joined: 11 Nov 2014
Posts: 11

So the solution was annoyingly and gratifyingly simple...

We need to specify the MQSERVER in an environment variable, which I had missed.

So once I set MQSERVER=SYSTEM.DEF.SVRCONN/TCP/BOCTEST it worked fine.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Wed Nov 12, 2014 2:25 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

MQ version 6.0.2.6? You are running in the dark ages! You should have installed a version that is supported by IBM.

There should be no need to set MQSERVER, all that config info should be set in the connection properties in the Java prog.
_________________
Glenn
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 12, 2014 5:55 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

gbaddeley wrote:
MQ version 6.0.2.6? You are running in the dark ages! You should have installed a version that is supported by IBM.

There should be no need to set MQSERVER, all that config info should be set in the connection properties in the Java prog.


I thought you missed something... This is C# and not java. So yes there is need for the MQSERVER environment variable...although we were not told what the content of the hashtable was in the connection call....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gbaddeley
PostPosted: Sun Nov 16, 2014 4:28 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

Sorry, it is C#, not Java. My bad.
_________________
Glenn
Back to top
View user's profile Send private message
vsathyan
PostPosted: Mon Dec 29, 2014 8:27 am    Post subject: Reply with quote

Centurion

Joined: 10 Mar 2014
Posts: 121

Comment out the below line
Code:

MQQueueManager gMQQueueManager = new MQQueueManager(); // IBM.WMQ.MQQueueManager


and use like below

Code:

MQQueueManager gMQQueueManager = new MQQueueManager(QManager, connectionProperties);
 


You will be able to connect without setting the MQSERVER environment variable provided that you have set the MQC.CHANNEL_PROPERTY, MQC.HOSTNAME_PROPERTY, MQC.PORT_PROPERTY and MQC.TRANSPORT_PROPERTY in the hashtable. And yes, you will NOT face MQRC_Q_MGR_NAME_ERROR also.

Have fun.
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 » Cannot access Websphere MQ on new Windows machine
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.