Skip to Content
Menu
This question has been flagged
2 Replies
3267 Views

I'm trying to create an outgoing Odoo connection with Zato:

https://zato.io/docs/web-admin/outgoing/odoo.html

but I'm repeatedly getting "AuthenticationError: Authentication failure".

Whole procedure:

Ubuntu 14.04 64-bit Vagrant box

Zato 2.0.7

Odoo 9.0c.20160209

1. in the box with PostgreSQL and Zato already installed and set up, I install Odoo

2. I create 'test_odoo' database with owner 'odoo' and set password to the db to 'test'

3. I change settings in /etc/odoo/openerp-server.conf  to:

db_host = localhost

db_port = 5432

db_user = odoo

db_password = test

4. in Zato web-admin I create an outgoing Odoo connection (see the link to Zato docs above) passing the following parameters:

Host: localhost

Port: 8069

User: odoo

Database: test_odoo

Full traceback:

"""

2016-02-10 08:08:47,504 - ERROR - 5063:MainThread - zato.admin.web.views:470 - Could not ping the Odoo connection, e:[Traceback (most recent call last):

File "/home/vagrant/zato/code/zato-web-admin/src/zato/admin/web/views/__init__.py", line 463, in id_only_service

result = req.zato.client.invoke(service, {'id': id})

File "/home/vagrant/zato/code/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: K072CD3XDCM3AT3NXM0GZT9W01PS

Details: Traceback (most recent call last):

File "/home/vagrant/zato/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 198, in dispatch

payload, worker_store, self.simple_io_config, post_data)

File "/home/vagrant/zato/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 350, in handle

params_priority=channel_item.params_pri)

File "/home/vagrant/zato/code/zato-server/src/zato/server/service/__init__.py", line 401, in update_handle

self._invoke(service, channel)

File "/home/vagrant/zato/code/zato-server/src/zato/server/service/__init__.py", line 344, in _invoke

service.handle()

File "/home/vagrant/zato/code/zato-server/src/zato/server/service/internal/service.py", line 271, in handle

response = func(id_, payload, channel, data_format, transport, serialize=True)

File "/home/vagrant/zato/code/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 "/home/vagrant/zato/code/zato-server/src/zato/server/service/__init__.py", line 483, in invoke_by_impl_name

return self.update_handle(*invoke_args, **kwargs)

File "/home/vagrant/zato/code/zato-server/src/zato/server/service/__init__.py", line 428, in update_handle

raise Exception(exc_formatted)

Exception: Traceback (most recent call last):

File "/home/vagrant/zato/code/zato-server/src/zato/server/service/__init__.py", line 401, in update_handle

self._invoke(service, channel)

File "/home/vagrant/zato/code/zato-server/src/zato/server/service/__init__.py", line 344, in _invoke

service.handle()

File "/home/vagrant/zato/code/zato-server/src/zato/server/service/internal/outgoing/odoo.py", line 84, in handle

ping_odoo(client)

File "/home/vagrant/zato/code/zato-common/src/zato/common/util.py", line 1002, in ping_odoo

ids = user_model.search([('login', '=', conn.login)])

File "/home/vagrant/zato/code/eggs/openerp_client_lib-1.1.2-py2.7.egg/openerplib/main.py", line 305, in proxy

self.connection.check_login(False)

File "/home/vagrant/zato/code/eggs/openerp_client_lib-1.1.2-py2.7.egg/openerplib/main.py", line 245, in check_login

raise AuthenticationError("Authentication failure")

AuthenticationError: Authentication failure

]

"""


Am I missing something?

Avatar
Discard

Hello @Axel Mendoza,

Thank you for your answer. Could you explain, please, what do you mean by creating the user odoo *in* test_odoo database?

You can set up multiple databases in Odoo. Therefore Axel means to login to your Odoo instance with the database test_odoo, there you create the user odoo.

Author

Yes, this is what I eventually did. I was trying to achieve results via CLI, but gave up and used Odoo GUI. Thank you, Ermin.

Best Answer

Hi @rafal

Zato will not use a db user to connect to Odoo, it uses an Odoo user to connect using xmlrpc. So you need to create the user odoo in your Odoo database test_odoo to be able to use it in Zato. Also you need to set the password for the user odoo in Zato before you create it.

That's all, you will be able to connect. 

Enjoy both of those great awesome software.

Avatar
Discard