Config a domain for tryton

(Josías) #1


I have a trytond instance running with sao through uwsgi and apache with the infrastructure design like this:

- apache server as local proxy based on hostname 
- uwsgi server to manage trytond instance
- virtual-env for trytond and modules
- postgresql user with access to the db

When I connect to sao with any browser the custom.domain works fine, but when I tried to connect with tryton this doesn’t work. I think the issue is with apache but I’m not sure how to configure it correctly. BTW, I read [1] for config settings but I’m not sure if I need to add something to it.

The apache proxy config is the follow:

<VirtualHost *:80>
ProxyPreserveHost On
ServerName custom.domain
ServerAlias custom.domain
ProxyPass “/” “”
ProxyPassReverse “/” “”
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/custom.log

Any suggest will be appreciated!


(Cédric Krier) #2

Is you server return 3xx redirection status because the Tryton client does not follow them normally.
Also you should provide the log of the client when trying to connect (use --verbose option).

(Josías) #3

Yes, my server provide 302 redirect.

The only line with --verbose option when tryton tries to connect is
28115 139960185530112 [2018-08-16 21:44:18,362] INFO werkzeug ::ffff: - - [16/Aug/2018 21:44:18] “GET / HTTP/1.1” 302 -

When the connection is from sao works fine.

I only use wget and receive this:
Resolving (… 74.76.x.x
Connecting… connected.

What I need to add for tryton works with custom domain (it works with IP and ports).

(Cédric Krier) #4

Desktop client does not perform GET queries only POST.
Also this is the log of the server, you should look for the log of the client.

(Josías) #5

Sorry for the delay,

I was working on windows and have no idea how to see the log, I need to install it on a debian machine.

So, the log for the client is:
INFO:tryton.common.common:URL de comprobación:
INFO:tryton.common.common:URL de comprobación:
INFO:tryton.rpc:common.server.version(None, None)
INFO:tryton.rpc:common.server.version(None, None)
ERROR:tryton.rpc:timed out

I tried to configure it with nginx but is the same result, but if I use custom.domain:8000 with specific port it works.

I would help how to resolve it.

Thanks in advance.

(Josías) #6

In tryton client windows now I have the follow traceback:

Traceback (most recent call last):
File “tryton/gui/window/”, line 306, in refresh_databases_end
File “tryton/gui/window/”, line 276, in test_server_version
File “tryton/”, line 58, in server_version
File “C:/msys32/mingw32/lib/python2.7/”, line 1243, in call
File “tryton/”, line 285, in __request
File “C:/msys32/mingw32/lib/python2.7/”, line 1283, in request
File “C:/msys32/mingw32/lib/python2.7/”, line 1313, in single_request
File “C:/msys32/mingw32/lib/python2.7/”, line 1121, in getresponse
File “C:/msys32/mingw32/lib/python2.7/”, line 438, in begin
File “C:/msys32/mingw32/lib/python2.7/”, line 402, in _read_status
BadStatusLine: ‘’

(Cédric Krier) #7

If you do not publish the configuration, I do not see how we could help.

Now it looks like nothing is listening.

(Josías) #8

This is the config for apache and for uwsgi, maybe I need to add some config.

<VirtualHost *:80>
ProxyPreserveHost On
ServerName mydomain
ProxyPass /
ProxyPassReverse /
ErrorLog ${APACHE_LOG_DIR}/tryton.log
CustomLog ${APACHE_LOG_DIR}/trytonlog.log combined

http-socket =
virtualenv = /opt/cr
env = TRYTOND_CONFIG=/opt/cr/tr.conf
check-static = /opt/cr/sao
uid = www-data
gid = www-data
thunder-lock = true
log-reopen = true