| Author | 
		  Message
		 | 
		
		  | pratima_09 | 
		  
		    
			  
				 Posted: Fri May 05, 2006 1:15 pm    Post subject: Client Connection using imqsputc | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 05 May 2006 Posts: 13
  
  | 
		  
		    
			  
				Hi,
 
 
I am a newbie to MQSeries. I am trying to connect to a remote queue manager ( a queue manager on a different UNIX box) using imqsputc. 
 
 
But, it fails with a reason code 2059. 
 
 
I have made sure that the queuemanager is running and the corresponding queue is created on this remote box. So I am not exactly sure why it is failing.
 
 
This is how i am executing:
 
imqsputc LOGIN.QU MY_QM SYSTEM.DEF.SVRCONN/tcp/130.151.253.160
 
 
Please help!
 
 
Thanks in advance
 
Pratima | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Fri May 05, 2006 8:18 pm    Post subject: Re: Client Connection using imqsputc | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				
   
	| pratima_09 wrote: | 
   
  
	Hi,
 
This is how i am executing:
 
imqsputc LOGIN.QU MY_QM SYSTEM.DEF.SVRCONN/tcp/130.151.253.160
 
 
Please help!
 
 
Thanks in advance
 
Pratima | 
   
 
 
 
Well you need to change that a little.
 
The correct syntax would be (note on Wintel replace export with set)
 
   
	| Code: | 
   
  
	export MQServer='<channel name(svrconn type)>/TCP/host(port)'
 
export MQServer='SYSTEM.DEF.SVRCONN/TCT/130.151.253.160(1414)'
 
amqsputc LOGIN.QU MY_QM | 
   
 
 
 
Enjoy    _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wschutz | 
		  
		    
			  
				 Posted: Sat May 06, 2006 2:57 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired) 
  | 
		  
		    
			  
				fj had a minor finger check when he should have typed:
 
   
	| Quote: | 
   
  
	
 
export MQServer='SYSTEM.DEF.SVRCONN/TCP/130.151.253.160(1414)' | 
   
 
 _________________ -wayne | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Sat May 06, 2006 4:56 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles 
  | 
		  
		    
			  
				Except that the OP is run running imqsputc, not amqsputc.  The syntax he gave is correct.
 
   
	| Code: | 
   
  
	//                IMQSPUT has 3 parameters:
 
//                - the name of a queue (required)
 
//                - the name of a queue manager (optional)
 
//                - the definition of a channel (optional)
 
//
 
//                If no queue manager name is given, the queue manager
 
//                defaults to the default local queue manager. If a
 
//                channel is defined, it should have the same format
 
//                as the MQSERVER environment variable. | 
   
 
 
Is the listener running on port 1414.
 
 
Cheers, _________________ Eddie Atherton
 
IBM Certified Solution Developer - WebSphere Message Broker V6.1
 
IBM Certified Solution Developer - WebSphere Message Broker V7.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pratima_09 | 
		  
		    
			  
				 Posted: Mon May 08, 2006 6:35 am    Post subject: Client Connection using imqsputc | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 05 May 2006 Posts: 13
  
  | 
		  
		    
			  
				yes, the listener is running on port on my receiving end.
 
I have made sure I had the following entry in  in /etc/services
 
MQSeries       1414/tcp 
 
 
But I still get a ImqQueueManager::connect failed with reason code 2058
 
when I am trying to connect to the remote queue manager. 
 
 
Is there some other configuration that I am missing out?
 
 
Please advice..
 
Thanks in advance
 
Pratima | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kevinf2349 | 
		  
		    
			  
				 Posted: Mon May 08, 2006 6:47 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 28 Feb 2003 Posts: 1311 Location: USA 
  | 
		  
		    
			  
				| What version of the Client are you using? I believe there was a problem like this reported in the past. Have you tried doing a search on this site? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wschutz | 
		  
		    
			  
				 Posted: Mon May 08, 2006 6:58 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired) 
  | 
		  
		    
			  
				Are you getting a 2058 or 2059 (you have both listed).
 
 
