Author |
Message
|
hschia |
Posted: Tue Jul 17, 2012 3:50 am Post subject: Unable to Connect to IBMMQ Server using IBMMQ .NET Client |
|
|
Newbie
Joined: 17 Jul 2012 Posts: 8
|
I was try to connect to IBMMQ Server use following VB .Net code and error showing "2538-MQRC_HOST_NOT_AVAILABLE".
MQEnvironment.Hostname = IPAddress ' & "(" & PORT& ")"
MQEnvironment.Channel = MQChannel
MQEnvironment.UserId = "Test"
MQEnvironment.Password = "Pass"
MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES)
IBMMQMgr = New MQQueueManager(MQQueueManagerName)
In IBMMQ Server, I noticed that the userid and password are different as above but use current login user id with empty password. Anyone please advice how to solve this issues and provide sample code to solve it.
Thanks in advance. |
|
Back to top |
|
 |
exerk |
Posted: Tue Jul 17, 2012 4:13 am Post subject: Re: Unable to Connect to IBMMQ Server using IBMMQ .NET Clien |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
I'm no developer, but I think as you are specifying client attributes, this:
Code: |
MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES) |
should be this:
Code: |
MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT) |
And do please read up on what a queue manager does with userids and passwords passed to it... _________________ 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 |
|
 |
hschia |
Posted: Tue Jul 17, 2012 4:32 am Post subject: |
|
|
Newbie
Joined: 17 Jul 2012 Posts: 8
|
I already tried
MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT)
but same result is getting.
I also try using as below but same result is getting as stated previously.
properties(MQC.HOST_NAME_PROPERTY) = IPAddress
properties(MQC.PORT_PROPERTY) = Port
properties(MQC.CHANNEL_PROPERTY) = MQChannel
properties(MQC.USER_ID_PROPERTY) = "Test"
properties(MQC.PASSWORD_PROPERTY) = "Pass"
properties(MQC.TRANSPORT_PROPERTY) = MQC.TRANSPORT_MQSERIES
IBMMQMgr = New MQQueueManager(m_Parameters.IBMMQQueueManagerName) ', properties) |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 17, 2012 4:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Did you check the documented causes of that reason code? Are none of those relevant?
Have you confirmed that the details you provide (especially whatever "MQChannel" resolves to) work with either one of the client samples and/or a client enabled support pac? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
hschia |
Posted: Tue Jul 17, 2012 5:00 am Post subject: |
|
|
Newbie
Joined: 17 Jul 2012 Posts: 8
|
Yes, If I take out the security control from MQ Server, it is working well. It can connect without any error. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 17, 2012 5:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hschia wrote: |
Yes, If I take out the security control from MQ Server, it is working well. It can connect without any error. |
Irrespective of the transport type you specify? What connection method from .NET do you think you're using?
Can you also describe exactly how you're "taking out the security control from MQ Server" and where this server is running? Is it local to the code? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
WBI_User21 |
Posted: Tue Jul 17, 2012 5:13 am Post subject: |
|
|
 Voyager
Joined: 12 Jun 2007 Posts: 98
|
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 17, 2012 5:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
WBI_User21 wrote: |
http://www-01.ibm.com/support/docview.wss?uid=swg21297556 |
Quite correctly underlining the comment made earlier. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
hschia |
Posted: Tue Jul 17, 2012 6:52 am Post subject: |
|
|
Newbie
Joined: 17 Jul 2012 Posts: 8
|
Client side:
If a security exit is defined for the client, then this security exit may validate the password.
If a security exit is not defined for the client, then the value of the password is transmitted to the server.
As follow the link, how can I pass the userid and password using security exit? Have any sample code? |
|
Back to top |
|
 |
