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 » MQSeries client: security error-cannot connect to host

Post new topic  Reply to topic
 MQSeries client: security error-cannot connect to host « View previous topic :: View next topic » 
Author Message
Garry
PostPosted: Sat Jul 26, 2003 1:12 pm    Post subject: MQSeries client: security error-cannot connect to host Reply with quote

Newbie

Joined: 26 Jul 2003
Posts: 2
Location: Brooklyn, NY

I'm running an example from IBM's redbook: Applet created in VisualAge for Java using MQSeries client connects to server, puts a message on a queue.
I'm getting:
MQJE012: Security error - cannot connect to host hostname
MQJE001: Completion Code 2, Reason 2059

MQEnvironmnet variables hostname, channel and port are correct.

What am I missing?
Your help would be appreciated.
Back to top
View user's profile Send private message
harwinderr
PostPosted: Mon Jul 28, 2003 9:25 pm    Post subject: Reply with quote

Voyager

Joined: 29 Jan 2002
Posts: 90

Can you give some more specific information like on which OS the WMQ server is running, some code snippet etc.
I have sucessfuly used the JMSTestApplet which comes along with the ma88 package for testing client connection to server. The applets runs on a Win2K box and conects to a server running on a Linux box.

Later,
HR
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Garry
PostPosted: Wed Jul 30, 2003 10:53 am    Post subject: Reply with quote

Newbie

Joined: 26 Jul 2003
Posts: 2
Location: Brooklyn, NY

Thanks for reply.
The applet is running on Windows NT trying to connect to the queue manager on the unix box with AIX.
This is my code:
public void connectToQmgr(String queueManagerName, String hostname, String channel, String portnumber) {
try {
int portnum;
try { // convert String to Int
portnum = new Integer(portnumber).intValue();
}
catch (NumberFormatException ex) {
portnum = 1414; // default
}
// Setup MQEnvironment
//
MQEnvironment.hostname = hostname;
MQEnvironment.channel = channel;
MQEnvironment.port = portnum;
//
// connect to Queue Manager
//
MQQueueManager qMgr = new MQQueueManager(queueManagerName);
System.out.println("Connected to Queue Manager; " +
queueManagerName + "Channel Name: " +
channel + "TCP/IP Port Number : "+ portnum);
}
catch (MQException ex) {
System.out.println("An MQ error ocurred: CC: " +
ex.completionCode + "reason Code: " + ex.reasonCode);
}
}
Back to top
View user's profile Send private message
mqonnet
PostPosted: Wed Jul 30, 2003 11:23 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Verify your listener is running. If you are coding a fresh app, it is advisible that you use a different port than 1414, it leads to lot of confusion as MQ uses this as the default port. :)

Also verify if you have a principal defined with the userid that you are logged on Windows Nt system. If not, you need to create one.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bower5932
PostPosted: Wed Jul 30, 2003 2:16 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I'm not sure that I understand the comment about not using the default port. If you switch, I would think this would add more confusion just in case you left it out somewhere.

Another (quick) workaround on the defining the user on AIX is to alter the mcauser parameter of your channel. However, this is really only a workaround and you have to be careful about actually deploying the channel this way. You can set the mcauser to a user that is in the mqm group and let your user come in this way.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQSeries client: security error-cannot connect to host
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.