[12.0] .../xmlrpc/db: 404 NOT FOUND
See original GitHub issueFull error in the popup:
Error ! No such database exists!
Error details:
<ProtocolError for localhost:8069/xmlrpc/db: 404 NOT FOUND>
How to reproduce:
- Odoo version 12.0
- Multiple DBs on one Odoo instance (/web/database/selector must give multiple options)
- Back-ups configuration: Host: localhost (default) Database: [Current DB] (default) Port: 8069 (default)
The problem is caused by the multiple databases. At first I was very confused as to why my browser seems to be able to open the /xmlrpc/db
uri and server gives a xml response (even if it is a faulty one), but trying to use curl
ends up in an actual 404. Then I figured out that it remembers the session_id
from normal use of Odoo and so sends that to the server as well. Removing the cookie results in server giving 404 to the browser as well.
To check my diagnosis further, I tried running Odoo with dbfilter
set to only find one of the databases and indeed this helps with opening /xmlrpc/db
from anywhere, as it can automatically figure out the database and assign a new session.
It seems that a lot has changed how Odoo handles RPC requests in V12. From what I’ve gathered looking at V9-12 code, it looks like in V12 (maybe V11 too) Odoo starts handling RPC (HTTP) requests more like any other module would - with proper controllers and @route
directives in them.
So my guess is that this includes session checking somewhere deeper in the code. Maybe this is an actual issue to be reported to Odoo repositories, as the /xmlrpc/db
-> list
method kind of becomes redundant.
Hopefully I provided enough information about the issue to save as much of your time as possible. 😃
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:28 (10 by maintainers)
Good news everybody! We have a delivery to… I mean, I figured it out! 😃
The problem was incorrect use of
--load=...
launch argument. Because I useletsencrypt
module, it has to be loaded server-wide, which is done with this argument.My setup used:
--load=web,letsencrypt
Module
web
here is specified, because it is a default of this argument and we still want to load it. On Odoo 10.0 the default wasweb,web_kanban
. On Odoo 11.0 it was changed toweb
. On Odoo 12.0 it is nowbase,web
As we can see, Odoo 12.0 now has
base
loaded this way. It means, that modulebase
used to be loaded server-wide (on all databases as a sort of a “singleton”) automatically. Therefore database independent HTTP requests like/xmlrpc/db
used to work no matter if database was selected. On my setupbase
was loaded on each database separately and that’s why I wouldn’t get a response from the server on/xmlrpc/db
without first selecting a database. @gr22, tagging you here, as you probably have something similar done with your server 😉TL;DR: If you are using
--load=...
launch argument with Odoo 12.0, you have to make sure you havebase
module loaded with it.Awesome, good luck guys!