"Database 'null' doesn't exist" error message on logout

Dear everyone,

when logging out of our tryton instance (version 7.6.5 using SAO), we often get the following error message:

'Transaction' object has no attribute '_datamanagers'

Traceback (most recent call last):
  File "\Lib\site-packages\trytond\transaction.py", line 192, in start
    database = backend.Database(database_name).connect()
               ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "\Lib\site-packages\trytond\backend\postgresql\database.py", line 237, in __new__
    inst._connpool = ThreadedConnectionPool(
                     ~~~~~~~~~~~~~~~~~~~~~~^
        _minconn, _maxconn, **cls._connection_params(name),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        cursor_factory=LoggingCursor)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\Lib\site-packages\psycopg2\pool.py", line 161, in __init__
    AbstractConnectionPool.__init__(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self, minconn, maxconn, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\Lib\site-packages\psycopg2\pool.py", line 59, in __init__
    self._connect()
    ~~~~~~~~~~~~~^^
  File "\Lib\site-packages\psycopg2\pool.py", line 63, in _connect
    conn = psycopg2.connect(*self._args, **self._kwargs)
  File "\Lib\site-packages\psycopg2\__init__.py", line 135, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "127.0.0.1", port 5432 failed: FATAL:  Datenbank »null« existiert nicht


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "\Lib\site-packages\trytond\wsgi.py", line 97, in dispatch_request
    return endpoint(request, **request.view_args)
  File "\Lib\site-packages\trytond\protocols\dispatcher.py", line 44, in rpc
    return methods.get(request.rpc_method, _dispatch)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        request, database_name, *request.rpc_params)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\Lib\site-packages\trytond\protocols\dispatcher.py", line 54, in login
    session = security.login(
        database_name, user, parameters, context=context)
  File "\Lib\site-packages\trytond\security.py", line 43, in login
    with Transaction().start(dbname, 0, context=context) as transaction:
         ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\Lib\site-packages\trytond\transaction.py", line 236, in start
    self.stop(False)
    ~~~~~~~~~^^^^^^^
  File "\Lib\site-packages\trytond\transaction.py", line 255, in stop
    self.rollback()
    ~~~~~~~~~~~~~^^
  File "\Lib\site-packages\trytond\transaction.py", line 393, in rollback
    for datamanager in self._datamanagers:
                       ^^^^^^^^^^^^^^^^^^
AttributeError: 'Transaction' object has no attribute '_datamanagers'

And I think the most interesting line is:

FATAL:  Datenbank »null« existiert nicht

which means

FATAL:  Database »null« doesn't exist

Our config file contains the following entries:

[database]
uri = postgresql://username:password@127.0.0.1:5432
path = C:\Users\Tryton\tryton
language = de

[web]
listen = 169.254.204.25:8000
root = C:\Users\Tryton\tryton\sao

[webdav]
listen = 0.0.0.0:8080
ssl_webdav = False

[session]
max_age = 86400
timeout = 300

[password]
length = 8
forbidden=C:\Users\Tryton\tryton\Scripts\passwörter.txt

Do you have any idea why this error message appears and how I can get rid of it?

Many thanks in advance!

Edit: corrected the tryton version

What are the http requests?

The corresponding http request should be the following:

169.254.191.5 - - [25/Feb/2026 12:57:11] "POST /null/ HTTP/1.1" 200 -

I also realised that every occurence is accompanied by the following error:

[25.02.2026 12:57:11] ERROR:trytond.security:session failed for '8' from '169.254.191.5' on database '<database name>'

I should mention that our tryton instance is running in an isolated network and thus doesn’t use https or an SSL certificate.

I suspect that your reverse proxy would rewrite wrongly the logout request.

Thank you for our answer. I am using werkzeug 3.13 without further notifications.

However, I was made aware of that this only happens on two clients that are logged in for long periods. I wonder if this is connected to the max_age oder timeout option in the config settings.

So you mean that you are running without any SSL layout and clients are directly connecting to the server without any encryption security?

Exactly. The network is isolated, not a single machine is able to connect to the internet (or any other network).

Well it still means that users can sniff other user passwords.

You need to find which code is sending this request and why it is thinking that null is a database name.

Well it still means that users can sniff other user passwords.

I see your concerns and will find a solution.

You need to find which code is sending this request and why it is thinking that null is a database name.

Ok, thanks for the hint.