Tryton - Issues

 

Issue8970

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
Reviews

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

Messages
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 https://www.tryton.org/forum#discuss or https://www.tryton.org/service-providers
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] INFO:trytond.security:login succeeded for 'admin' from '192.168.0.254' 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" = \'192.168.0.254/32\') 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/bus.py", line 61, in _listen
    response = urlopen(request, timeout=bus_timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", 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]
</VirtualHost>

<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
     </Directory>

     # 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>

   </VirtualHost>
</IfModule>

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_LOGGING_LEVEL'] = 'DEBUG'
# 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/activate_this.py'
with open(activate_this) as f:
        code = compile(f.read(), activate_this, 'exec')
        exec(code, dict(__file__=activate_this))

from trytond.application import app as application

if __name__ == "__main__":
    app.run()

trytond.conf : 

[web]
listen = 0.0.0.0:8000

[database]
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  !
History
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)