Authentication issue in Outgoing Odoo connection - Zato3


#1

I am using the stable version of the Zato 3 released and found an issue with the Outgoing Odoo connection authentication.

I have created a new Outgoing Odoo connection and set the password using the Change Password wizard. when I verified the odoo connection entry in the database table the password stored in the database entry is of encrypted format which is good.

But what I have observed is the same password value which is stored in the database is being passed to the Odoo connection string. And the Odoo is failing to authenticate as this doesn’t match the actual password in Odoo.

Also, I am unable to load the Outgoing Odoo connections page once an entry is created. It is showing some error page.

Please note that if I update the password value in the database table entry to be the actual password then the connection is being acquired successfully.

Can someone help me in fixing this issue?


#2

Can you please post the exact error message that you receive when listing outgoing Odoo connections?


#3

I have attached the screenshot with the detailed description.


#4

Can you tell me what the output of the command below is? Please copy-paste the full result as clear text.

$ cd /opt/zato/current
$ git log -1

#5

image

Please note that the initial form without any connections will not give any error. But once if a connection entry is created that’s when we will see the error from the next reload.


#6

Hi Dariusz,

Do you have any update on the password encryption issue.


#7

Please install latest updates and check if it resolves the situation https://zato.io/docs/3.0/admin/guide/install/update.html

Also, please send in information as a clear-text copy/paste rather than screenshots, this makes it easier to use.


#8

Hi Dariusz,

I have updated the latest sources using the page that you have provided. But with the latest sources, I am not even able to start my zato server. :frowning:

Traceback (most recent call last):
File “/opt/zato/3.0/code/local/lib/python2.7/site-packages/gunicorn/arbiter.py”, line 495, in spawn_worker
self.cfg.post_fork(self, worker)
File “/opt/zato/3.0/code/zato-server/src/zato/server/base/parallel/init.py”, line 784, in post_fork
ParallelServer.start_server(worker.app.zato_wsgi_app, arbiter.zato_deployment_key)
File “/opt/zato/3.0/code/zato-server/src/zato/server/base/parallel/init.py”, line 431, in start_server
is_first, locally_deployed = self._after_init_common(server)
File “/opt/zato/3.0/code/zato-server/src/zato/server/base/parallel/init.py”, line 345, in _after_init_common
is_first, locally_deployed = self.maybe_on_first_worker(server, self.kvdb.conn)
File “/opt/zato/3.0/code/zato-server/src/zato/server/base/parallel/init.py”, line 277, in maybe_on_first_worker
locally_deployed = import_initial_services_jobs(is_first)
File “/opt/zato/3.0/code/zato-server/src/zato/server/base/parallel/init.py”, line 243, in import_initial_services_jobs
self.internal_service_modules, self.base_dir, self.sync_internal, is_first))
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/store.py”, line 270, in import_internal_services
items = bunchify(dill_load(f))
File “/opt/zato/3.0/code/local/lib/python2.7/site-packages/dill/dill.py”, line 250, in load
obj = pik.load()
File “/usr/lib/python2.7/pickle.py”, line 864, in load
dispatchkey
File “/usr/lib/python2.7/pickle.py”, line 1096, in load_global
klass = self.find_class(module, name)
File “/opt/zato/3.0/code/local/lib/python2.7/site-packages/dill/dill.py”, line 406, in find_class
return StockUnpickler.find_class(self, module, name)
File “/usr/lib/python2.7/pickle.py”, line 1132, in find_class
klass = getattr(mod, name)
AttributeError: ‘module’ object has no attribute 'AfterWSXReconnect’
2018-08-21 06:03:52,043 - ^[[1;37mINFO^[[0m - 2474:MainThread - gunicorn.main:176 - Worker exiting (pid: 2474)
2018-08-21 06:03:52,046 - ^[[1;31mERROR^[[0m - 2474:DummyThread-2 - springpython.context.ApplicationContext:109 - Could not destroy object ‘server’, exception 'Traceback (most recent call last):
File “/opt/zato/3.0/code/local/lib/python2.7/site-packages/springpython/context/init.py”, line 106, in shutdown_hook
destroy_method()
File “/opt/zato/3.0/code/zato-server/src/zato/server/base/parallel/init.py”, line 832, in destroy
self.invoke(‘zato.channel.web-socket.client.delete-by-server’)
File “/opt/zato/3.0/code/zato-server/src/zato/server/base/parallel/init.py”, line 699, in invoke
*args, **kwargs)
File “/opt/zato/3.0/code/zato-server/src/zato/server/base/worker/init.py”, line 1305, in invoke
}, channel, None, needs_response=True, serialize=serialize)
File “/opt/zato/3.0/code/zato-server/src/zato/server/base/worker/init.py”, line 1366, in on_message_invoke_service
service, is_active = self.server.service_store.new_instance_by_name(msg[‘service’])
File “/opt/zato/3.0/code/zato-server/src/zato/server/service/store.py”, line 211, in new_instance_by_name
impl_name = self.name_to_impl_name[name]
KeyError: u’zato.channel.web-socket.client.delete-by-server’

Am I missing anything here. :neutral_face::neutral_face:


#9

What was the exact command that you used to start the server?


#10

Just used the default Shell script.
./zato-qs-start.sh


#11

You need to run all the commands as they are given in the documentation https://zato.io/docs/3.0/admin/guide/install/update.html


#12

Hi,

I have followed the below instructions as I am using Zato on the Ubuntu machine:

$ sudo su - zato
zato$ cd /opt/zato/current
zato$ git pull
zato$ zato start /path/to/server --sync-internal

And then I tried to stopped Zato and tried to start with the default script ./zato-qs-start.sh. And I still see the same error.
Does this mean that I cannot use the Shell script anymore to start zato and always use the Zato start command for each server individually?


#13

Hey Kiran-

“AttributeError: ‘module’ object has no attribute 'AfterWSXReconnect’”

GH #755 - Renamed AfterWSXReconnect to ResumeWSXSubscription and made…

Sounds like your codebase is not right.

So, I recently updated the zato source (followed the directions)…
and when I did a git pull… there were some local file additions in the code base. Which prevented git from pulling the changes.
Did you get a similar message?


#14

@kiran_parepalli - I could not reproduce the case of web-admin’s not being able to list Odoo connections and likewise, I did not have any issues with starting servers after an update.

However, I did reproduce the original situation with Odoo authentication. It applied only to new connections, before a server was restarted. I have changed it so that a restart is not required, i.e. it works as expected now. You can pull the latest updates.

As for using –sync-internal - this is needed only the first time after you update your Zato codebase from GitHub to synchronize server internal caches, afterwards, you should skip it.

The caches allow servers to start up to several times faster so using this flag continually, when it is not needed, will be detrimental to your overall experience. Use it only after pulling latest updates.


#15

No, I don’t have any changes in my local files. Even though I have seen the above error message earlier.


#16

Hi Dariusz,

Thanks for all your help. With the latest sources I no more see the issues with the Outgoing Odoo connections.