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 » General Discussion » MQRC_Q_MGR_NOT_AVAILABLE Problem

Post new topic  Reply to topic
 MQRC_Q_MGR_NOT_AVAILABLE Problem « View previous topic :: View next topic » 
Author Message
sagitwang
PostPosted: Mon Dec 01, 2008 3:33 am    Post subject: MQRC_Q_MGR_NOT_AVAILABLE Problem Reply with quote

Novice

Joined: 01 Dec 2008
Posts: 13

Hi

I am pretty new to MQ, currently have no idea of solving this MQRC_Q_MGR_NOT_AVAILABLE problem.

I have installed the MQ client 6 on my machine and MQ server 6 on another machine in the same cluster.

I have been trying to connect to the server from the client machine using the following code(downloaded from the Internet).

using System;
using System.Collections;

using IBM.WMQ;

namespace MQexample
{
class MQSeriesClass
{
//MQQueueManager queueManager;
MQQueue queue;
MQMessage queueMessage;
MQPutMessageOptions queuePutMessageOptions;
MQGetMessageOptions queueGetMessageOptions;

const String connectionType = MQC.TRANSPORT_MQSERIES_CLIENT;

string connectionName;
string message;


[STAThread]
static void Main(string[] args)
{


MQSeriesClass mqSeries = new MQSeriesClass();


if( mqSeries.putTheMessageIntoQueue() )
mqSeries.GetMessageFromTheQueue();

Console.ReadLine();

}

bool putTheMessageIntoQueue()
{
bool success = true;

try
{
Hashtable connectionProperties = init(MQC.TRANSPORT_MQSERIES_CLIENT);

MQQueueManager qManager = new MQQueueManager("QM_damarel_mward", connectionProperties);
//MQQueueManager qManager = new MQQueueManager("QM_damarel_mward", "TO_QM_damarel_mward", "damarel-mward.damarel.com");
// queueManager = new MQQueueManager(QueueManagerName, channelName, connectionName);

queue = qManager.AccessQueue("default", MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING);
Console.WriteLine("Enter the message to put in MQSeries server:");
message = System.Console.ReadLine();
int msgLen = message.Length;

while (msgLen == 0)
{
if (msgLen == 0)
Console.WriteLine("Please reenter the message:");
message = System.Console.ReadLine();
msgLen = message.Length;
}


queueMessage = new MQMessage();
queueMessage.WriteString(message);
queueMessage.Format = MQC.MQFMT_STRING;
queuePutMessageOptions = new MQPutMessageOptions();

//putting the message into the queue
queue.Put(queueMessage, queuePutMessageOptions);

Console.WriteLine("Success fully entered the message into the queue");
}
catch (MQException mqexp)
{
Console.WriteLine("MQSeries Exception: " + mqexp.Message);
success = false;
}

return success;
}

/// <summary>
/// Initialise the connection properties for the connection type requested
/// </summary>
/// <param name="connectionType">One of the MQC.TRANSPORT_MQSERIES_ values</param>
static Hashtable init(String connectionType)
{
Hashtable connectionProperties = new Hashtable();

// Add the connection type
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, "damarel-mward.damarel.com");
connectionProperties.Add(MQC.CHANNEL_PROPERTY, "TO_QM_damarel_mward");
connectionProperties.Add(MQC.PORT_PROPERTY, 1414);
//connectionProperties.Add(MQC.USER_ID_PROPERTY, "mqtest");
//connectionProperties.Add(MQC.PASSWORD_PROPERTY, "Web5phere");
break;
}

return connectionProperties;
}

