|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PowerShell + .NET MQ classes getting 2058 on multi-inst QMgr |
« View previous topic :: View next topic » |
Author |
Message
|
xeonix |
Posted: Wed Jan 28, 2015 8:45 am Post subject: PowerShell + .NET MQ classes getting 2058 on multi-inst QMgr |
|
|
 Apprentice
Joined: 02 Apr 2013 Posts: 32
|
Hello, guys!
I need to write some PowerShell to automate administrative tasks.
In order to do that - I need to use .NET MQ Classes.
So I got multi-instance QMgr:
I have 2 nodes in my Windows 2008 R2 Failover cluster (Active/Passive configuration).
According to infocenter's manual I successfully configured WS MQ 7.5.0.2:
1. On first node I created QMgr "QMWAY"
2. Made failover to second node.
3. Added instance of QMgr "QMWAY" on the second node.
Everything works fine, including FTE and IIB.
I've executed "%MQ_FILE_PATH%\bin\amqiregisterdotnet.cmd" on both nodes in order to put .NET MQ classes assemblies to GAC. All assemblies were successfully installed.
Now I'm starting my PS (PowerShell 1.0) script with following stuff:
Add-Type -AssemblyName "amqmdnet, Version=7.5.0.2, Culture=neutral, PublicKeyToken=dd3cb1c9aae9ec97"
$qmgr = New-Object IBM.WMQ.MQQueueManager("QMWAY")
but constantly getting 2058 aka MQRC_Q_MGR_NAME_ERROR at second line when running it on second node. I tried to run these lines on PowerShell x64, then x86 (32 bit), as Administrator and as regular user (that is a member of "mqm" group) and even as user my QMgr is running under. Still no luck.
When I'm making failover to first node (where QMgr was originally created) - script works like a charm.
But, when active node is second one (where I added QMgr instance) - getting 2058 whatever I do in PowerShell.
The weird thing is, that my QMgr "QMWAY" is up and running, it's displayed by "dspmq" and I'm able to connect to it with MQ Explorer. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|