zatosource / zato

ESB, SOA, REST, APIs and Cloud Integrations in Python
https://zato.io
GNU Affero General Public License v3.0
1.12k stars 240 forks source link

Could not create outgoing IBM MQ connection with version 3.2+rev.765a30d-py3.6.9 #1122

Closed hondab closed 3 years ago

hondab commented 3 years ago

Hi, Just installed a fresh version of zato3.2+rev.765a30d-py3.6.9 and I am successful in defining an IBM MQ Definition and also doing a Ping,, but when I try to define an Outbound MQ connection, I get the following Exception:

Could not create outgoing IBM MQ connection, e:`Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/web/views/outgoing/jms_wmq.py", line 109, in create delivery_mode_text = delivery_friendly_name[int(req.POST['delivery_mode'])] KeyError: 1

I am able to define Inbound MQ Connections and these work getting messages from the MQ Queue, so do not think there is anything missing from an MQ Setup point of view.

Please provide any advice on how to fix it or where to look for more info.

dsuch commented 3 years ago

Hello @hondab,

thank you for opening the ticket - I am looking it at right now, I will keep you posted.

Just one question, what kind of an installation is it? From a .deb or .rpm package or under Docker?

It does not influence the current situation but installing updates differs depending on how you installed the platform so I would just like to confirm it.

Regards.

dsuch commented 3 years ago

This is corrected, please install the latest updates per the instructions here:

https://zato.io/docs/admin/guide/install/update.html

Once you do it, please make sure to restart both the server and web-admin dashboard.

Next, you can confirm the installation by creating a new outgoing IBM MQ connection, clicking "Send a message" and, once it is created, filling out the form to send a message to your queue manager.

Thank you.

hondab commented 3 years ago

HI This is a deb install on Ubuntu 18 and the install was simple, and I followed all the steps for setting the MQ env variable like export LD_LIBRARY_PATH=/opt/mqm/lib64:/opt/mqm/lib: in addition to set the ibm_mq=true in the /opt/zato/esb/env3/server1/config/repo/server.conf.

Like I said, the Ping from the Definition works, and it is also able to read MQ messages from the Channel->IBM_MQ just fine.. its only the Outgoing-->IBM MQ that I am having an issue with.

[image: image.png]

[image: image.png]

On Wed, Feb 3, 2021 at 2:30 PM Dariusz Suchojad notifications@github.com wrote:

Hello @hondab https://github.com/hondab,

thank you for opening the ticket - I am looking it at right now, I will keep you posted.

Just one question, what kind of an installation is it? From a .deb or .rpm package or under Docker?

It does not influence the current situation but installing updates differs depending on how you installed the platform so I would just like to confirm it.

Regards.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-772760776, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KSSQCJJ53HGA6FG5GTS5GPT3ANCNFSM4XBNOPBQ .

dsuch commented 3 years ago

Hello @hondab,

I am not sure if you saw my previous message, but I have already pushed a change to deal with this situation - please install the latest updates using the instructions here, making sure that you restart your server and web-admin dashboard afterwards:

https://zato.io/docs/admin/guide/install/update.html

hondab commented 3 years ago

OK, applied the Fix, and It now allows me to Submit a message to the Queue.. but it throws an Exception.

[image: image.png]

On Wed, Feb 3, 2021 at 2:39 PM Dariusz Suchojad notifications@github.com wrote:

This is corrected, please install the latest updates per the instructions here:

https://zato.io/docs/admin/guide/install/update.html

Once you do it, please make sure to restart both the server and web-admin dashboard.

Next, you can confirm the installation by creating a new outgoing IBM MQ connection, clicking "Send a message" and, once it is created, filling out the form to send a message to your queue manager.

Thank you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-772770543, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KQPNNYAN5KWDLQG5G3S5GQ5NANCNFSM4XBNOPBQ .

dsuch commented 3 years ago

Please post the body of the exception as text, not as a screenshot, which does not display here.

hondab commented 3 years ago

Here you go.

Caught an exception, e:Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/web/views/outgoing/jms_wmq.py", line 177, in send_message_action response = req.zato.client.invoke('zato.outgoing.jms-wmq.send-message', request) File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/middleware.py", line 76, in invoke raise Exception('CID: {}\nDetails: {}'.format(zato_env.get('cid'), zato_env.get('details'))) Exception: CID: None Details: None

On Wed, Feb 3, 2021 at 6:17 PM Dariusz Suchojad notifications@github.com wrote:

Please post the body of the exception as text, not as a screenshot, which does not display here.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-772893163, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KVGSPRKIDMN7LZ3IJTS5HKPVANCNFSM4XBNOPBQ .

dsuch commented 3 years ago

Thanks, there will be details in /opt/zato/esb/env3/server1/logs/server.log - can you post it too?

dsuch commented 3 years ago

Also, in addition to server.log there is a file called ibm-mq.log which may have details as well.

hondab commented 3 years ago

See attached..

Caught an exception, e:`Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/web/views/outgoing/jms_wmq.py", line 177, in send_message_action response = req.zato.client.invoke('zato.outgoing.jms-wmq.send-message', request) File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/middleware.py", line 76, in invoke raise Exception('CID: {}\nDetails: {}'.format(zato_env.get('cid'), zato_env.get('details'))) Exception: CID: None Details: None