If you are getting a 2058, this almost always means that you are able to connect to a qmgr, but it's not the "MY_QM" qmgr listening on port 1414. _________________ -wayne | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pratima_09 | 
		  
		    
			  
				 Posted: Mon May 08, 2006 7:00 am    Post subject: Client Connection using imqsputc | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 05 May 2006 Posts: 13
  
  | 
		  
		    
			  
				I am using version 5.3. 
 
 
I have tried search this site. I found something where the user was having a issue when he was trying to connect to a channel defined by him. 
 
 
But I am not even able to connect to the queue manager using default channel SYSTEM.DEF.SVRCONN. 
 
 
What am i missing ?    
 
 
Thanks
 
Pratima | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pratima_09 | 
		  
		    
			  
				 Posted: Mon May 08, 2006 7:03 am    Post subject: Client Connection using imqsputc | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 05 May 2006 Posts: 13
  
  | 
		  
		    
			  
				How can I make sure my remote queue manager is listening on port 1414? Is there a MQ command I can use to check this?
 
 
Thanks
 
Pratima | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vennela | 
		  
		    
			  
				 Posted: Mon May 08, 2006 7:06 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India 
  | 
		  
		    
			  
				
   
	| Code: | 
   
  
	| netstat -an | grep 1414 | grep LISTEN | 
   
 
 
should show an entry
 
 
If you think your entries in /etc are right then you can refresh inetd
 
For eg on AIX
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pratima_09 | 
		  
		    
			  
				 Posted: Mon May 08, 2006 7:12 am    Post subject: Client Connection using imqsputc | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 05 May 2006 Posts: 13
  
  | 
		  
		    
			  
				Yes, I have an entry for port 1414. 
 
 
Also, I have double checked my entries with the IBM site:
 
 
/etc/services
 
MQSeries 1414/tcp
 
 
/etc/inetd.conf
 
MQSeries stream tcp nowait root /opt/mqm/bin/amqcrsta amqcrsta -m MY_QM
 
 
I have also refreshed my inetd.
 
 
Is there something that I also have to set on my client side too?
 
 
-Pratima | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vennela | 
		  
		    
			  
				 Posted: Mon May 08, 2006 7:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India 
  | 
		  
		    
			  
				From the client machine's command prompt issue 
 
telnet mqserverip 1414
 
what happens?
 
from the command prompt where you are running the sample what happens when you issue 
 
echo %MQSERVER% | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kevinf2349 | 
		  
		    
			  
				 Posted: Mon May 08, 2006 7:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 28 Feb 2003 Posts: 1311 Location: USA 
  | 
		  
		    
			  
				Have you tried
 
 
imqsputc LOGIN.QU MY_QM SYSTEM.DEF.SVRCONN/tcp/130.151.253.160(1414)
 
 
? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vennela | 
		  
		    
			  
				 Posted: Mon May 08, 2006 7:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India 
  | 
		  
		    
			  
				Also:
 
From the same environment where you set the MQSERVER variable try using amqsputc instead of impqputc. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pratima_09 | 
		  
		    
			  
				 Posted: Mon May 08, 2006 7:33 am    Post subject: Client Connection using imqsputc | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 05 May 2006 Posts: 13
  
  | 
		  
		    
			  
				When I telnet to the my mqserver IP (port 1414), I get the following:
 
$ telnet 130.151.253.160 1414
 
Trying...
 
Connected to 130.151.253.160.
 
Escape character is '^]'.
 
 
My MQSERVER is set to SYSTEM.DEF.SVRCONN/tcp/130.151.253.160(1414)
 
 
This is what i am trying
 
imqsputc LOGIN.QU MY_QM SYSTEM.DEF.SVRCONN/tcp/130.151.253.160(1414) 
 
 
I have also tried amqsputc and I get the following :MQCONN ended with reason code 2058 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |