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

KVDB - DUMP remote command raises UnicodeDecodeError #516

Closed fklosowski closed 8 years ago

fklosowski commented 8 years ago

Ussing Key/value DB > Remote commands feature in web admin, there is an error raised while DUMP command execution.
Steps to reproduce the error:

  1. Execute command SET key value to set the string value of a key.
  2. Execute command DUMP key which is expected to return a serialized verison of the value stored at the specified key. At this stage the following error message is displayed:

Traceback (most recent call last): File "/opt/zato/2.0.7/zato-web-admin/src/zato/admin/web/views/kvdb/init.py", line 44, in remote_command_execute response = req.zato.client.invoke('zato.kvdb.remote-command.execute', {'command': req.POST['command']}) File "/opt/zato/2.0.7/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: K06GED3ZQJHEDEXPGFQWFCGV3ABD Details: Traceback (most recent call last): File "/opt/zato/2.0.7/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/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/zato-server/src/zato/server/service/init.py", line 401, in update_handle self._invoke(service, channel) File "/opt/zato/2.0.7/zato-server/src/zato/server/service/init.py", line 344, in invoke service.handle() File "/opt/zato/2.0.7/zato-server/src/zato/server/service/internal/service.py", line 271, in handle response = func(id, payload, channel, data_format, transport, serialize=True) File "/opt/zato/2.0.7/zato-server/src/zato/server/service/init.py", 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/zato-server/src/zato/server/service/init.py", line 483, in invoke_by_impl_name return self.update_handle(_invoke_args, _kwargs) File "/opt/zato/2.0.7/zato-server/src/zato/server/service/init.py", line 429, in update_handle raise resp_e UnicodeDecodeError: 'utf8' codec can't decode byte 0xa9 in position 11: invalid start byte

The same command, executed by redis-cli returns:

~$ redis-cli dump key "\x00\x05value\x06\x00\x17\x1b\xa9\xb84\xff\xa7\xfd"

dsuch commented 8 years ago

Done in 364bb95ded993dc3de02a85e5075b60f31f5dcc8.