| Author | Message | 
		
		  | themqstudent | 
			  
				|  Posted: Thu May 26, 2011 8:16 am    Post subject: MQCONN ended with reason code 2058 |   |  | 
		
		  | Novice
 
 
 Joined: 26 May 2011Posts: 22
 
 
 | 
			  
				| Hello Team, 
 I have a working MQ Ver 7.0.1 environment. It works perfect when sending msgs server to server. I am, however, experiencing a problem when I go client to server.
 For testing I am using the provided sample client (amqsputc & amqsgetc) programs.
 I am able to send messages to the server from my client and the messages end up in the correct queue. I can see the 2 msgs I sent via the display command:
 
 dis ql(DELL.P.LQ) CURDEPTH
 AMQ8409: Display Queue details.
 QUEUE(DELL.P.LQ)                        TYPE(QLOCAL)
 CURDEPTH(2)
 
 My problem is when I try to receive the msgs, I get the subject error.
 
 /opt/mqm/samp/bin> ./amqsgetc DELL.P.LQ DELL.P.QM
 Sample AMQSGET0 start
 MQCONN ended with reason code 2058
 
 I don't se any errors in the error log. And, of course, it is not a communication problem since the messages are arriving to the intended queue.
 
 The sender userid is the same ID as the one specified on the receiver channel mcauser field.
 
 Any help is appreciated.
 
 Thank you
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | bruce2359 | 
			  
				|  Posted: Thu May 26, 2011 8:38 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 05 Jan 2008Posts: 9486
 Location: US: west coast, almost. Otherwise, enroute.
 
 | 
			  
				| Go go google.  Search for mqrc 2058. 
 What did you discover?
 _________________
 I like deadlines. I like to wave as they pass by.
 ב''ה
 Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | themqstudent | 
			  
				|  Posted: Thu May 26, 2011 10:34 am    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 26 May 2011Posts: 22
 
 
 | 
			  
				| Hi Bruce, 
 Before I came to this forum, I did an exhaustive google search. I came across a very large number of answers non were similar to my problem, at least I don't think.
 In my case, I do not have a QMName mismatch. Here is what I do:
 
 CLIENT:
 ./amqsputc  DELL.P.LQ      DELL.P.QM
 Sample AMQSPUT0 start
 hello world!
 target queue is DELL.P.LQ
 Fin...
 
 Sample AMQSPUT0 end
 
 Now, on SERVER side:
 dis ql(DELL.P.LQ) CURDEPTH
 AMQ8409: Display Queue details.
 QUEUE(DELL.P.LQ)                        TYPE(QLOCAL)
 CURDEPTH(2)
 
 You see we have two msgs, as expected.
 
 A segment of the queue manager definition:
 
 dis qmgr
 AMQ8408: Display Queue Manager details.
 QMNAME(DELL.P.QM)                       ACCTCONO(DISABLED)
 ACCTINT(1800)                           ACCTMQI(OFF)
 ACCTQ(OFF)                              ACTIVREC(MSG)
 ALTDATE(2011-05-19)                     ALTTIME(23.04.23).......
 
 A piece of the channel definition:
 
 dis channel(DELL.P.RCVCHA2)
 36 : dis channel(DELL.P.RCVCHA2)
 AMQ8414: Display Channel details.
 CHANNEL(DELL.P.RCVCHA2)                 CHLTYPE(SVRCONN)
 ALTDATE(2011-05-25)                     ALTTIME(21.41.42)
 COMPHDR(NONE)                           COMPMSG(NONE)
 DESCR( )                                HBINT(300)......
 
 mqm      15669 15524  0 May19 ?        00:00:00 /opt/mqm/bin/runmqlsr -r -m DELL.P.QM -t TCP -p 1414
 
 Also on the SERVER side, receiving the msgs:
 
 ./amqsgetc DELL.P.LQ
 Sample AMQSGET0 start
 MQCONN ended with reason code 2058
 
 So, I am lost since everything appears OK, except the receiving portion on the SERVER.
 
 Thank yo
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | themqstudent | 
			  
				|  Posted: Thu May 26, 2011 10:36 am    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 26 May 2011Posts: 22
 
 
 | 
			  
				| I got the same error when using Queue & QM combo: 
 ./amqsgetc DELL.P.LQ    DELL.P.QM
 Sample AMQSGET0 start
 MQCONN ended with reason code 2058
 
 Thank you
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Thu May 26, 2011 11:39 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| Are amqsputc & amqsgetc running in the same shell? Does it work if you do the get immediately after the successful put? 
 What method have you used to provide the client connection information? CCDT? MQSERVER?
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | gbaddeley | 
			  
				|  Posted: Thu May 26, 2011 3:39 pm    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 2538
 Location: Melbourne, Australia
 
 | 
			  
				| 
   
	| Quote: |  
	| My problem is when I try to receive the msgs, I get the subject error. 
 /opt/mqm/samp/bin> ./amqsgetc DELL.P.LQ DELL.P.QM
 Sample AMQSGET0 start
 MQCONN ended with reason code 2058
 |  
 Are you trying to receive the messages by running a program on the Queue Manager server?  If yes, its easier to use amqsget, not amqsgetc.
 
 amqsgetc requires a client connection channel to be implicitly defined via reference to envrionment variables MQSERVER, MQCHLLIB &/or MQCHLTAB, or appropriate entries in your mqclient.ini file.
 _________________
 Glenn
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | themqstudent | 
			  
				|  Posted: Fri May 27, 2011 6:41 am    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 26 May 2011Posts: 22
 
 
 | 
			  
				| Hi Glenn, 
 You are right.
 I used amqsget instead of amqsgetc, as you suggested, and I am now able to read the message. I think the problem was what you described about the environmental variables. I set up the first variable you described on the client (sender) side as in export MQSERVER="DELL.P.RCVCHA2/TCP/sles11(1414)". But I never set up the other two variables. I actually did not know anything about the other two variables.
 
 Thank you for your help
 
 Victor
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Fri May 27, 2011 8:17 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| themqstudent wrote: |  
	| Hi Glenn, 
 You are right.
 I used amqsget instead of amqsgetc, as you suggested, and I am now able to read the message. I think the problem was what you described about the environmental variables. I set up the first variable you described on the client (sender) side as in export MQSERVER="DELL.P.RCVCHA2/TCP/sles11(1414)". But I never set up the other two variables. I actually did not know anything about the other two variables.
 
 Thank you for your help
 
 Victor
 |  
 Suggested study
  material from the infocenter: the mq client manual.  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PriyaJ | 
			  
				|  Posted: Thu Jun 29, 2017 11:54 am    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 29 Jun 2017Posts: 21
 
 
 | 
			  
				| Hi, 
 Could you please let me know how the issue was resolved?
 
 I am not able to find any file as 'mqclient.ini' under /var/mqm.
 
 Also I wanted to know how we can set the environment variables under what path.
 
 My MQ version is 5.3.
 
 Could some please help me on this.
 
 Error : Sample AMQSGET0 start
 MQCONN ended with reason code 2058
 
 Where can I check the below things in my server?
 
 MQCCSID=1051
 MQSERVER=NRE.RECV.CLIENTS/TCP/kitten(1414)
 JT.DISPATCHER_REQ.QL BSTB .
 
 Could some one please help. I am exploring on this issue since more than a week, but no luck.
 
 Regards
 Priya
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PaulClarke | 
			  
				|  Posted: Thu Jun 29, 2017 2:26 pm    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 17 Nov 2005Posts: 1002
 Location: New Zealand
 
 | 
			  
				| Firstly I'm sure you don't need me to tell you that an MQ 5.3 Client is VERY old and out of service. I would suggest you install the latest available MQ Client. They are free after all. 
 Secondly my guess would be that you should try a lower case TCP in MQSERVER before you try anything else. eg.
 
 
 
   
	| Code: |  
	| MQSERVER=NRE.RECV.CLIENTS/tcp/kitten(1414) |  
 I assume that you are trying to run amqsgetc right ?
 
 
 Cheers,
 
 Paul
 _________________
 Paul Clarke
 MQGem Software
 www.mqgem.com
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PriyaJ | 
			  
				|  Posted: Thu Jun 29, 2017 3:08 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 29 Jun 2017Posts: 21
 
 
 | 
			  
				| Hi Paul, 
 Thank you foryour response.
 
 Yes it is very old, but this is what is in use in my project
   
 Done :
 
 kitten[mqm]:/home/mqm:>export MQSERVER='SYSTEM.DEF.SVRCONN/tcp/kitten(1414)'
 kitten[mqm]:/home/mqm:>echo $MQSERVER
 SYSTEM.DEF.SVRCONN/tcp/kitten(1414)
 
 yes i am trying to do amqsgetc.
 
 Still no luck
   
 kitten[mqm]:/opt/mqm/samp/bin:>./amqsputc JT.DISPATCHER_REQ.QL BSTB
 Sample AMQSPUT0 start
 MQCONN ended with reason code 2058
 kitten[mqm]:/opt/mqm/samp/bin:>./amqsgetc JT.DISPATCHER_REQ.QL BSTB
 Sample AMQSGET0 start
 MQCONN ended with reason code 2058
 kitten[mqm]:/opt/mqm/samp/bin:>
 
 Could you also tell me where MQSERVER env variable can be found(path/file name?)
 
 Regards
 Priya
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PaulClarke | 
			  
				|  Posted: Thu Jun 29, 2017 3:14 pm    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 17 Nov 2005Posts: 1002
 Location: New Zealand
 
 | 
			  
				| and you are absolutely certain that you have a listener on kitten for Queue Manager BSTB listening on port 1414 ? 
 What happens if you don't specify the Queue Manager name on the amqsputc call. Just say
 
 
 
 
   
	| Code: |  
	| ./amqsputc JT.DISPATCHER_REQ.QL |  
 Cheers,
 
 Paul.
 _________________
 Paul Clarke
 MQGem Software
 www.mqgem.com
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PriyaJ | 
			  
				|  Posted: Thu Jun 29, 2017 3:18 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 29 Jun 2017Posts: 21
 
 
 | 
			  
				| Yes, because I have run 1414 listener on kitten before setting MQSERVER variable. 
 I get the same error(MQCONN ended with reason code 2058)
 
 Regards
 Priya
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PaulClarke | 
			  
				|  Posted: Thu Jun 29, 2017 3:24 pm    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 17 Nov 2005Posts: 1002
 Location: New Zealand
 
 | 
			  
				| Ok, well we know you are not getting out of the client then. Since you are not passing a Queue Manager name you can not actually get a true 2058. However, the client code does use the 2058 to indicate a configuration problem. In later clients more reason codes were added to make diagnostic easier which is another reason why you should upgrade. 
 I know for a fact that getting the case wrong on the MQSERVER variable can lead to 2058 so I suggested you change it. However, in hind-sight, I believe you were right to have it upper-case so please change it back.
 
 If you still get 2058 then I suggest you either upgrade your client for better diagnostics, take an MQ trace or contact IBM Service.
 
 Cheers,
 Paul.
 _________________
 Paul Clarke
 MQGem Software
 www.mqgem.com
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PriyaJ | 
			  
				|  Posted: Thu Jun 29, 2017 3:29 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 29 Jun 2017Posts: 21
 
 
 | 
			  
				| Hmm.. thank you Paul for your valuable response. 
 I will change that back to upper case. no issues.
 
 I wish it was in my hand to upgrade the MQ, but at present I cannot do that, there is a critical testing going on which includes several applications in the flow.
 
 Lets see if I can get something. I am really trying hard to get this resolved :-|
 
 Once again thanks for your guidance.
 
 Regards
 Priya
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |