Tryton - Issues



Title V 5.4.2 Desktop client connexion problem through apache WSGI, but works fine with Werkzeug
Priority bug Status invalid
Superseder Nosy List ced, jmarchini
Type crash Components
Assigned To Keywords

Created on 2020-01-06.15:26:04 by jmarchini, last changed by ced.

msg55409 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-02-16.18:50:31
The bugtracker is not for support.
If you are looking for support, you can try or
msg54742 (view) Author: [hidden] (jmarchini) Date: 2020-01-06.15:26:03
Hi there,
I can't connect the desktop client through apache mod wsgi, everything works fine with werkseug. The client prompts for password in endless loop.

tryton version server and client : 5.4.2, downloaded via git on the server / client and server both on ubuntu 18.04

extract from tryton log file : 

Mon Jan 06 14:01:40 2020] succeeded for 'admin' from '' on database 'tryton_one_db'
Mon Jan 06 14:01:40 2020] DEBUG:trytond.backend.postgresql.database:b'SELECT COUNT(\'*\') FROM "res_user_login_attempt" AS "a" WHERE (("a"."ip_network" = \'\') AND ("a"."create_date" >= \'2020-01-06T13:56:40.511773\'::timestamp))'
Mon Jan 06 14:01:40 2020] DEBUG:trytond.backend.postgresql.database:b'SELECT COUNT(\'*\') FROM "res_user_login_attempt" AS "a" WHERE (("a"."login" = \'admin\') AND ("a"."create_date" >= \'2020-01-06T13:56:40.513706\'::timestamp))'

desktop client side : 

ERROR:tryton.bus:An exception occured while connecting to the bus.Sleeping for 1 seconds
Traceback (most recent call last):
  File "/home/jerome/Workspace_sources/tryton-5.4.2/tryton/", line 61, in _listen
    response = urlopen(request, timeout=bus_timeout)
  File "/usr/lib/python3.6/urllib/", line 223, in urlopen
    return, data, timeout)
  File "/usr/lib/python3.6/urllib/", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: UNAUTHORIZED

apache configuration file :

<VirtualHost *:80>
   ServerName xxxxxx

   RewriteEngine On
   RewriteCond %{HTTPS} off
   RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]

<IfModule mod_ssl.c>
   <VirtualHost *:443>

     ServerName xxxx

     SetEnvIFNoCase User-Agent "Monit" dontlog
     CustomLog /mnt/vdb/log/apache2/tryton_one/access.log combined env=!dontlog
     ErrorLog /mnt/vdb/log/apache2/tryton_one/error.log

     SSLEngine on
     SSLCertificateFile /etc/letsencrypt/live/xxx/fullchain.pem
     SSLCertificateKeyFile /etc/letsencrypt/live/xxx/privkey.pem

     WSGIProcessGroup tryton_one
     WSGIDaemonProcess tryton_one user=tryton_one_user group=tryton_one_user python-home=/mnt/vdb/jail/tryton_one_user/home/tryton_one_user/tryton_one/venv display-name=%{GROUP}
     WSGIScriptAlias / /mnt/vdb/jail/tryton_one_user/home/tryton_one_user/tryton_one/trytond.wsgi
     WSGICallableObject application
     WSGIScriptReloading On

     <Directory /mnt/vdb/jail/tryton_one_user/home/tryton_one_user/tryton_one/>
       AllowOverride All
       Require all granted

     # Alias /static /mnt/vdb/jail/tryton_one_user/home/tryton_one_user/tryton_one/static
	 # <Directory /mnt/vdb/jail/tryton_one_user/home/tryton_one_user/tryton_one/static/>
     #  AllowOverride All
     #  Require all granted
	 # </Directory>


trytond.wsgi file : 

import os
os.environ['TRYTOND_CONFIG'] = '/mnt/vdb/jail/tryton_one_user/home/tryton_one_user/tryton_one/trytond.conf'
os.environ['TRYTOND_LOGGING_CONFIG'] =  '/mnt/vdb/jail/tryton_one_user/home/tryton_one_user/tryton_one/trytond.log.conf'
# os.environ[TRYTOND_COROUTINE: Use coroutine for concurrency.
# os.environ[TRYTOND_DATABASE_NAMES: A list of database names in CSV format, using python default

activate_this = '/mnt/vdb/jail/tryton_one_user/home/tryton_one_user/tryton_one/venv/bin/'
with open(activate_this) as f:
        code = compile(, activate_this, 'exec')
        exec(code, dict(__file__=activate_this))

from trytond.application import app as application

if __name__ == "__main__":

trytond.conf : 

listen =

uri = postgresql://tryton_one_usr:Qv-AZ%21E%2Bs89b4@localhost:5432/

path = /mnt/vdb/jail/tryton_one_user/home/tryton_one_user/tryton_one/data

thanks for support  !
Date User Action Args
2020-02-16 18:50:31cedsetstatus: unread -> invalid
nosy: + ced
messages: + msg55409
2020-01-06 15:26:04jmarchinicreate

Showing 10 items. Show all history (warning: this could be VERY long)