Unable to init server: Could not connect: Connection refused -Tryton 6.0.0

Hi Team;

I want to use tryton desktop , am working on a Linux server(not localhost)
am already have the tryton running on the browser in development way after typing those 2 commands:

trytond-admin -vv -c trytond.conf -d data_tryton --all
nohup trytond -c trytond.conf --dev &

everything is going well , today I have decided to work with the Tryton desktop for the first time so I have go to my virtual environment then I have just typed

tryton
(because i have already as i say tryton running on development way.)

Here an error was displayed:

Unable to init server: Could not connect: Connection refused

(tryton:20569): Gtk-WARNING **: 09:21:08.145: Locale not supported by C library.
	Using the fallback 'C' locale.
Unable to init server: Could not connect: Connection refused

*When Itype tryton --version
—>the same error dislayed(Unable to init server: Could not connect: Connection refused Can’t create a GtkStyleContext without a display connection
Trace/breakpoint trap)

otherwise when type pip freeze: i found the version of tryton
tryton==6.0.0

.
How i could correctly call the Tryton desktop if am working on a server and how i can install it correctly ,

Thanks in advance.

On which port the server listens?

Tryton client connects by default to port 8000, but if you have setup SSL on the web, this means that you are running the server on port 443. Using server_name:443 on tryton client should fix the issue.

port 8000

Yeah I have setup the ssl

I did’nt get you clearly but let me tell you what i have did

I have entered to the my virtual environment then i have typed uname -n to know the name of the linux server

I have typed

serverName:443
---->the error was command not found

the tryton desktop client does not appear , the response was on the terminal when I type tryton on the virtual environment where tryton installed

Unable to init server: Could not connect: Connection refused

Then the problem is that you do not have X server on the machine you are running the tryton client.

SO what i should do! Is there another package i should install?

Can not tell you because I do not know what you did install and how are you running the tryton client.

I have installed tryton like i have did in my localhost :

sudo apt install python3-dev libgirepository1.0-dev libcairo2-dev python-gi python-gi-cairo gir1.2-gtksource-3.0

pip install trytond==6.0.0

pip install pygobject==6.0.0
pip install tryton==6.0.0
then I have created a database , I have go to my virtual environment then I have typed
tryton
image

and the destop tryton appear as you see in my localhost

, I have did the same tsteps in the linux server but when I have typed

tryton

the response was on the terminal:

Unable to init server: Could not connect: Connection refused

(tryton:20569): Gtk-WARNING **: 09:21:08.145: Locale not supported by C library.
	Using the fallback 'C' locale.
Unable to init server: Could not connect: Connection refused

Are you trying to run the Tryton Desktop client on the server?

Are you sitting in front of a monitor that is connected to the server, or are you connecting to the server via ssh?

As you have installed the Desktop client on your localhost you should be able to use that Destop client to connect to the Tryton server running on your linux server.

1 Like

Yeah I have succeeded to do that , I thought that i can do that from the server for the first time , but now I tried to reach it from my localhost.
Thanks Mr. @pokoli
Thanks M. @dave