|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
  |
|
pymqi.MQMIError: MQI Error. Comp: 2, Reason 2046: FAILED: M |
View previous topic :: View next topic |
Author |
Message
|
sayli.jadhav |
Posted: Wed Jun 14, 2023 2:36 am Post subject: pymqi.MQMIError: MQI Error. Comp: 2, Reason 2046: FAILED: M |
|
|
Newbie
Joined: 13 Jun 2023 Posts: 4
|
below is my code to set it up Queue:
openOptions = CMQC.MQOO_SET_ALL_CONTEXT
mqod = pymqi.make_q_desc(remote_queue_name.encode('utf-8'))
put_queue = pymqi.Queue(self.mq_qmgr, mqod, openOptions)
put_queue.put(strMsg, put_mqmd, put_pmo)
put_queue.close()
it gives an error as pymqi.MQMIError: MQI Error. Comp: 2, Reason 2046: FAILED: MQRC_OPTIONS_ERROR
I tried setting up
openOptions = CMQC.MQOO_OUTPUT but still no luck.
Can someone please help |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Jun 14, 2023 4:29 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Which MQ call failed? Your OP says “it failed”.
Not a py guy, but options structures are added together before the MQOPEN call is issued.
All MQ calls should include _FAIL_IF_QUIESCING. _________________ 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 |
|
 |
sayli.jadhav |
Posted: Wed Jun 14, 2023 4:51 am Post subject: Re: pymqi.MQMIError: MQI Error. Comp: 2, Reason 2046: FAILED |
|
|
Newbie
Joined: 13 Jun 2023 Posts: 4
|
sayli.jadhav wrote: |
below is my code to set it up Queue:
openOptions = CMQC.MQOO_SET_ALL_CONTEXT
mqod = pymqi.make_q_desc(remote_queue_name.encode('utf-8'))
put_queue = pymqi.Queue(self.mq_qmgr, mqod, openOptions)
put_queue.put(strMsg, put_mqmd, put_pmo)
put_queue.close()
it gives an error as pymqi.MQMIError: MQI Error. Comp: 2, Reason 2046: FAILED: MQRC_OPTIONS_ERROR
I tried setting up
openOptions = CMQC.MQOO_OUTPUT but still no luck it gives an error
File "pymqi\__init__.py", line 1648, in put
pymqi.MQMIError: MQI Error. Comp: 2, Reason 2095: FAILED: MQRC_NOT_OPEN_FOR_SET_ALL
Can someone please help |
|
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Jun 14, 2023 5:48 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
When you attempt to open a queue, you need to specify all of the options added together, something like:
openOptions = CMQC.MQOO.OUTPUT+CMQC.MQOO_SET_ALL_CONTEXT+CMQC.MQOO+FAIL_IF_QUIESCING _________________ 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 |
|
 |
bruce2359 |
Posted: Wed Jun 14, 2023 6:13 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Any compile-time errors? Post them here.
Start a py trace of app execution. Post trace output here. _________________ 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 |
|
 |
hughson |
Posted: Thu Jun 15, 2023 2:49 am Post subject: Re: pymqi.MQMIError: MQI Error. Comp: 2, Reason 2046: FAILED |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
sayli.jadhav wrote: |
below is my code to set it up Queue:
openOptions = CMQC.MQOO_SET_ALL_CONTEXT
mqod = pymqi.make_q_desc(remote_queue_name.encode('utf-8'))
put_queue = pymqi.Queue(self.mq_qmgr, mqod, openOptions)
put_queue.put(strMsg, put_mqmd, put_pmo)
put_queue.close()
it gives an error as pymqi.MQMIError: MQI Error. Comp: 2, Reason 2046: FAILED: MQRC_OPTIONS_ERROR |
This first error is because you have not used the MQOO_OUTPUT option. Since you want to put a message to the queue, you must always first ask to open the queue for output (putting).
sayli.jadhav wrote: |
I tried setting up
openOptions = CMQC.MQOO_OUTPUT but still no luck it gives an error
File "pymqi\__init__.py", line 1648, in put
pymqi.MQMIError: MQI Error. Comp: 2, Reason 2095: FAILED: MQRC_NOT_OPEN_FOR_SET_ALL |
This second error is because the put was using the SET_ALL option for some reason (we can't see all your code so not exactly sure why), and you did not open the queue with the MQOO_SET_ALL_CONTEXT option.
So it sounds like you need to use both the options you have tried individually, together.
Change your openOptions line to look like this:-
Code: |
openOptions = ( CMQC.MQOO_OUTPUT | CMQC.MQOO_SET_ALL_CONTEXT ) |
and let us know how you get on.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
sayli.jadhav |
Posted: Sun Jun 25, 2023 10:36 pm Post subject: |
|
|
Newbie
Joined: 13 Jun 2023 Posts: 4
|
|
Back to top |
|
 |
|
|
  |
|
Page 1 of 1 |
|
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
|
|
|
|