Author |
Message
|
MaxPowers |
Posted: Thu Oct 16, 2003 11:14 am Post subject: Connecting to remote queue using VB.Net and MQAX200 |
|
|
Newbie
Joined: 16 Oct 2003 Posts: 3
|
I am trying to connect to a Win2k server running Websphere MQ. The queue manager's name is MQ_PORTAL. I have setup a server channel named CH1 and added the environment variable MQServer=CHL1/TCP/X.XX.XXX.XX(1414). I am trying to access the remote queue manager with the following VB.net code:
Dim mqSession As New MQAX200.MQSession
Dim mqQueueMgr As MQAX200.MQQueueManager
mqQueueMgr = CType(mqSession.AccessQueueManager("MQ_PORTAL"), MQAX200.MQQueueManager)
Dim mqQueue As mqQueue = CType(mqQueueMgr.AccessQueue(_requestQueueName, MQ_PUT_OPTIONS), MQAX200.MQQueue)
I am receiving the following error:
ReasonCode = 2058, ReasonName = MQRC_Q_MGR_NAME_ERROR,
stating the queue manager is not vaild.
Any thoughts? _________________ Thanks,
Max |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Oct 16, 2003 2:05 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I've found that a 2058 usually indicates that you found a qmgr, but you have the wrong name. Issue the dspmq command and verify the name (including the case). |
|
Back to top |
|
 |
MaxPowers |
Posted: Fri Oct 17, 2003 7:38 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2003 Posts: 3
|
It is probably finding my client queue manager, but I need to use queue manager on the server. _________________ Thanks,
Max |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 17, 2003 7:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Are you sure that the listener for MQ_PORTAL is running on port 1414?
If it's running on a different port, and there is a listener for some other queue manager running on 1414, you will get a 2058. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Oct 17, 2003 7:50 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Well I just ran across this one yesterday
When you do the following and leave a space between the = sign and the rest of the definition you get a 2058 ????
SET MQSERVER= SYSYEM.DEF.SVRCONN/TCP/HOST(PORT) _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
MaxPowers |
Posted: Fri Oct 17, 2003 11:20 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2003 Posts: 3
|
I should also mention that the amqsputc DOS command works correctly. It puts a message on the remote server as I would expect. It is the .Net code where I am receiving the 2058 error. _________________ Thanks,
Max |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Oct 17, 2003 11:35 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Where your .net code is running is MQServer Installed or just client ???
and if you installed just client did you install it from the client CD or the server CD ??? _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
rbharatha |
Posted: Sun Oct 19, 2003 11:40 pm Post subject: |
|
|
Newbie
Joined: 18 Oct 2003 Posts: 5
|
Hi Maxx
Dim oMqEnvironment As MQEnvironment
Dim m_sQChannelName as string = "CHL1"
Dim m_sHostName as string = MQ Server Name
Dim oMqQMgr As MQQueueManager
'
oMqEnvironment.Channel = m_sQChannelName
oMqEnvironment.Hostname = m_sHostName
oMqEnvironment.Port = m_nHostPortNo
by using the above code of lines there is no need to set in the environment on the system.
m_sChannelDefinition = m_sQChannelName & "/TCP/" & m_sHostName & (1414)
'try to connect to the MQ Host by QueueMgr and Channel parameters
oMqQMgr = New MQQueueManager(MQ_PORTAL, m_sChannelName, m_sConnectionName)
by this you should be able to connect _________________ Ramesh Bharata |
|
Back to top |
|
 |
|