Author |
Message
|
Nroblex |
Posted: Mon Apr 28, 2008 2:15 am Post subject: Connect to remote MQServer via Client |
|
|
Novice
Joined: 15 Apr 2008 Posts: 11
|
Hello MQexperts
I have a perhaps simple question for you. I would be very happy if someone could give me a hint what is wrong.
I have developed a C# client application and I have a MQ server installed on my laptop. Everything works fine and I can connect to the queuemanager "PMC" without problem.
Now I instead want to connect to a remote server on a given IP address. I Have information about channelname and Queuemanagername and I also have a key file (SSL) . I do the following:
MQEnvironment.Hostname = "IPADRESS";
MQEnvironment.Port = 1414;
MQEnvironment.Channel = "CHANNELNAME" ;
MQEnvironment.SSLKeyRepository="Path.to.Keyfile"
MQEnvironment.SSLCipherSpec = "NULL_MD5"
MQQueueManager qmngr = new MQQueueManager("ManagerName");
I get the response "NOTFOUND". ??
If I just provide Ipadress, channelname and portname I get the following answer : MQRC_Q_MGR_NOT_AVAILABLE
I do not understand this.
Please help!
Many thanks in advance
//Nroblex |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 28, 2008 2:33 am Post subject: Re: Connect to remote MQServer via Client |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Nroblex wrote: |
I have developed a C# client application and I have a MQ server installed on my laptop. Everything works fine and I can connect to the queuemanager "PMC" without problem. |
Was this connection achieved using a client or a server lib?
Nroblex wrote: |
If I just provide Ipadress, channelname and portname I get the following answer : MQRC_Q_MGR_NOT_AVAILABLE |
Am I correct in assuming this occurs if no SSL information is set?
I would search the forum for posts regarding 2059 errors (the numeric code of your error). It's perfectly possible that your code is fine, and other factors are causing the error.
IHMO the first thing to try is to telenet to the port MQ is listening on in the remote box. If you can't establish the telnet session, your app won't be able to either.
Look through the forum for other tips. This is a very common, often discussed error. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Nroblex |
Posted: Mon Apr 28, 2008 2:45 am Post subject: |
|
|
Novice
Joined: 15 Apr 2008 Posts: 11
|
Thanks for the answer!
"Was this connection achieved using a client or a server lib? "
How do I know that? On my laptop I have installed a developer license of MQ server. I also installed the clientsoftware.
"Am I correct in assuming this occurs if no SSL information is set?"
Yes that is right. Otherwise, if I provide SSL key, I get "NOTFOUND" error.
I tried to telnet to the server on port 1414 but I was denied.
I also made this test:
I tried to change the ipadress to my local on my laptop, to connect to my local MQ server, and I created a serverchannel using the MQ Explorer.
Then I tried to connect to my local queuemanager providing ip-adress and channelname. To my surprice I get the same error "MQRC_Q_MGR_NOT_AVAILABLE"
Any more hints ??
//Nroblex |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 28, 2008 3:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Nroblex wrote: |
How do I know that? |
You'd know that by knowing if you linked your application with the client dll or the server dll
Nroblex wrote: |
I tried to telnet to the server on port 1414 but I was denied. |
I think you've found your problem.
Or at least a problem. Sounds like a firewall to me.
Nroblex wrote: |
I tried to change the ipadress to my local on my laptop, to connect to my local MQ server, and I created a serverchannel using the MQ Explorer.
Then I tried to connect to my local queuemanager providing ip-adress and channelname. To my surprice I get the same error "MQRC_Q_MGR_NOT_AVAILABLE"
|
I'm not surprised. I bet your laptop has a firewall running (unless you're a very trusting soul).
Firstly, ensure your application is linked with the client libraries. Then ensure that the means by which you're providing ip address & channel name (which you don't specify) are correct. Then ensure you can telnet (as before) to your local queue manager. Then ensure your application can connect to your local queue manager.
Then take another crack at connecting to the remote box.
Also review the forum (as suggested) for previous 2059 error posts. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Nroblex |
Posted: Mon Apr 28, 2008 3:42 am Post subject: Even more confused ? |
|
|
Novice
Joined: 15 Apr 2008 Posts: 11
|
I used the qmqmdnet as reference in my project ("IBM\Websphere MQ\bin") I suppose this is the server lib ? By using this I can use the IBM.WMQ namespace in my application, is that wrong ?
What I want to do is connect my client to a remote server.
If I use the IBM.XMS namespace in "IBM\Message Service Client for .NET\tools\lib\IBM.XMS.dll" is that correct then ? Connecting the clientapplication to the server.?
What is better? What do I have to do?
//Nroblex (the newbie) |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 28, 2008 3:58 am Post subject: Re: Even more confused ? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Nroblex wrote: |
What is better? What do I have to do?
|
Neither is better, one is better for you. Each has it's place; for a simple example a server side app can only connect to a queue manager running on the same box as the app so can't do what you describe, but a client app can't participate in XA transactions. It's all about your design.
You should focus first on why you can't telnet to your respective targets; that's not going to help you. Then spend some time with the Using .NET documentation which will help with the various connection and other options that you have.
The Clients manual may also be of assistance. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Apr 28, 2008 7:30 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
|
Back to top |
|
 |
|