(Migrated) Trouble hot deploying to pickup_dir

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

Hi

I have just upgraded from 2.0. to 2.0.3 and having a problem trying to hot
deploy some code by placing it in pickup_dir

Each time the code is moved and I get the following error

2015-04-13 13:57:43,653 - ERROR - 10402:Dummy-329 - zato.server.base:22 -
Could not handle broker msg:[Bunch(action=u’102200’,
cid=u’K06Y93FNZ0RB4VEEPV3Y8E9X6XQZ’, data_format=u’json’, msg_type=u’0002’,
package_id=26L, payload={u’package_id’: 26L},
service=u’zato.hot-deploy.create’)], e:[Traceback (most recent call last):
File “/opt/zato/2.0.3/zato-server/src/zato/server/base/init.py”, line
47, in on_broker_msg
getattr(self, handler)(msg)
File “/opt/zato/2.0.3/zato-server/src/zato/server/base/worker.py”, line
1191, in on_broker_msg_HOT_DEPLOY_CREATE
return self._on_message_invoke_service(msg, ‘hot-deploy’,
‘HOT_DEPLOY_CREATE’, args)
File “/opt/zato/2.0.3/zato-server/src/zato/server/base/worker.py”, line
1007, in _on_message_invoke_service
environ=msg.get(‘environ’))
File “/opt/zato/2.0.3/zato-server/src/zato/server/service/init.py”,
line 423, in update_handle
raise e
TypeError: ‘NoneType’ object is not iterable

This also fails when uploading via uploading a service package .

The file does successfully make it’s way to
the server2/work/hot-deploy/current directory - In fact on both servers. So
the code is being managed, however the service seems to not be registered.

Thanks

Tim

On 13/04/15 08:17, Tim Hoffmn wrote:

Each time the code is moved and I get the following error

Hi Tim,

are you certain there weren’t any errors above it?

I can see how the one you posted could be triggered by a previous syntax
error in the module containing the service you were deploying.

thanks,

I found deleting the service definition didn’t help.
However after deleting the service (this was a one that existed prior to
the upgrade).
Stopping and starting zato and then attempting a deploy again things
started to work.

T

On 13 April 2015 at 14:17, Tim Hoffmn thoffman.rel@gmail.com wrote:

Hi

I have just upgraded from 2.0. to 2.0.3 and having a problem trying to hot
deploy some code by placing it in pickup_dir

Each time the code is moved and I get the following error

2015-04-13 13:57:43,653 - ERROR - 10402:Dummy-329 - zato.server.base:22 -
Could not handle broker msg:[Bunch(action=u’102200’,
cid=u’K06Y93FNZ0RB4VEEPV3Y8E9X6XQZ’, data_format=u’json’, msg_type=u’0002’,
package_id=26L, payload={u’package_id’: 26L},
service=u’zato.hot-deploy.create’)], e:[Traceback (most recent call last):
File “/opt/zato/2.0.3/zato-server/src/zato/server/base/init.py”,
line 47, in on_broker_msg
getattr(self, handler)(msg)
File “/opt/zato/2.0.3/zato-server/src/zato/server/base/worker.py”, line
1191, in on_broker_msg_HOT_DEPLOY_CREATE
return self._on_message_invoke_service(msg, ‘hot-deploy’,
‘HOT_DEPLOY_CREATE’, args)
File “/opt/zato/2.0.3/zato-server/src/zato/server/base/worker.py”, line
1007, in _on_message_invoke_service
environ=msg.get(‘environ’))
File “/opt/zato/2.0.3/zato-server/src/zato/server/service/init.py”,
line 423, in update_handle
raise e
TypeError: ‘NoneType’ object is not iterable

This also fails when uploading via uploading a service package .

The file does successfully make it’s way to
the server2/work/hot-deploy/current directory - In fact on both servers. So
the code is being managed, however the service seems to not be registered.

Thanks

Tim

Hi

I am stupid I wasn’t going back far enough,.

This service uses pyodbc and after the upgrade I did have to re-install
pyodbc,

File “/opt/zato/2.0.3/zato-server/src/zato/server/service/store.py”, line
155, in import_services_from_file
mod = imp.load_source(mod_name, file_name)
File
"/opt/zato/instances/insphire/server1/work/hot-deploy/current/update_hours.py",
line 3, in
import pyodbc
ImportError: No module named pyodbc
]
2015-04-13 14:16:31,035 - ^[[1;33mWARNING^[[0m - 10402:Dummy-520 -
zato.server.service:22 - Traceback (most recent call last):
File “/opt/zato/2.0.3/zato-server/src/zato/server/service/init.py”,
line 402, in update_handle
self._invoke(service, channel)
File “/opt/zato/2.0.3/zato-server/src/zato/server/service/init.py”,
line 349, in _invoke
service.handle()
File
"/opt/zato/2.0.3/zato-server/src/zato/server/service/internal/hot_deploy/init.py",
line 208, in handle
self.deploy_package(self.request.input.package_id, session)
File
"/opt/zato/2.0.3/zato-server/src/zato/server/service/internal/hot_deploy/init.py",
line 173, in deploy_package
self._deploy_package(session, package_id, dp.payload_name, dp.payload)
File
"/opt/zato/2.0.3/zato-server/src/zato/server/service/internal/hot_deploy/init.py",
line 148, in _deploy_package
success = self._deploy_file(current_work_dir, payload, file_name)
File
"/opt/zato/2.0.3/zato-server/src/zato/server/service/internal/hot_deploy/init.py",
line 131, in _deploy_file
for service_id in
self.server.service_store.import_services_from_file(file_name, False,
current_work_dir):
TypeError: ‘NoneType’ object is not iterable

2015-04-13 14:16:31,035 - ^[[1;31mERROR^[[0m - 10402:Dummy-520 -
zato.server.base:22 - Could not handle broker msg:[Bunch(action=u’102200’,
cid=u’K07TZR673HKAVCJ8GAXC69VRV4JX’, data_format=u’json’, msg_type=u’0002’,
package_id=30L, payload={u’package_id’: 30L},
service=u’zato.hot-deploy.create’)], e:[Traceback (most recent call last):
File “/opt/zato/2.0.3/zato-server/src/zato/server/base/init.py”, line
47, in on_broker_msg
getattr(self, handler)(msg)
File “/opt/zato/2.0.3/zato-server/src/zato/server/base/worker.py”, line
1191, in on_broker_msg_HOT_DEPLOY_CREATE
return self._on_message_invoke_service(msg, ‘hot-deploy’,
‘HOT_DEPLOY_CREATE’, args)
File “/opt/zato/2.0.3/zato-server/src/zato/server/base/worker.py”, line
1007, in _on_message_invoke_service
environ=msg.get(‘environ’))
File “/opt/zato/2.0.3/zato-server/src/zato/server/service/init.py”,
line 423, in update_handle
raise e
TypeError: ‘NoneType’ object is not iterable
]

Sorry about the noise.

T

On 13 April 2015 at 16:26, Dariusz Suchojad dsuch@zato.io wrote:

On 13/04/15 08:17, Tim Hoffmn wrote:

Each time the code is moved and I get the following error

Hi Tim,

are you certain there weren’t any errors above it?

I can see how the one you posted could be triggered by a previous syntax
error in the module containing the service you were deploying.

thanks,


Dariusz Suchojad

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