Best Regards

Honda

On Wed, Feb 3, 2021 at 6:52 PM Dariusz Suchojad notifications@github.com wrote:

Also, in addition to server.log there is a file called ibm-mq.log which may have details as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-772908943, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KXM633VEIYZDC7WYLLS5HOU7ANCNFSM4XBNOPBQ .

dsuch commented 3 years ago

Hello @hondab,

I am working on it as we speak - in the meantime, would it be possible for you to contact me on dsuch at zato.io?

Thank you.

dsuch commented 3 years ago

Hello,

I have pushed changes related to this ticket - please install them using the same instructions as before:

https://zato.io/docs/admin/guide/install/update.html

hondab commented 3 years ago

Caught an exception, e:Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/web/views/outgoing/jms_wmq.py", line 177, in send_message_action response = req.zato.client.invoke('zato.outgoing.jms-wmq.send-message', request) File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/middleware.py", line 76, in invoke raise Exception('CID: {}\nDetails: {}'.format(json_data.get('cid'), json_data.get('details'))) Exception: CID: b6b112b672c858d92b9e2edd Details: Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 382, in dispatch payload, worker_store, self.simple_io_config, post_data, path_info, soap_action) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 689, in handle params_priority=channel_item.params_pri) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 749, in update_handle raise e if isinstance(e, Exception) else Exception(e) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 702, in update_handle self._invoke(service, channel) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 588, in _invoke service.handle() File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/internal/service.py", line 366, in handle response = func(id_, payload, channel, data_format, transport, serialize=True) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 826, in invoke return self.invoke_by_impl_name(self.server.service_store.name_to_impl_name[name], *args, **kwargs) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 804, in invoke_by_impl_name out = self.update_handle(*invoke_args, **kwargs) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 749, in update_handle raise e if isinstance(e, Exception) else Exception(e) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 702, in update_handle self._invoke(service, channel) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 588, in _invoke service.handle() File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/internal/outgoing/jms_wmq.py", line 229, in handle self.server.connector_ibm_mq.send_wmq_message(self.request.input) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/base/parallel/subprocess_/ibm_mq.py", line 57, in send_wmq_message out = self.send_message(*args, **kwargs) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/connector/subprocess_/ipc.py", line 180, in send_message response = self.invoke_connector(msg) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/connector/subprocess_/ipc.py", line 199, in invoke_connector raise Exception(response.text) Exception: Exception in _on_OUTGOING_SEND (2)Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/connector/subprocess_/impl/ibm_mq.py", line 327, in _on_OUTGOING_WMQ_SEND conn.send(text_msg, msg.queue_name) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/jms_wmq/jms/connection.py", line 373, in send queue.put(body, md) File "/opt/zato/3.2.0/code/lib/python3.6/site-packages/pymqi/init.py", line 1931, in put rv = pymqe.MQPUT(self.__qMgr.get_handle(), self.qHandle, m_desc.pack(), put_opts.pack(), msg) File "/opt/zato/3.2.0/code/lib/python3.6/site-packages/pymqi/init.py", line 309, in pack ensure_not_unicode(v) # Python 3 bytes check File "/opt/zato/3.2.0/code/lib/python3.6/site-packages/pymqi/init__.py", line 177, in ensure_not_unicode raise TypeError(msg.format(value)) TypeError: Python 3 style string (unicode) found but not allowed here: REPLY. Convert to bytes. `

