(Migrated) Error on clear in-flight message in Pub/Sub

(This message has been automatically imported from the retired mailing list)

Hi,

I’m new to Zato and was trying out the Pub/Sub feature. I encountered the f=
ollowing error when I clicked on “Clear in-flight” in the consumer. Am I do=
ing something wrong here? BTW I also got errors when I use CURL to acknowle=
dge the message.

Traceback (most recent call last):
File “/opt/zato/2.0.7/code/zato-web-admin/src/zato/admin/web/views/pubsub=
/consumers.py”, line 142, in clear_queue
’zato.pubsub.consumers.clear-queue’, {‘queue_type’: queue_type, ‘client=
_id’: client_id})
File “/opt/zato/2.0.7/code/zato-web-admin/src/zato/admin/middleware.py”, =
line 72, in invoke
raise Exception(‘CID: {}\nDetails: {}’.format(zato_env.get(‘cid’), zato=
_env.get(‘details’)))
Exception: CID: K074EJWKQZKAN8PFGEZTKRHM3X92
Details: Traceback (most recent call last):
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/connection/http_so=
ap/channel.py”, line 198, in dispatch
payload, worker_store, self.simple_io_config, post_data)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/connection/http_so=
ap/channel.py”, line 350, in handle
params_priority=3Dchannel_item.params_pri)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/init.p=
y”, line 401, in update_handle
self.invoke(service, channel)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/init.p=
y”, line 344, in invoke
service.handle()
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/internal/s=
ervice.py”, line 271, in handle
response =3D func(id
, payload, channel, data_format, transport, serial=
ize=3DTrue)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/init.p=
y”, line 499, in invoke
return self.invoke_by_impl_name(self.server.service_store.name_to_impl
=
name[name], *args, **kwargs)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/init.p=
y”, line 483, in invoke_by_impl_name
return self.update_handle(*invoke_args, **kwargs)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/init.p=
y”, line 401, in update_handle
self._invoke(service, channel)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/init.p=
y”, line 344, in _invoke
service.handle()
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/internal/p=
ubsub/consumers.py”, line 295, in handle
self.pubsub.acknowledge(sub_key, self.pubsub.get_consumer_in_flight_mes=
sage_list(sub_key))
File “/opt/zato/2.0.7/code/zato-common/src/zato/common/pubsub/init.py=
”, line 921, in acknowledge
return self.impl.acknowledge_delete(ctx)
File “/opt/zato/2.0.7/code/zato-common/src/zato/common/pubsub/init.py=
”, line 643, in acknowledge_delete
args=3D[int(is_delete)] + ctx.msg_ids)
TypeError: can only concatenate list (not “set”) to list


Important: This email is confidential and may be privileged. If you are not=
the intended recipient, please delete it and notify us immediately; you sh=
ould not copy or use it for any purpose, nor disclose its contents to any o=
ther person. Thank you.

On 18/01/16 04:26, Leong Hong Fai wrote:

File
"/opt/zato/2.0.7/code/zato-common/src/zato/common/pubsub/init.py",
line 643, in acknowledge_delete

args=[int(is_delete)] + ctx.msg_ids)

TypeError: can only concatenate list (not “set”) to list

Hi there,

can you please send in entries from /path/to/server/logs/pubsub.log at
and around the time of the exception above?

Hi Dariusz,

There’s nothing in pubsub.log when I trigger a “clear in-flight” command in the UI. So I did a command line acknowledge and I got this.

[zato@localhost logs]$ curl -XDELETE -H X-Zato-PubSub-Key:K07XSMY0C42Z9KDEWQ8J4J39CXVE 'http://photo:photo@localhost:17010/zato/pubsub/msg/K06KWXWSBG1SSHEMBKJ7CNM3C691/?ack=true
Traceback (most recent call last):
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/connection/http_soap/channel.py”, line 198, in dispatch
payload, worker_store, self.simple_io_config, post_data)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/connection/http_soap/channel.py”, line 350, in handle
params_priority=channel_item.params_pri)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/init.py”, line 388, in update_handle
environ=kwargs.get(‘environ’))
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/init.py”, line 845, in update
service._init()
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/init.py”, line 298, in _init
self.request.init(is_sio, self.cid, self.SimpleIO, self.data_format, self.transport, self.wsgi_environ)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/reqresp/init.py”, line 129, in init
optional_list, use_channel_params_only, path_prefix, default_value, use_text, False)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/reqresp/init.py”, line 163, in get_params
raise Exception(msg)
Exception: Caught an exception, param:<Boolean at 0x6ec4990 name:[ack]>, params_to_visit:(u'max', u'dir', u'format', u'mime_type', <Integer at 0x6ec4950 name:[priority]>, <Integer at 0x6ec44d0 name:[expiration]>, <AsIs at 0x6ec4e10 name:[msg_id]>, <Boolean at 0x6ec4990 name:[ack]>, <Boolean at 0x6ec4a90 name:[reject]>), has_simple_io_config:True, e:Traceback (most recent call last): File "/opt/zato/2.0.7/code/zato-server/src/zato/server/service/reqresp/__init__.py", line 156, in get_params self.bool_parameter_prefixes, self.int_parameters, self.int_parameter_suffixes, self.params_priority) File "/opt/zato/2.0.7/code/zato-server/src/zato/server/service/reqresp/sio.py", line 412, in convert_param int_parameters, int_parameter_suffixes, None, data_format, False) File "/opt/zato/2.0.7/code/zato-server/src/zato/server/service/reqresp/sio.py", line 350, in convert_sio raise ZatoException(msg=msg) ZatoException: Conversion error, param:<Boolean at 0x6ec4990 name:[ack]>, param_name:ack, repr:True, type:<type ‘bool’>, e:Traceback (most recent call last):
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/reqresp/sio.py”, line 336, in convert_sio
value = param.convert(value, param_name, data_format, from_sio_to_external)
File “/opt/zato/2.0.7/code/zato-server/src/zato/server/service/reqresp/sio.py”, line 91, in convert
return self.serialize_dispatch[(from_sio_to_external, data_type)](value, param_name) if value else value
KeyError: (False, None)