public void GetMessageFromTheQueue()
{
Hashtable connectionProperties = init(MQC.TRANSPORT_MQSERIES_CLIENT);

MQQueueManager qManager = new MQQueueManager("QM_damarel_mward", connectionProperties);
// queueManager = new MQQueueManager(QueueManagerName, channelName, connectionName);
queue = qManager.AccessQueue("default", MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_FAIL_IF_QUIESCING);
queueMessage = new MQMessage();
queueMessage.Format = MQC.MQFMT_STRING;
queueGetMessageOptions = new MQGetMessageOptions();

try
{
queue.Get(queueMessage, queueGetMessageOptions);

// Received Message.
System.Console.WriteLine("Received Message: {0}", queueMessage.ReadString(queueMessage.MessageLength));

}
catch (MQException MQExp)
{
// report the error
System.Console.WriteLine("MQQueue::Get ended with " + MQExp.Message);
}
}

}
}

Following information is what I have got from the Server machine

C:\Documents and Settings\mward>runmqsc QM_damarel_mward
5724-H72 (C) Copyright IBM Corp. 1994, 2004. ALL RIGHTS RESERVED.
Starting MQSC for queue manager QM_damarel_mward.

dis channel(*)
4 : dis channel(*)
AMQ8414: Display Channel details.
CHANNEL(RCV_QM_damarel_mward) CHLTYPE(RCVR)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.AUTO.RECEIVER) CHLTYPE(RCVR)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.AUTO.SVRCONN) CHLTYPE(SVRCONN)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.DEF.CLUSRCVR) CHLTYPE(CLUSRCVR)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.DEF.CLUSSDR) CHLTYPE(CLUSSDR)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.DEF.RECEIVER) CHLTYPE(RCVR)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.DEF.REQUESTER) CHLTYPE(RQSTR)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.DEF.SENDER) CHLTYPE(SDR)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.DEF.SERVER) CHLTYPE(SVR)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.DEF.SVRCONN) CHLTYPE(SVRCONN)
AMQ8414: Display Channel details.
CHANNEL(S_damarel_mward) CHLTYPE(SVRCONN)
AMQ8414: Display Channel details.
CHANNEL(TO_QM_damarel_mward) CHLTYPE(CLUSRCVR)
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.DEF.CLNTCONN) CHLTYPE(CLNTCONN)

Can any1 help?

Thanks in advance

Xi
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Dec 01, 2008 3:39 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Search this forum for the 2059 reason code; the numeric form of QMGR_NOT_AVAILABLE. It's about the most common code and has a multitude of possible causes, almost all of which have been discussed in here along with their resolution.

Look through them and check your general configuration. Do not assume it's a problem in your code or the objects on your queue manager. In many cases this code is thrown when both application & queue manager are working properly.

Have fun!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sagitwang
PostPosted: Mon Dec 01, 2008 3:45 am    Post subject: Reply with quote

Novice

Joined: 01 Dec 2008
Posts: 13

CCSID supplied for data conversion not supported.

The program ended because, either the source CCSID '437' or the target CCSID '1381' is not valid, or is not currently supported.

Correct the CCSID that is not valid, or ensure that the requested CCSID can be supported.


this is the information shown in the Application Logging
Back to top
View user's profile Send private message
exerk
PostPosted: Mon Dec 01, 2008 3:59 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

sagitwang wrote:
...The program ended because, either the source CCSID '437' or the target CCSID '1381' is not valid, or is not currently supported...


437 is the MS-DOS codepage, 1381 is the Cyrillic code page. What is set on each of the client/server ends?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
sagitwang
PostPosted: Mon Dec 01, 2008 4:09 am    Post subject: Reply with quote

Novice

Joined: 01 Dec 2008
Posts: 13

on the client machine, I did

chcp 1381, it says: Invalid Code Page

How can I go around this?

Thanks again.
Back to top
View user's profile Send private message
exerk
PostPosted: Mon Dec 01, 2008 4:22 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

From the Info Center:


Quote:
Choosing client or server coded character set identifier (CCSID)

The data passed across the MQI from the application to the client stub should be in the local coded character set identifier (CCSID), encoded for the WebSphere MQ client. If the connected queue manager requires the data to be converted, this is done by the client support code.

The client code assumes that the character data crossing the MQI in the client is in the CCSID configured for that machine. If this CCSID is an unsupported CCSID or is not the required CCSID, it can be overridden with the MQCCSID environment variable, for example on Windows®:

