Can’t establish a connection to the server after installing tryton6 on a linux server

Hi tryton team ; I was about doing the same steps i did on my localhost to install tryton version 6 on a Linux server(debian) but i did’nt succeed, i do no why, the port i have tried with is 8080 because 8000 is already in use with another version of tryton. i have typed the command :

netstat -nat | grep 8080.
to see if it listenning, —> the result was: tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN

and those are the most important informations that i put in my trytond.conf

[web]
listen = 0.0.0.0:8080
hostname = tryton.hostname.com
root = lib_www/tryton-sao/
[database]
uri = postgresql:///
path = /home/venv/tryton6/var/lib/tryton

*About the configuration of sao , i did :

sudo npm install --production                                                                                                  sudo npm install -g bower 
sudo bower install --allow-root 
bower install 
sudo npm install -g grunt 
sudo npm install grunt-po2json 
sudo grunt 
sudo grunt dev

*when i try to see the site from the browser,the response was:

Unable to connect

Firefox can’t establish a connection to the server at tryton.hostname.com:8080.

**Thanks in advance**

I can think of two things:

  1. DNS not working correctly. What does ping tryton.hostname.com say? Is it the IP-address from your server?
  2. Firewall issue, do you have port 8080 open?

Thank you M.edbo for response , i just saw your response now ,
1/the hostname of the server is : hostname.com

tryton.hostname.com : it’s the hostname of the tryton version 5.0

and in trytond.conf of the version 6.0 i just put the same hostname of the version tryton 5.0.

//Am i wrong here?//

-About the command ping: ping tryton.hostname.com give me something like that
64 bytes from ping tryton.hostname.com: icmp_seq=21 ttl=64 time=0.423 ms
→ it works normally

**2/**now am working with 8081 in a linux server(debian) and i have opened it using router but still give me same error

That’s also what I do.

Does your Linux server has a firewall active? If so, is port 8081 open in that firewall? I don’t know your network configuration, but when you haven’t done something for tryton 5.0 it is also not needed for tryton 6.0

But can you connect to tryton version 6 with the ‘normal’ client instead of sao?

the port is opened using the router, should i active the firewall to open it ?

About that i have update the database by :trytond-admin -vv -c trytond.conf -d data_tryton6 --all
then nohup bin/trytond -c trytond.conf --dev &

and finally when i type tryton in the terminal it gives me :

 Unable to init server: Could not connect: Connection refused
Unable to init server: Connection failed : Connection refused

(tryton:43563): Gtk-ERROR **: 15:43:44.553: Can't create a GtkStyleContext without a display connection

I’m confused :cry:
What if you stop your trytond server 5 and change the port of the trytond.conf from your 6 version to 8000. So basically copy the trytond.conf from your version 5 to your version 6 environment. Change the paths and then run trytond. Can you connect now?

Also don’t use the & at the end when you start trytond. I use trytond -c trytond.conf -d <database> --dev. Make sure you have your virtual environment activated before you execute that command.

Unfortunately i change the port 8081 to 8000 in version and i had killed the id of the processus server of 5.0 to don’t be run on same time but always tell me on the browser

Firefox can’t establish a connection to the server at tryton.hostname.com:8000.

so i guess the problem it’s not from the port ,!

Indeed, the problem lay somewhere else. Maybe start from scratch again with a new virtual environment, installing trytond etc.

If needed, take a look at this script (sorry it’s german, but the commands should be familiar and @herrdeh did a great job in providing this script) https://nextcloud.rollentausch.eu/index.php/s/8sFxWsjg5qdTEyQ which walks you through the different steps. This script is for Ubuntu but it will also work on Debian. In short:

  1. python3 -m venv --system-site-packages <env_name> and cd into it
  2. . bin/activate
  3. pip install --upgrade pip
  4. pip install pip install Genshi lxml passlib pycountry forex_python pkg-resources polib psycopg2-binary python-magic python-sql relatorio Werkzeug wrapt
  5. pip install trytond to install tryton
  6. pip install trytond-<module> to install the different modules
  7. trytond-admin -c <your.conf> -d <your_db> --all -vv init an empty or upgrade the database. I would recommend to create a new empty database.
  8. trytond -c <your.conf> -d <your_db> --dev run the server in development mode
  9. in another terminal start the desktop client and connect to the server
  10. install Sao if you can succesfully connect to the server with the desktop client

BTW, are you running the server and client on the same machine?

i will try do that now;

yeah but the client ,when i type ""tryton" on terminal give me this error:

 Unable to init server: Could not connect: Connection refused
Unable to init server: Connection failed : Connection refused

(tryton:43563): Gtk-ERROR **: 15:43:44.553: Can't create a GtkStyleContext without a display connection

Ok, that’s weird. What I normally do is downloading the most recent version of the client from https://downloads-cdn.tryton.org/6.0/ unpack is somewhere and run it. No installation, no virtual environment.
For example download a version and unpack it in /home/<you>/trytondev/ you will get a new folder inside it called tryton-<version>. To start the client:

./home/<you>/trytondev/tryton-<version>/bin/tryton

Of course you can make it a bit shorter but hopefully you get the idea. You eventually need to install some python packages with apt but that’s ok.