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 IndexIBM MQ API SupportHELP!troubled with AMI connect to a remote MQ server problem

Post new topicReply to topic
HELP!troubled with AMI connect to a remote MQ server problem View previous topic :: View next topic
Author Message
gteddy
PostPosted: Fri Aug 25, 2006 7:48 am Post subject: HELP!troubled with AMI connect to a remote MQ server problem Reply with quote

Novice

Joined: 25 Aug 2006
Posts: 14

i'm using AMI to connect to a remote server.
below is my configuration files:

amthost.xml
Code:

<queueManagerNames
        defaultConnection = "Manager"
        connectionNames1=""       
        connectionNames2=""
/>



the policy definition in the repository file:
Code:

Policy Name: amt.remote
Connection Name: defaultConnection
Connection Mode: Logical
Connection Type: Client
Connection Option:Normal
client Channel Name: servercon
Client TCP Server Address:10.5.240.73


the service point definition in the repository file:
Code:

Service Point Name: amt.in
Queue Name: IN


The remote server IP is 10.5.240.73. A queue manager named "Manager" runs on it. And there is a server connection channel definition named "servercon" on the queue manager. There is a local queue named "IN" on it,too.

below is my sample code:
Code:

mySessionFactory=new AmSessionFactory();
mySession=mySessionFactory.createSession("mySession");   
myPolicy=mySession.createPolicy("amt.remote");   
mySender=mySession.createSender("amt.in");
mySendMessage=mySession.createMessage("mySendMessage");
mySession.open(myPolicy);
mySender.open(myPolicy);
mySendMessage.writeBytes("HelloWorld".getBytes());
mySender.send(mySendMessage,myPolicy);
mySender.close();
mySession.close();


when i run the sample code above, it throws AmtErrorException at the line of
Code:

mySession.open(myPolicy);

with completionCode[2] reasonCode[49].

Is there anything wrong with my configuration or program?
the problem troubles me for serveral days.
can anybody help me please?
thanks very much![/code]
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 25, 2006 7:56 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Those are all really horrible names - "manager", "servercon", etc. I hope they've been changed to protect the guilty.

AMI is not supported any more. Under what context are you using it?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Aug 25, 2006 8:13 am Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Me thinks it's still "supported", but its use in new work is discouraged....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
gteddy
PostPosted: Fri Aug 25, 2006 8:22 pm Post subject: Reply with quote

Novice

Joined: 25 Aug 2006
Posts: 14

jefflowrey wrote:
Those are all really horrible names - "manager", "servercon", etc. I hope they've been changed to protect the guilty.

AMI is not supported any more. Under what context are you using it?


man,I have no choice because someone in charge of the project chooses AMI. So I just need to use it.
do u mean the definition names are not right? so that it doesn't work?
how do I name them please?
i'm a newbie, thanks for help!
Back to top
View user's profile Send private message
wschutz
PostPosted: Sat Aug 26, 2006 3:31 am Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Tell the "someone in charge" that IBM says this:
Quote:
MPORTANT NOTE
After June 2003, IBM has no plans to enhance the AMI with any new functions or platforms. IBM will however continue to support the AMI as described in the Technical Support sectioin below.

We would recommend that customers do not use the AMI for any new projects and do not extend usage in existing projects. This recommendation does not apply to functions shipped by other IBM products, such as DB2, that have made use of the AMI. IBM is working to ensure that these products are able to provide the same functionality as today without the AMI.


Now, rc=49 is: AMRC_TRANSPORT_ERR, which means:
Quote:
AMRC_TRANSPORT_ERR
An error was reported by the underlying (WebSphere MQ) message transport
layer. The message transport reason code can be obtained by the secondary
reason code value returned from a ‘GetLastError’ request for the AMI object
concerned. For more information, see “Common causes of problems” on page
535.

_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
gteddy
PostPosted: Sat Aug 26, 2006 4:13 am Post subject: Reply with quote

Novice

Joined: 25 Aug 2006
Posts: 14

thanks for help, wschutz .
i refered to AMI document and found the explanation of Error codes there .
But i still can't figure out anything wrong in my configuration or programme according to the explainanation.
Now i understand WHY IBM doesn't recommend the further use of AMI...it's full of mysterious bugs.
ANYONE help me !!!
Back to top
View user's profile Send private message
wschutz
PostPosted: Sat Aug 26, 2006 4:17 am Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
The message transport reason code can be obtained by the secondary
reason code value returned from a ‘GetLastError’ request for the AMI object
concerned.
do that....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
gteddy
PostPosted: Sun Aug 27, 2006 5:44 pm Post subject: Reply with quote

Novice

Joined: 25 Aug 2006
Posts: 14

OMG, i changed all my definition names to CAPITAL letters and it works!!
then i changed the names back to original and it still works!!
that is REALLY REALLY REALLY weird.
I'm really wondering how AMI works ... I don't like it.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Aug 28, 2006 1:49 am Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

I guess there was no chance that something was mistyped the first time....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
tleichen
PostPosted: Mon Aug 28, 2006 7:28 am Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

gteddy wrote:
OMG, i changed all my definition names to CAPITAL letters and it works!!
then i changed the names back to original and it still works!!

Yeah…. Like magic, huh?

wschutz wrote:
I guess there was no chance that something was mistyped the first time....


I think that’s more than likely…
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
gteddy
PostPosted: Tue Aug 29, 2006 7:35 pm Post subject: Reply with quote

Novice

Joined: 25 Aug 2006
Posts: 14

In fact, i found that the Connection type MUST be set to CLIENT rather than AUTO.
The AMI manual says AUTO will automatically decides whether or not it's a CLIENT or SERVER application. But to my experiment, AUTO always fails.
WEIRD AMI ...
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ API SupportHELP!troubled with AMI connect to a remote MQ server problem
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.