ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » authentication error when connecting as client to remote MQ

Post new topic  Reply to topic
 authentication error when connecting as client to remote MQ « View previous topic :: View next topic » 
Author Message
mishka_3001
PostPosted: Thu Dec 24, 2009 7:34 am    Post subject: authentication error when connecting as client to remote MQ Reply with quote

Newbie

Joined: 24 Dec 2009
Posts: 2

I am new to WebSphere MQ and JMS. I have installed the MQ Server and the client on Windows Server 2003. When accessing queues locally from java client in CLIENT mode everything works fine. When trying to run the same code from other machine that doesn't have MQ server I receive the Security exception. I am not sure where and what needs to be configured. The code to start the connection is this:

JmsFactoryFactory ff = JmsFactoryFactory.getInstance(WMQConstants.WMQ_PROVIDER);
JmsConnectionFactory cf = ff.createConnectionFactory();

cf.setIntProperty(WMQConstants.WMQ_PORT, port);
cf.setStringProperty(WMQConstants.WMQ_CHANNEL, channel);
cf.setStringProperty(WMQConstants.WMQ_HOST_NAME, hostName);
cf.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, connectionMode);
cf.setStringProperty(WMQConstants.WMQ_QUEUE_MANAGER, queueManager);

connection = cf.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

sendToDestination = session.createQueue(sendToQueueName);
receiveFromDestination = session.createQueue(receiveFromQueueName);

producer = session.createProducer(sendToDestination);
consumer = session.createConsumer(receiveFromDestination);

connection.start();

===============================================

This is the exception that is thrown:

Exception in thread "main" com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2013: The security authentication was not valid that was supplied for QueueManager 'QM_mike' with connection mode 'Client' and host name '192.168.0.147'.

Can somebody help me?
Back to top
View user's profile Send private message
mvic
PostPosted: Thu Dec 24, 2009 8:58 am    Post subject: Re: authentication error when connecting as client to remote Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

mishka_3001 wrote:
I am new to WebSphere MQ and JMS.

Be prepared to spend a little time on this issue because it is related to security.

The server-side channel needs to present a username to the queue manager when your client connects. The rules on how it determines that username are many and involved.

Search the forum and the internet for the number 2035 in combination with mq and client. Search for MCAUSER and SVRCONN.

Follow the username data through from client to queue manager.

Client OS logged in user -> MQJMS code -> MQ channel code -> MQ queue manager -> Server OS knowledge of users and its mapping to authorities.

Add to this that on Windows authorizations are stored against Windows SIDs not against a simple username or groupname.

I am a bit perplexed that the error message mentions "authentication" because this is unlikely to be what is going wrong. Authorization is more likely to be the important topic. Note that authorization and authentication are different and ought always to be used correctly and distinctly in the MQ manuals and error messages.

I hope this begins to help but sorry it doesn't represent a direct answer to your symptoms.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 24, 2009 9:33 am    Post subject: Re: authentication error when connecting as client to remote Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mishka_3001 wrote:
I am new to WebSphere MQ and JMS.


As a new person on the forum you might also want to spend a little time reading the guidelines. It's considered rude to double post, and also to hijack other threads as here
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » authentication error when connecting as client to remote MQ
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.