`

Send a message using IBM MQ connection My Outgoing CONN

On Thu, Feb 4, 2021 at 5:18 PM Dariusz Suchojad notifications@github.com wrote:

Hello,

I have pushed changes related to this ticket - please install them using the same instructions as before:

https://zato.io/docs/admin/guide/install/update.html

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-773640268, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KWQQOTOLE4DUYDD45TS5MMM3ANCNFSM4XBNOPBQ .

hondab commented 3 years ago

Forgot to send logs..

On Thu, Feb 4, 2021 at 7:07 PM Humayun Bhyat bhyatster@gmail.com wrote:

Caught an exception, e:Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/web/views/outgoing/jms_wmq.py", line 177, in send_message_action response = req.zato.client.invoke('zato.outgoing.jms-wmq.send-message', request) File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/middleware.py", line 76, in invoke raise Exception('CID: {}\nDetails: {}'.format(json_data.get('cid'), json_data.get('details'))) Exception: CID: b6b112b672c858d92b9e2edd Details: Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 382, in dispatch payload, worker_store, self.simple_io_config, post_data, path_info, soap_action) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 689, in handle params_priority=channel_item.params_pri) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 749, in update_handle raise e if isinstance(e, Exception) else Exception(e) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 702, in update_handle self._invoke(service, channel) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 588, in _invoke service.handle() File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/internal/service.py", line 366, in handle response = func(id_, payload, channel, data_format, transport, serialize=True) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 826, in invoke return self.invoke_by_impl_name(self.server.service_store.name_to_impl_name[name], *args, **kwargs) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 804, in invoke_by_impl_name out = self.update_handle(*invoke_args, **kwargs) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 749, in update_handle raise e if isinstance(e, Exception) else Exception(e) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 702, in update_handle self._invoke(service, channel) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 588, in _invoke service.handle() File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/internal/outgoing/jms_wmq.py", line 229, in handle self.server.connector_ibm_mq.send_wmq_message(self.request.input) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/base/parallel/subprocess_/ibm_mq.py", line 57, in send_wmq_message out = self.send_message(*args, **kwargs) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/connector/subprocess_/ipc.py", line 180, in send_message response = self.invoke_connector(msg) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/connector/subprocess_/ipc.py", line 199, in invoke_connector raise Exception(response.text) Exception: Exception in _on_OUTGOING_SEND (2)Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/connector/subprocess_/impl/ibm_mq.py", line 327, in _on_OUTGOING_WMQ_SEND conn.send(text_msg, msg.queue_name) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/jms_wmq/jms/connection.py", line 373, in send queue.put(body, md) File "/opt/zato/3.2.0/code/lib/python3.6/site-packages/pymqi/init.py", line 1931, in put rv = pymqe.MQPUT(self.__qMgr.get_handle(), self.qHandle, m_desc.pack(), put_opts.pack(), msg) File "/opt/zato/3.2.0/code/lib/python3.6/site-packages/pymqi/init.py", line 309, in pack ensure_not_unicode(v) # Python 3 bytes check File "/opt/zato/3.2.0/code/lib/python3.6/site-packages/pymqi/init__.py", line 177, in ensure_not_unicode raise TypeError(msg.format(value)) TypeError: Python 3 style string (unicode) found but not allowed here: REPLY. Convert to bytes. `

