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 Installation/Configuration Support » using amqsget0.c and amqsget0.c under Linux

Post new topic  Reply to topic
 using amqsget0.c and amqsget0.c under Linux « View previous topic :: View next topic » 
Author Message
stone
PostPosted: Tue Mar 04, 2008 6:24 am    Post subject: using amqsget0.c and amqsget0.c under Linux Reply with quote

Newbie

Joined: 04 Mar 2008
Posts: 5

Hello
My goal is to put and get a simple message on a queue.
I need to use the amqsget0.c and amqsget0.c example programs to accomplish that.
Client programs work on one machine and MQ Server on the other.
I hope I'm quite far with that but still not succeeded

I installed MQ client and MQ server on both machines.
On a server machine I create the default Queue Manager and a queue as follows:

crtmqm -q MY.QUEUE.MANAGER
strmqm MY.QUEUE.MANAGER
runmqsc
define qlocal (MY.QUEUE)
end

I compile a client programs on a client machine as follows:
gcc -o amqsget0 amqsget0.c -I /opt/mqm/inc/ -L /opt/mqm/lib/ -lmqic
gcc -o amqsput0 amqsput0.c -I /opt/mqm/inc/ -L /opt/mqm/lib/ -lmqic

I set the MQSERVER variable on a client machine as follows:
export MQSERVER='CHAN1/TCP/my.ip.address'

and run the priviously compiled program:
./amqsput0 MY.QUEUE MY.QUEUE.MANAGER

Unfortunately I receive the following error message:
Sample AMQSPUT0 start
MQCONN ended with reason code 2059

I can see the TCP SYN sent from a client to a server machine on port 1414 and a TCP RST packet sent other way.

What else should I do to "put" a message on a server queue ang "get" it back.
I'm using a trial MQ package for Linux:
WMQv600Trial-x86_linux_2.tar.gz

Great thanks for help
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Mar 04, 2008 7:01 am    Post subject: Re: using amqsget0.c and amqsget0.c under Linux Reply with quote

Grand High Poobah

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

stone wrote:
crtmqm -q MY.QUEUE.MANAGER
strmqm MY.QUEUE.MANAGER
runmqsc
define qlocal (MY.QUEUE)
end


Did you create a listener as well? Or a channel called CHAN1?

You should check out the Clients manual, which will help.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
stone
PostPosted: Thu Mar 06, 2008 4:18 am    Post subject: Re: using amqsget0.c and amqsget0.c under Linux Reply with quote

Newbie

Joined: 04 Mar 2008
Posts: 5

Great thanks for an answer but it wasn't helpful to me.
As you can see I'm new to MQ.
The documentation is large.
I feel a great lack of simple fully working examples.
IBM provides simple C examples but from my point of view they just do not work.
It requires me to spend a few weeks trying to lunch those examples under linux.
Please write me a list of MQ instructions of how to configure MQ to lunch those 2 programs since otherwise the trial period may turn out to be to short for an MQ newbie

Thanks again for any help
Back to top
View user's profile Send private message
markt
PostPosted: Thu Mar 06, 2008 4:32 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 508

If you read the documentation, you will find many simple examples. Including step-by-step instructions such as these.
Back to top
View user's profile Send private message
stone
PostPosted: Thu Mar 06, 2008 6:03 am    Post subject: Reply with quote

Newbie

Joined: 04 Mar 2008
Posts: 5

Great thanks for help.
I configured the channel and a listener on a receiving machine as follows:

define listener (listener1) trptype (tcp) control (qmgr)
define channel (CHAN1) chltype (rcvr) trptype (tcp)

Now the communication looks much better but amqsput0.c still returns:
MQCONN 2059 error message.

My tcpdump now shows me STATUS_DATA message with error flag set.

Of course on a client machine I set:
export MQSERVER='CHAN1/TCP/my.ip.address'

If you know what can be wrong let me know please.

Sorry for bothering You again and great thanks for any help
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 06, 2008 11:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Wrong type of channel. RCVR channel is a receiver to be matched up to a sender from a different qmgr.

What you need is a SVRCONN type channel.

Reads: client manual, Intercommunications manual

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » using amqsget0.c and amqsget0.c under Linux
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.