Author |
Message
|
DaeMoohn |
Posted: Fri Jun 04, 2010 7:25 am Post subject: Unable to connect to MQ 6 from XMS2.0 - error 2538 |
|
|
Apprentice
Joined: 04 Jun 2010 Posts: 26
|
Hi,
We are trying to migrate an already existing implementation made with MQ Classes for .NET to XMS 2.0 to speed up a bit an support new features (connecting to Queue Manager takes 17 seconds and I don't have access to server to run diagnostics and the other part doesn't care yet).
The old application caches connections (by design), everything runs smooth except that detail. Now, when trying to connect using XMS 2.0 (server has 6.0.2.x) with this code:
XMSFactoryFactory factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
IConnectionFactory connectionFactory = factoryFactory.CreateConnectionFactory();
connectionFactory.SetStringProperty(XMSC.WMQ_CHANNEL, "sasa");
connectionFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, "sasa");
connectionFactory.SetIntProperty(XMSC.WMQ_PORT, 1414);
connectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "sasa");
connectionFactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT);
connectionFactory.SetStringProperty(XMSC.WMQ_PROVIDER_VERSION, "6");
connectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_NAME, "sasa");
connection = connectionFactory.CreateConnection(null, null); <<<-exception here!!!
I get an exception.
The XMS trace is this:
[04/06/2010 17:39:44:464892 GTB Standard Time] 00000010 d UOW= source=IBM.WMQ.MQTCPConnection org=IBM prod=WebSphere component=Message Service Client for .NET thread=[1 : 0]
Exception in method ConnectSocket(string,string,MQLONG)
[04/06/2010 17:39:44:468892 GTB Standard Time] 00000010 X UOW= source=IBM.WMQ.MQTCPConnection org=IBM prod=WebSphere component=Message Service Client for .NET thread=[1 : 0]
System.NullReferenceException: Object reference not set to an instance of an object.
at IBM.WMQ.MQTCPConnection.ConnectSocket(String localAddr, String connectionName, Int32 options)
[04/06/2010 17:39:44:471892 GTB Standard Time] 00000010 d UOW= source= org=IBM prod=WebSphere component=Message Service Client for .NET thread=[1 : 0]
MQException CompCode: 2 Reason: 2538
Can you please provide me with some advice? I am quite a beginner in XMS world. I passed null to the method because I have no userid, nor password setup on server (or I don't know any, as I can't control the server). Providing the above details in MQ Classes for .NET worked? Am I missing something?
Any help is really appreciated.
[edit]Client is 7.0.1.2 and XMS is 2.0.0.2. (april issue, 2010).
[later edit]Using a network monitor, I saw some ICMPs from local station to the server. ICMP is blocked in the network. Is this the reason why it fails? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jun 04, 2010 7:09 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
connection = connectionFactory.CreateConnection(null, null); <<<-exception here!!! |
Obviously you are creating a client connection. I'm not sure that this form of connection is allowed (null, null). You may HAVE to set a user name at a minimum. Starting with version 6 there have been some further restrictions on client connections where the system was more lax before.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
DaeMoohn |
Posted: Fri Jun 04, 2010 8:51 pm Post subject: |
|
|
Apprentice
Joined: 04 Jun 2010 Posts: 26
|
client is what i want.when i was using mq classes,i didn't specify a user name and it worked.the error is when creating a socket,is there a problem because of icmp being disabled?i can't see a syn in net mon. |
|
Back to top |
|
 |
DaeMoohn |
Posted: Sat Jun 05, 2010 1:44 am Post subject: |
|
|
Apprentice
Joined: 04 Jun 2010 Posts: 26
|
i did try without setting nulls there-the other overload,and it used my credentials. That didn't work either.What would be a good scenario if i'd have two clustered Windows servers registered in domain trying to connect to some clustered remote servers -client mode- that are on my side,but not in the domain,not on Windows?All that I know are the details in the code above.Would it be a userid required? |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jun 05, 2010 3:06 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I would expect a userid to be mandatory on the client connection call. Make sure it is the same as the userid running the program. Should not be any problem if the channel has an mcauser set.
If this does not work open a PMR with IBM. There was a problem with V 7.0.1.1 but I believe that got fixed in V 7.0.0.2 (dll got replaced). _________________ MQ & Broker admin |
|
Back to top |
|
 |
DaeMoohn |
Posted: Sat Jun 05, 2010 9:43 pm Post subject: |
|
|
Apprentice
Joined: 04 Jun 2010 Posts: 26
|
Oki, thanks! I'll give it a shot monday...(at work) I don't know the IBM procedure yet, but there are other folks at work responsible with IBM communication. |
|
Back to top |
|
 |
DaeMoohn |
Posted: Sun Jun 06, 2010 9:39 pm Post subject: |
|
|
Apprentice
Joined: 04 Jun 2010 Posts: 26
|
Where exactly can I find 7.0.2? My current client is 7.0.1.0, XMS is 2.0.0.2.
All I get about an 7.0.2.0 is a File Transfer Edition (and I assume it's a server) and it costs. The latest available I see is Fix Pack (V7.0.1.2) and there is a 7.0.1.3 that is scheduled. |
|
Back to top |
|
 |
DaeMoohn |
Posted: Sun Jun 06, 2010 10:46 pm Post subject: |
|
|
Apprentice
Joined: 04 Jun 2010 Posts: 26
|
MQ Client 7.0.1.2 throws the same exception. Maybe I have some network problems.
It's fixed. I'm stupid
XMS was trying to resolve an ip address. Should've rang a bell. |
|
Back to top |
|
 |
|