(Migrated) Syncing services in workers

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

I thought I’d seen the answer to this question before, but browsing the
last couple of months’ list archives I can’t find it.

My test environment is the usual quickstart. However a while back I had
trimmed it down to one server. Now I have put it back to two servers. I
have the load balancer all set up correctly.

The problem is that some services which I deployed earlier on server1,
are not available on server2. So 50% of my requests fail with a KeyError.

The service source files exist in
server1/work/hot-deploy/current/
but not in
server2/work/hot-deploy/current/

As a workaround I’ve just re-copied them to server1/pickup-dir (which
has hot-deployed them to both servers), and now it’s fine, but I
wondered what is the “official” way to ensure your servers are in sync
when adding or re-adding a server?

Regards,

Brian.


Could not invoke the service. name:[testing.dummy-receive], cluster_id:[1], e:[Traceback (most recent call last):
File “/opt/zato/2.0.5/zato-web-admin/src/zato/admin/web/views/service.py”, line 546, in invoke
response = req.zato.client.invoke(name, **input_dict)
File “/opt/zato/2.0.5/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: K06HY8DX3PW866MD394Q67TCCWN1
Details: Traceback (most recent call last):
File “/opt/zato/2.0.5/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.5/zato-server/src/zato/server/connection/http_soap/channel.py”, line 351, in handle
params_priority=channel_item.params_pri)
File “/opt/zato/2.0.5/zato-server/src/zato/server/service/init.py”, line 433, in update_handle
raise Exception(exc_formatted)
Exception: Traceback (most recent call last):
File “/opt/zato/2.0.5/zato-server/src/zato/server/service/init.py”, line 401, in update_handle
self._invoke(service, channel)
File “/opt/zato/2.0.5/zato-server/src/zato/server/service/init.py”, line 344, in invoke
service.handle()
File “/opt/zato/2.0.5/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.5/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)
KeyError: u’testing.dummy-receive’

]

On 22/06/2015 13:26, Brian Candler wrote:

As a workaround I’ve just re-copied them to server1/pickup-dir (which
has hot-deployed them to both servers), and now it’s fine, but I
wondered what is the “official” way to ensure your servers are in sync
when adding or re-adding a server?
I also found some certificates (which I’d uploaded when only server1 was
active) were missing. I had to copy them by hand:

cp -p server1/config/repo/tls/ca-certs/* server2/config/repo/tls/ca-certs/

On 22/06/15 14:26, Brian Candler wrote:

As a workaround I’ve just re-copied them to server1/pickup-dir (which
has hot-deployed them to both servers), and now it’s fine, but I
wondered what is the “official” way to ensure your servers are in sync
when adding or re-adding a server?

Right now, yes.

The fix that handles it automatically is in this commit and will be
published in the next patch release.

https://github.com/zatosource/zato/commit/430e8eff0f3756f0539d151433c5e9ff48a01e57