j_santanu |
Posted: Tue Jul 17, 2012 6:56 am Post subject: |
|
|
Newbie
Joined: 24 Sep 2004 Posts: 6 Location: Kolkata, India
|
There is a security exit implemented in the server connection channel on server side to validate the UserId and Password both. It has been observed that the UserId is coming as windows login user and password as blank. The UserId and Password set in the MQEnvironment or hash table in the .Net code is not coming to the MQ Server for authentication. So the connection fails.
Can somebody help on why the UserId and Password set in MQEnvironment or hashtable is not coming for authentication to the server. Is there any issue with the code mentioned earlier or any configuration/setup needs to be done, so that the UserId and Password set in the MQEnvironment works.
Also, like to add that using a Java client program, providing the same credentials in MQEnvironment is working perfectly. .Net program is not working in the same manner. _________________ Regards
Santanu
Kolkata, India |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 17, 2012 7:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
j_santanu wrote: |
Can somebody help on why the UserId and Password set in MQEnvironment or hashtable is not coming for authentication to the server. |
Whoever wrote the security exit would seem to be the first person to ask, especially as the channel works with Java. I would theorise that the exit is making Java-based assumptions about how the information is being passed.
Note that the WMQ Server doesn't use the password, as that link states. It's the id being blank that's not helping you any. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
exerk |
Posted: Tue Jul 17, 2012 7:06 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Have you hijacked the post or are you a colleague of hschia? If so, then please state that so we know we're looking at the same problem. If not, then please state that you are having the same issue so that we don't get confused - or any more so than our caffeine-addled states already provide!
j_santanu wrote: |
There is a security exit implemented in the server connection channel on server side to validate the UserId and Password both. It has been observed that the UserId is coming as windows login user and password as blank. The UserId and Password set in the MQEnvironment or hash table in the .Net code is not coming to the MQ Server for authentication. So the connection fails.
Can somebody help on why the UserId and Password set in MQEnvironment or hashtable is not coming for authentication to the server. Is there any issue with the code mentioned earlier or any configuration/setup needs to be done, so that the UserId and Password set in the MQEnvironment works.
Also, like to add that using a Java client program, providing the same credentials in MQEnvironment is working perfectly. .Net program is not working in the same manner. |
If the password is not being flowed, put a trap in the code to print out the content of the property to ensure it is actually being populated. _________________ 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 |
|
 |
j_santanu |
Posted: Tue Jul 17, 2012 7:30 am Post subject: |
|
|
Newbie
Joined: 24 Sep 2004 Posts: 6 Location: Kolkata, India
|
exerk wrote: |
Have you hijacked the post or are you a colleague of hschia? |
Sorry for not mentioning that. Yes, I am a colleague of hschia.
We have captured the UserId and Password came to the server and found that the windows login user and a blank password is coming for authentication, not the UserId and Password set in the MQEnvironment.
Regards
Santanu |
|
Back to top |
|
 |
exerk |
Posted: Tue Jul 17, 2012 7:32 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
j_santanu wrote: |
exerk wrote: |
Have you hijacked the post or are you a colleague of hschia? |
Sorry for not mentioning that. Yes, I am a colleague of hschia.
We have captured the UserId and Password came to the server and found that the windows login user and a blank password is coming for authentication, not the UserId and Password set in the MQEnvironment.
Regards
Santanu |
exerk wrote: |
If the password is not being flowed, put a trap in the code to print out the content of the property to ensure it is actually being populated. |
_________________ 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 |
|
 |
RogerLacroix |
Posted: Fri Jul 27, 2012 10:24 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
j_santanu wrote: |
There is a security exit implemented in the server connection channel on server side to validate the UserId and Password both. It has been observed that the UserId is coming as windows login user and password as blank. The UserId and Password set in the MQEnvironment or hash table in the .Net code is not coming to the MQ Server for authentication. So the connection fails.
Can somebody help on why the UserId and Password set in MQEnvironment or hashtable is not coming for authentication to the server. Is there any issue with the code mentioned earlier or any configuration/setup needs to be done, so that the UserId and Password set in the MQEnvironment works.
Also, like to add that using a Java client program, providing the same credentials in MQEnvironment is working perfectly. .Net program is not working in the same manner. |
Are you using WMQ v7.1 on the client-side? If so, you need to open a PMR with IBM, as WMQ v7.1 .NET implementation is broken (flowing UserID and Passwords) and you need a fix from IBM.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|