-----Original Message-----
From: Dariusz Suchojad [mailto:dsuch@zato.io]
Sent: Monday, 18 January 2016 8:58 PM
To: Leong Hong Fai hongfai@nus.edu.sg; zato-discuss@lists.zato.io
Subject: Re: [Zato-discuss] Error on clear in-flight message in Pub/Sub

On 18/01/16 04:26, Leong Hong Fai wrote:

File
"/opt/zato/2.0.7/code/zato-common/src/zato/common/pubsub/init.py",
line 643, in acknowledge_delete

args=[int(is_delete)] + ctx.msg_ids)

TypeError: can only concatenate list (not “set”) to list

Hi there,

can you please send in entries from /path/to/server/logs/pubsub.log at and around the time of the exception above?

On 19/01/16 02:43, Leong Hong Fai wrote:

There’s nothing in pubsub.log when I trigger a “clear in-flight” command in the UI. So I did a command line acknowledge and I got this.

[zato@localhost logs]$ curl -XDELETE -H X-Zato-PubSub-Key:K07XSMY0C42Z9KDEWQ8J4J39CXVE
http://photo:photo@localhost:17010/zato/pubsub/msg/K06KWXWSBG1SSHEMBKJ7CNM3C691/?ack=true

Hi,

can you please do the following and repeat the command afterwards?

  • Stop each server
  • Open /path/to/server/config/repo/server.conf for each server
  • Set misc.return_internal_objects to True
  • Start servers

Steps above will let you display internal objects in web-admin.

  • Still in web-admin, navigate to Connections->Channels
  • Find zato.pubsub.rest and click Edit
  • Set its data format to JSON and click OK

Now please issue the curl command again.

thanks,

Hi Dariusz,

It all works well after following your instruction but I’m still facing issue with using the “Clear in-flight” link.

Hong Fai LEONG (Mr) :: Senior IT Architect, Computer Centre :: National University of Singapore :: Computer Centre Level 4, 2 Engineering Drive 4, Singapore 117584 :: +65 6516 2527 (DID) :: +65 6778 0198 (Fax) :: hongfai@nus.edu.sg (E) :: nus.edu.sg (W) :: Company Registration No: 200604346E

Important: This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately; you should not copy or use it for any purpose, nor disclose its contents to any other person. Thank you.

-----Original Message-----
From: Dariusz Suchojad [mailto:dsuch@zato.io]
Sent: Tuesday, 19 January 2016 6:57 PM
To: Leong Hong Fai hongfai@nus.edu.sg; zato-discuss@lists.zato.io
Subject: Re: [Zato-discuss] Error on clear in-flight message in Pub/Sub

On 19/01/16 02:43, Leong Hong Fai wrote:

There’s nothing in pubsub.log when I trigger a “clear in-flight” command in the UI. So I did a command line acknowledge and I got this.

[zato@localhost logs]$ curl -XDELETE -H X-Zato-PubSub-Key:K07XSMY0C42Z9KDEWQ8J4J39CXVE
http://photo:photo@localhost:17010/zato/pubsub/msg/K06KWXWSBG1SSHEMBKJ7CNM3C691/?ack=true

Hi,

can you please do the following and repeat the command afterwards?

  • Stop each server
  • Open /path/to/server/config/repo/server.conf for each server
  • Set misc.return_internal_objects to True
  • Start servers

Steps above will let you display internal objects in web-admin.

  • Still in web-admin, navigate to Connections->Channels
  • Find zato.pubsub.rest and click Edit
  • Set its data format to JSON and click OK

Now please issue the curl command again.

thanks,


Dariusz Suchojad

https://zato.io
ESB, SOA, REST, APIs and Cloud Integrations in Python


Important: This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately; you should not copy or use it for any purpose, nor disclose its contents to any other person. Thank you.