| Author | Message | 
		
		  | wangquanyong | 
			  
				|  Posted: Fri Feb 15, 2002 2:59 am    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 22 Jan 2002Posts: 17
 Location: China
 
 | 
			  
				| I am programming a multithread-process on the MQClient(Win2K) and one of the threads gets messages from a queue(in a queue-manager) in the MQServer(HP-Unix). I start the queue-manager with strmqm first and let it listen at the port 1415 by runmqlsr.(on MQServer)
 Then I run my process on MQClient. It connects to the queue-manager and gets messages from the queue successfully.
 It sounds good, but when I end my process, the problem comes out.
 THAT IS: the listening process of the queue-manager on MQServer self-ended after my process ended. (no one did anything on the MQServer at that time)
 Is there anybody knowing how to resolve this problem??
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mrlinux | 
			  
				|  Posted: Fri Feb 15, 2002 8:51 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 14 Feb 2002Posts: 1261
 Location: Detroit,MI USA
 
 | 
			  
				| Suggest setting up the listener to run from inetd 
 This will start the listener anytime a connection is requested.
 It will also provide a method of getting rid of client connection that were not
 terminated correctly. For each client attachment you will see a amqcrsta process
 entry i.e. ps -ef | grep amqcrsta.
 
 
 QMGR_NAME= the name of your Queue Manager
 edit /etc/inetd.conf
 QMGR_NAME stream tcp nowait mqm /opt/mqm/bin/amqcrsta amqcrsta -m QMGR_NAME
 
 
 edit /etc/services file
 
 QMGR_NAME    prot#/tcp       #QMGR_NAME = your qmgr name
 
 After editing files execute the following from a prompt twice   inetd -c [ENTER Key]
 
 
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | wangquanyong | 
			  
				|  Posted: Sun Feb 17, 2002 5:07 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 22 Jan 2002Posts: 17
 Location: China
 
 | 
			  
				| Thank you very much. Something new I have to learn. I will try it.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | StefanSievert | 
			  
				|  Posted: Tue Feb 19, 2002 1:44 pm    Post subject: |   |  | 
		
		  |  Partisan
 
 
 Joined: 28 Oct 2001Posts: 333
 Location: San Francisco
 
 | 
			  
				| The listener process on any platform should not end if an application disconnects; gracefully or not. What do the MQ error logs on the server report? Aby FDC-Files?
 
 BTW, you have a choice of running either runmqlsr or inetd as the listener processes on Unix. They both do the same thing: They will start an instance of a message channel agent process/thread (amqcrsta for TCP/IP) on an inbound open request for the specified port.
 As outlined before, on Unix inetd is the best choice because it is a system service and you usually don't have to worry that it is up and running.
 The intercommunication guide is a very good source for related information. Check out the HP-UX section at http://www-4.ibm.com/software/ts/mqseries/library/manualsa/csqzae05/csqzae05tfrm.htm
 Cheers,
 Stefan
 
 _________________
 Stefan Sievert
 IBM Certified * MQSeries
 
 [ This Message was edited by: StefanSievert on 2002-02-19 13:45 ]
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | wangquanyong | 
			  
				|  Posted: Tue Feb 19, 2002 6:36 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 22 Jan 2002Posts: 17
 Location: China
 
 | 
			  
				| Thank you a lot,StefanSievert. I will go to look at the site you suggested.
 
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |