question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[12.0] .../xmlrpc/db: 404 NOT FOUND

See original GitHub issue

Full 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:28 (10 by maintainers)

github_iconTop GitHub Comments

8reactions
gaikazcommented, Apr 3, 2019

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 use letsencrypt 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 was web,web_kanban. On Odoo 11.0 it was changed to web. On Odoo 12.0 it is now base,web

As we can see, Odoo 12.0 now has base loaded this way. It means, that module base 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 setup base 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 have base module loaded with it.

4reactions
Yenthe666commented, Apr 4, 2019

Awesome, good luck guys!

Read more comments on GitHub >

github_iconTop Results From Across the Web

xmlrpc returns "404 not found" error - Odoo
openerp: OpenERP server is running, waiting for connections... 2014-08-03 08:12:25,068 26324 INFO ? openerp.service.wsgi_server: HTTP service ( ...
Read more >
Why am I getting a 404 when accessing Odoo over XML-RPC?
This seems like a networking issue. To troubleshoot the issue you should really have access to ideally your firewall, webserver logs (in ...
Read more >
52958 (The XML-RPC endpoint returns 404 rather than 200)
The [XML-RPC specs](​http://xmlrpc.com/spec.md) say: Unless there's a lower-level error, always return 200, OK.
Read more >
404 not found when I try using a Python script to use XML-RPC
The code hasn't changed, but I get this error now: xmlrpc.client.ProtocolError: <ProtocolError for mysite/xmlrpc.php: 404 Not Found>.
Read more >
Topic: xmlrpc.php FILE NOT FOUND | WordPress.com Forums
kckckctest.wordpress.com/xmlrpc.php comes back with 404 error File Not Found. ... Jan 16, 2010 3:12 pm #439078. dreamsburnred.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found