`

Send a message using IBM MQ connection My Outgoing CONN

On Thu, Feb 4, 2021 at 5:18 PM Dariusz Suchojad notifications@github.com wrote:

Hello,

I have pushed changes related to this ticket - please install them using the same instructions as before:

https://zato.io/docs/admin/guide/install/update.html

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-773640268, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KWQQOTOLE4DUYDD45TS5MMM3ANCNFSM4XBNOPBQ .

dsuch commented 3 years ago

I am not sure what the latest message is about? Can you please provide more context along with the output from zato --version? Thank you.

hondab commented 3 years ago

The Version info is:

Zato 3.2+rev.8ef7775-py3.6.9

On Thu, Feb 4, 2021 at 7:09 PM Dariusz Suchojad notifications@github.com wrote:

I am not sure what the latest message is about? Can you please provide more context along with the output from zato --version? Thank you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-773686975, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KTTR6JGOR3OYAUXDMDS5MZMPANCNFSM4XBNOPBQ .

hondab commented 3 years ago

~$ zato --version Zato 3.2+rev.8ef7775-py3.6.9 zato@ravi-Virtual-Machine:~$ Zato 3.2+rev.8ef7775-py3.6.9

Getting the following Exception:

Caught an exception, e:Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/web/views/outgoing/jms_wmq.py", line 177, in send_message_action response = req.zato.client.invoke('zato.outgoing.jms-wmq.send-message', request) File "/opt/zato/3.2.0/code/zato-web-admin/src/zato/admin/middleware.py", line 76, in invoke raise Exception('CID: {}\nDetails: {}'.format(json_data.get('cid'), json_data.get('details'))) Exception: CID: fc6efb9c3600b36db6484200 Details: Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 382, in dispatch payload, worker_store, self.simple_io_config, post_data, path_info, soap_action) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 689, in handle params_priority=channel_item.params_pri) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 749, in update_handle raise e if isinstance(e, Exception) else Exception(e) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 702, in update_handle self._invoke(service, channel) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 588, in _invoke service.handle() File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/internal/service.py", line 366, in handle response = func(id_, payload, channel, data_format, transport, serialize=True) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 826, in invoke return self.invoke_by_impl_name(self.server.service_store.name_to_impl_name[name], *args, **kwargs) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 804, in invoke_by_impl_name out = self.update_handle(*invoke_args, **kwargs) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 749, in update_handle raise e if isinstance(e, Exception) else Exception(e) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 702, in update_handle self._invoke(service, channel) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/__init__.py", line 588, in _invoke service.handle() File "/opt/zato/3.2.0/code/zato-server/src/zato/server/service/internal/outgoing/jms_wmq.py", line 229, in handle self.server.connector_ibm_mq.send_wmq_message(self.request.input) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/base/parallel/subprocess_/ibm_mq.py", line 57, in send_wmq_message out = self.send_message(*args, **kwargs) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/connector/subprocess_/ipc.py", line 180, in send_message response = self.invoke_connector(msg) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/connector/subprocess_/ipc.py", line 199, in invoke_connector raise Exception(response.text) Exception: Exception in _on_OUTGOING_SEND (2)Traceback (most recent call last): File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/connector/subprocess_/impl/ibm_mq.py", line 327, in _on_OUTGOING_WMQ_SEND conn.send(text_msg, msg.queue_name) File "/opt/zato/3.2.0/code/zato-server/src/zato/server/connection/jms_wmq/jms/connection.py", line 373, in send queue.put(body, md) File "/opt/zato/3.2.0/code/lib/python3.6/site-packages/pymqi/init.py", line 1931, in put rv = pymqe.MQPUT(self.__qMgr.get_handle(), self.qHandle, m_desc.pack(), put_opts.pack(), msg) File "/opt/zato/3.2.0/code/lib/python3.6/site-packages/pymqi/init.py", line 309, in pack ensure_not_unicode(v) # Python 3 bytes check File "/opt/zato/3.2.0/code/lib/python3.6/site-packages/pymqi/init__.py", line 177, in ensure_not_unicode raise TypeError(msg.format(value)) TypeError: Python 3 style string (unicode) found but not allowed here: REPLY. Convert to bytes. `

`

On Fri, Feb 5, 2021 at 1:32 PM Humayun Bhyat bhyatster@gmail.com wrote:

The Version info is:

Zato 3.2+rev.8ef7775-py3.6.9

On Thu, Feb 4, 2021 at 7:09 PM Dariusz Suchojad notifications@github.com wrote:

I am not sure what the latest message is about? Can you please provide more context along with the output from zato --version? Thank you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-773686975, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KTTR6JGOR3OYAUXDMDS5MZMPANCNFSM4XBNOPBQ .

dsuch commented 3 years ago

I cannot reproduce it - what other details are in the ibm-mq.log file? Also, what is the "REPLY" string that is mentioned in the exception?

hondab commented 3 years ago

Hi Zatosource/Zato

The REPLY, is the value I set for the Reply To: field.

If I remove it., everything works as expected. It only throws the Exception when I have any string in that field.

Best Regards

Honda

On Fri, Feb 5, 2021 at 1:54 PM Dariusz Suchojad notifications@github.com wrote:

I cannot reproduce it - what other details are in the ibm-mq.log file? Also, what is the "REPLY" string that is mentioned in the exception?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-774223022, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KQILKCHDOS4TTHQV3TS5Q5IHANCNFSM4XBNOPBQ .

dsuch commented 3 years ago

Hello,

please install the latest updates and try again. Thank you.

https://zato.io/docs/admin/guide/install/update.html

hondab commented 3 years ago

Thanks!

This is now working perfectly

[image: image.png]

On Sun, Feb 7, 2021 at 2:48 PM Dariusz Suchojad notifications@github.com wrote:

Hello,

please install the latest updates and try again. Thank you.

https://zato.io/docs/admin/guide/install/update.html

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zatosource/zato/issues/1122#issuecomment-774745966, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZV2KSTOZXWJHSVWBX3JF3S53U7FANCNFSM4XBNOPBQ .

dsuch commented 3 years ago

Great, thanks for letting me know. Just one note - your inline screenshots do not display at all, when you reply in email using such screenshots, it is not possible to see them. Thank you again, I am closing the ticket.