zato enmasse throws ParsingException


#1

Hi,

When I run the following command sudo -i -u zato zato enmasse /opt/zato/perch/server1/ --input /var/www/zato/perch/db_scripts/new_base/import.json --import --replace-odb-objects
The following error is thrown

Could not fetch objects of type zato_generic_connection: Traceback (most recent call last):
File “/opt/zato/3.0/code/zato-server/src/zato/server/connection/http_soap/channel.py”, line 268, in dispatch
payload, worker_store, self.simple_io_config, post_data, path_info, soap_action)
File “/opt/zato/3.0/code/zato-server/src/zato/server/connection/http_soap/channel.py”, line 495, in handle
params_priority=channel_item.params_pri)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/init.py”, line 474, in update_handle
self._invoke(service, channel)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/init.py”, line 396, in invoke
service.handle()
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/internal/service.py”, line 311, in handle
response = func(id
, payload, channel, data_format, transport, serialize=True)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/init.py”, line 599, in invoke
return self.invoke_by_impl_name(self.server.service_store.name_to_impl_name[name], *args, **kwargs)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/init.py”, line 581, in invoke_by_impl_name
return self.update_handle(*invoke_args, **kwargs)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/init.py”, line 441, in update_handle
wmq_ctx=kwargs.get(‘wmq_ctx’))
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/init.py”, line 942, in update
service._init(channel_type in _wsgi_channels)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/internal/init.py”, line 71, in init
super(AdminService, self).init(is_http)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/init.py”, line 351, in init
self.server.encrypt)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/init.py”, line 141, in init
self.init_flat_sio(cid, sio, data_format, transport, wsgi_environ, required_list)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/init.py”, line 184, in init_flat_sio
required_list, use_channel_params_only, path_prefix, default_value, use_text))
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/init.py”, line 220, in get_params
raise ParsingException(msg)
ParsingException: <ParsingException at 0x7f1c0df00820 cid:Caught an exception, param:type
, params_to_visit:(‘cluster_id’, 'type
’), has_simple_io_config:True, e:Traceback (most recent call last):
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/init.py”, line 213, in get_params
True, self.encrypt_func, self.encrypt_secrets, self.params_priority)
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/sio.py”, line 483, in convert_param
raise ParsingException(cid, msg)
ParsingException: <ParsingException at 0x7f1c0df2f500 cid:None, msg:Required input element:type
not found, value:ZATO_NONE, data_format:json, payload:{‘cluster_id’: 1}, channel_params:{}>, msg:None>

On using the verbose to the above command I could see that the error is invoked while creating zato_generic_connection. The import.json file which we are using doesn’t have any entry for zato_generic_connection, not sure why this is been invoked.

What could be the possible issue here?

Thanks,
Sai Bhargav


#2

I have something comparable, also on running enmasse:

    2018-09-19 15:42:28,464 - WARNING - 137:DummyThread-10 - zato.server.service:583 - Could not invoke `zato.generic.connection.get-list`, e:`Traceback (most recent call last):
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/__init__.py", line 581, in invoke_by_impl_name
    return self.update_handle(*invoke_args, **kwargs)
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/__init__.py", line 441, in update_handle
    wmq_ctx=kwargs.get('wmq_ctx'))
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/__init__.py", line 942, in update
    service._init(channel_type in _wsgi_channels)
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/internal/__init__.py", line 71, in _init
    super(AdminService, self)._init(is_http)
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/__init__.py", line 351, in _init
    self.server.encrypt)
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/__init__.py", line 141, in init
    self.init_flat_sio(cid, sio, data_format, transport, wsgi_environ, required_list)
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/__init__.py", line 184, in init_flat_sio
    required_list, use_channel_params_only, path_prefix, default_value, use_text))
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/__init__.py", line 220, in get_params
    raise ParsingException(msg)
ParsingException: <ParsingException at 0x7f9f2de3daf0 cid:`Caught an exception, param:`type_`, params_to_visit:`('cluster_id', 'type_')`, has_simple_io_config:`True`, e:`Traceback (most recent call last):
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/__init__.py", line 213, in get_params
    True, self.encrypt_func, self.encrypt_secrets, self.params_priority)
  File "/opt/zato/3.0/code/zato-server/src/zato/server/service/reqresp/sio.py", line 483, in convert_param
    raise ParsingException(cid, msg)
ParsingException: <ParsingException at 0x7f9f3d2578c0 cid:`None`, msg:`Required input element:`type_` not found, value:`ZATO_NONE`, data_format:`json`, payload:`{'cluster_id': 1}`, channel_params:`{}``>
``, msg:`None`>

After that, my channels are loading, so enmasse continues. But, the behaviour of the channels is not correct (problems with the routes).

Regards, Jan


#3

One of my older Zato 3 instances, does not have this problem, that instance is based on:

commit 0e74cdfe940a9548a01efbe1e68e6170df109539
Author: Dariusz Suchojad <dsuch-github@m.zato.io>
Date:   Wed Jul 18 08:37:44 2018 +0200