SET MQCCSID=850

Or, on UNIX® or Linux® systems:

export MQCCSID=850

Set this in the profile and all MQI data will be assumed to be in code page 850.

Note: This does not apply to application data in the message.

_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
sagitwang
PostPosted: Tue Dec 02, 2008 6:13 am    Post subject: Reply with quote

Novice

Joined: 01 Dec 2008
Posts: 13

exerk wrote:
From the Info Center:


Quote:
Choosing client or server coded character set identifier (CCSID)

The data passed across the MQI from the application to the client stub should be in the local coded character set identifier (CCSID), encoded for the WebSphere MQ client. If the connected queue manager requires the data to be converted, this is done by the client support code.

The client code assumes that the character data crossing the MQI in the client is in the CCSID configured for that machine. If this CCSID is an unsupported CCSID or is not the required CCSID, it can be overridden with the MQCCSID environment variable, for example on Windows®:

SET MQCCSID=850

Or, on UNIX® or Linux® systems:

export MQCCSID=850

Set this in the profile and all MQI data will be assumed to be in code page 850.

Note: This does not apply to application data in the message.


Thanks a lot.

And one more question. Now I got MQRC_NOT_AUTHORIZED
I think that this is due to the domain thing.

I have add my account into the security group(domain MQM) which server runs on.
anyone has any idea of this?

and btw, in order to change the OS default code page, should I go to the control panel and Region->Advanced->Language Unicode Programme? Why after I changed it into English United States and reboot, the code page still 936...Have I missed out something? or my xp system is now having problem

Thanks in advance

Xi
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Dec 02, 2008 6:28 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

sagitwang wrote:
...And one more question. Now I got MQRC_NOT_AUTHORIZED
I think that this is due to the domain thing.

I have add my account into the security group(domain MQM) which server runs on.
anyone has any idea of this?


Get the appropriate authorisations set on the objects you want to access, for a user not in the 'mqm' group (have a 'service' user created if necessary), and set that user as the MCAUSER.

sagitwang wrote:
and btw, in order to change the OS default code page, should I go to the control panel and Region->Advanced->Language Unicode Programme? Why after I changed it into English United States and reboot, the code page still 936...Have I missed out something? or my xp system is now having problem

Thanks in advance

Xi


Start -> Control Panel -> Regional and Language Options and choosing a different language code page worked for me.[/b]
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
sagitwang
PostPosted: Tue Dec 02, 2008 7:08 am    Post subject: Reply with quote

Novice

Joined: 01 Dec 2008
Posts: 13

exerk wrote:
sagitwang wrote:
...And one more question. Now I got MQRC_NOT_AUTHORIZED
I think that this is due to the domain thing.

I have add my account into the security group(domain MQM) which server runs on.
anyone has any idea of this?


Get the appropriate authorisations set on the objects you want to access, for a user not in the 'mqm' group (have a 'service' user created if necessary), and set that user as the MCAUSER.

sagitwang wrote:
and btw, in order to change the OS default code page, should I go to the control panel and Region->Advanced->Language Unicode Programme? Why after I changed it into English United States and reboot, the code page still 936...Have I missed out something? or my xp system is now having problem

Thanks in advance

Xi


Start -> Control Panel -> Regional and Language Options and choosing a different language code page worked for me.[/b]


thanks exerk
I will double check the domain thing. I think that something is broken in my OS which causes the code page problem, but I can override the default value, so it's not a big problem.

Thanks again

Xi
Back to top
View user's profile Send private message
sagitwang
PostPosted: Tue Dec 02, 2008 9:00 am    Post subject: Is there a way to use MQ C# library to transfer a file? Reply with quote

Novice

Joined: 01 Dec 2008
Posts: 13

R there any ways to use C# applcation sending a file rather than just put message onto the queue? I failed to find out the example code from the Internet.

Thanks in advance
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 » General Discussion » MQRC_Q_MGR_NOT_AVAILABLE Problem
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.