Setup web client with Debian 10

sudo cat  /etc/tryton/trytond.conf  

                                                                                                                                                                           
    # /etc/tryton/trytond.conf - Configuration file for Tryton Server                                                                                                                                                                
    # (trytond, trytond-admin, trytond-cron)                                                                                                                                                                                         
    #                                                                                                                                                                                                                                
    # This file contains the most common settings for trytond (Defaults                                                                                                                                                              
    # are commented).                                                                                                                                                                                                                
    # For more information install the tryton-server-doc package and read
    # /usr/share/doc/tryton-server-doc/html/index.html
    # and accordingly
    # /usr/share/doc/tryton-server-doc/html/topics/configuration.html

    [web]
    # Settings for the web interface

    # The IP/host and port number of the interface
    # (Internal default: localhost:8000)
    #
    # Listen on all interfaces (IPv4)
    #listen = 0.0.0.0:8000
    listen = 192.168.178.148:8000
    #
    # Listen on all interfaces (IPv4 and IPv6)
    #listen = [::]:8000

    # The hostname for this interface
    #hostname = 

    # The root path to retrieve data for GET requests
    # (i.e. namely the path to the web client)
    # (Internal default: /var/www/localhost/tryton)
    root = /usr/share/tryton-sao/www

    # The number of proxy servers in front of trytond.
    #num_proxies = 0

    [database]
    # Database related settings

    # The URI to connect to the SQL database (following RFC-3986)
    # uri = database://username:password@host:port/
    # (Internal default: sqlite:// (i.e. a local SQLite database))
    #
    # PostgreSQL via Unix domain sockets
    # (e.g. PostgreSQL database running on the same machine (localhost))
    #uri = postgresql://tryton:tryton@/
    #
    # PostgreSQL via TCP/IP
    # (e.g. connecting to a PostgreSQL database running on a remote machine or
    # by means of md5 authentication. Needs PostgreSQL to be configured to accept
    # those connections (pg_hba.conf).)
    #uri = postgresql://tryton:tryton@localhost:5432/

    # The path to the directory where the Tryton Server stores files.
    # The server must have write permissions to this directory.
    # (Internal default: /var/lib/trytond)
    path = /var/lib/tryton

    # Shall available databases be listed in the client?
    #list = True

    # The number of retries of the Tryton Server when there are errors 
    # in a request to the database
    #retry = 5

    # The primary language, that is used to store entries in translatable
    # fields in the database.
    #language = en

    [request]
    # The maximum size in bytes for unauthenticated requests (zero means no limit).
    #max_size = 2MB

    # The maximum size in bytes of an authenticated request (zero means no limit).
    #max_size_authenticated = 2GB

    [ssl]
    # SSL settings
    # Activation of SSL for all available protocols.
    # Uncomment the following settings for key and certificate.
    # SSL is activated by defining privatekey.

    # The path to the private key
    #privatekey = /etc/ssl/private/ssl-cert-snakeoil.key

    # The path to the certificate
    #certificate = /etc/ssl/certs/ssl-cert-snakeoil.pem

    [session]
    # Session settings

    # A comma separated list of login methods to use for user authentication.
    # By default, Tryton supports only the password method which compares the
    # password entered by the user against a stored hash.
    # Other modules may define other methods (please refer to their documentation).
    # The methods are tested following the order of the list.
    #authentications = password

    # The time (in seconds) until a session expires.
    #max_age = 2592000   # (30 days)

    # The time (in seconds) until an inactive session is considered invalid for
    # special internal tasks, thus requiring to re-confirm the session.
    #timeout = 300   # (5 minutes)

    # The maximal number of authentication attempts before the server answers
    # unconditionally 'Too Many Requests'.
    # The counting is done on all attempts over one period of timeout.
    #max_attempt = 5

    # The maximal number of authentication attempts from the same network before
    # the server answers unconditionally 'Too Many Requests'.
    # The counting is done on all attempts over a period of timeout.
    #max_attempt_ip_network = 300

    # The network prefix to apply on IPv4 addresses when counting authentication attempts.
    #ip_network_4 = 32

    # The network prefix to apply on IPv6 addresses when counting authentication attempts.
    #ip_network_6 = 56

    [password]
    # The minimal length required for user passwords.
    #length = 8

    # The path to a file containing one forbidden password per line.
    #forbidden = 

    # The ratio of non repeated characters for user passwords.
    #entropy = 0.75

    # The time (in seconds) until a reset password expires.
    #reset_timeout = 86400   # (24h)

    # The path to the INI file to load as CryptContext:
    # <https://passlib.readthedocs.io/en/stable/narr/context-tutorial.html#loading-saving-a-cryptcontext>
    # If no path is set, Tryton will use the schemes `bcrypt` or `pbkdf2_sha512`.
    #passlib = None

    [email]
    # Mail settings

    # The URI to connect to the SMTP server.
    # Available protocols are:
    # - smtp: simple SMTP
    # - smtp+tls: SMTP with STARTTLS
    # - smtps: SMTP with SSL
    #uri = smtp://localhost:25

    # The From address used by the Tryton Server to send emails.
    #from = tryton@localhost

    [attachment]
    # Defines how to store the attachments
    # A boolean value to store attachment in the FileStore.
    #filestore=True

    # The prefix to use with the FileStore.
    #store_prefix = None

    [bus]
    # Allow clients to subscribe to bus channels (Boolean).
    #allow_subscribe = False

    # The time (in seconds) to keep the connection to the client open
    # when using long polling for bus messages.
    #long_polling_timeout = 300

    # The time (in seconds) a message should be kept in the queue
    # before being discarded.
    #cache_timeout = 300

    # The timeout (in seconds) for the select call when listening
    # on a channel.
    #select_timeout = 5

    # Let the worker queue handle bus messages
    #queue = False

    # Define the class to use when queue is set to True
    #class = trytond.bus.LongPollingBus


    # Special Settings
    [cache]
    # Various cache size settings

    # The number of different models kept in the cache per transaction.
    #model = 200

    # The number of loaded records kept in the cache. It can also be changed
    # locally using the _record_cache_size key in Transaction.context.
    #record = 2000

    # The number of fields to load with eager Field.loading.
    #field = 100

    # The minimum number of seconds between two cleanings of the cache.
    #clean_timeout = 300

    [queue]
    # Activate asynchronous processing of the tasks. Otherwise they are performed at the end of the requests.
    #worker = False

    [table]
    # This section allows to override the default generated table names. The main purpose
    # is to bypass name length limitations of a database backend.
    # Examples:
    #account.invoice.line = acc_inv_line
    #account.invoice.tax = acc_inv_tax


    # Module settings
    #
    # Some modules are reading configuration parameters from this
    # configuration file. These settings only apply when those modules
    # are installed.
    #
    [account_fr_chorus]
    # The private key to communicate with the chorus service.
    #privatekey =

    # The certficate to communicate with the chorus service.
    #certificate =

    # Target URL of the Chorus service
    #url = https://chorus-pro.gouv.fr:5443

    [ldap_authentication]
    # The LDAP URL to connect to the server following RFC-2255.
    #uri = ldap://host:port/dn?attributes?scope?filter?extensions
    # A basic default URL could look like
    #uri = ldap://localhost:389/

    # The LDAP password used to bind if needed.
    #bind_pass = 

    # If the LDAP server is an Active Directory.
    #active_directory = False

    # The UID attribute for authentication.
    #uid = uid

    # If the user shall be created in the database in case it does not exist.
    #create_user = False

    [sms_authentication]
    # The fully qualified name of the method to send SMS. It must take three
    # arguments: text, to and from.
    #
    # - The sms method just sends a code via SMS to the user. This code can directly
    #   be used in the login dialog.
    # - The password_sms method sends a code only after the user entered a valid
    #   password (two-factor authentication).
    #
    # Both methods require that the user has a *mobile* phone number defined
    # otherwise he can not be authenticated with those methods.
    #
    # This method is required to send SMS.
    #function = 

    # The number from which the SMS are sent.
    #from =

    # The length of the generated code.
    #length = 6

    # The time to live for the generated codes in seconds.
    #ttl = 300

    # The name used in the SMS text.
    #name = Tryton

    [product]
    # The number of decimals with which the unit prices are stored
    # in the database. The default value is 4.
    # Warning: This setting can not be lowered once a database is created.
    #price_decimal = 4

Can i use this instruction?

So have you put sao in this directory?

Helle ced, i’m a noob. :frowning:

I don’t have the directory “/usr/share/tryton-sao/www”.

I need a step by step instruction.

Thank you.

Either you must your sao checkout there or you change the configuration to point to your checkout folder.

Hello, i didn’t know what you mean.

Did you know a good steb by step manual for Debian 10 with the default tryton-server package with templates? I want to use tryton with sao.

:frowning:

Greets

trytfan

Hello, should with tutorial work?

A post was split to a new topic: FORBIDDEN error with sao

step by step:

  1. Have you installed trytond? which you said version 5.0.4-2.
  2. Is it able to run with GTK client?
  3. Do you know where is your trytond.conf file located?
    if 3 above you are knowing and working, then below steps for sao.

prerequeste:

  1. nodejs 8 and above
  2. npm

Steps:

  1. mkdir ~/trytond
  2. cd trytond
  3. git clone --single-branch --branch 5.0 GitHub - tryton/sao: Mirror of Tryton web client - Sao
  4. cd sao
  5. npm install -g bower
  6. npm install -g po2json
  7. npm install grunt-po2json
  8. npm install
  9. grunt

After above steps done:
Please go to your trytond.conf

[web]
root = ~/trytond/sao
hostname = localhost
listen = 0.0.0.0:8000

root=~/trytond/sao → assume you run with same user else use the full path

then run your trytond server.

open your browser should be able to go sao by accessing with port :8000

1 Like

New start:

  • clean fresh Debian 10 install, only Debian default Repository

sudo apt install tryton-server tryton-client

tryton-client (5.0.5-1)

tryton-server (5.0.4-2)

My trytond.conf are located:

/etc/tryton/trytond.conf

bala 2. Is it able to run with GTK client?

No, because i don’t have create a postgresql database.

Should i use this tuturial to create my first database?

htt__://discuss.tryton.org/t/installing-tryton-d-5-2-on-ubuntu-18-04-3-with-postgres-11-for-newbys-by-newby/1809

#### create database     

sudo -u postgres psql     

CREATE DATABASE tryton_test WITH OWNER = postgres ENCODING = 'UTF8' LC_COLLATE = 'C' LC_CTYPE = 'C' TABLESPACE = pg_default CONNECTION LIMIT = -1 TEMPLATE template0;

#### create role   

CREATE ROLE tryton_test WITH LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT NOREPLICATION CONNECTION LIMIT -1 PASSWORD 'tryton_test';     

postgres=# \q

#### make trytond.config     

sudo mkdir /etc/tryton     

sudo nano /etc/tryton/trytond.conf
past: (sorry don’t remeber the source)

After postgres installed,

have you put the database url into /etc/tryton/trytond.conf?
below is the example setting in trytond.conf. Then try run the trytond

[database]
# Database related settings

# The URI to connect to the SQL database (following RFC-3986)
# uri = database://username:password@host:port/
# (Internal default: sqlite:// (i.e. a local SQLite database))
#
# PostgreSQL via Unix domain sockets
# (e.g. PostgreSQL database running on the same machine (localhost))
#uri = postgresql://tryton:tryton@/
#
#Default setting for a local postgres database

uri = postgresql://msjp:msjp@msjp_postgres_1:5432

Step 01
https://pastebin.com/U5PxAJd2
output, with color red:

>     `11  main    5432 down   postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log`

Step 02
https://pastebin.com/8thJZrsq

 postgres=# \list
                                   Liste der Datenbanken
    Name     | Eigentümer | Kodierung | Sortierfolge | Zeichentyp  |  Zugriffsprivilegien  
-------------+------------+-----------+--------------+-------------+-----------------------
 postgres    | postgres   | UTF8      | de_DE.UTF-8  | de_DE.UTF-8 | 
 template0   | postgres   | UTF8      | de_DE.UTF-8  | de_DE.UTF-8 | =c/postgres          +
             |            |           |              |             | postgres=CTc/postgres
 template1   | postgres   | UTF8      | de_DE.UTF-8  | de_DE.UTF-8 | =c/postgres          +
             |            |           |              |             | postgres=CTc/postgres
 tryton_test | postgres   | UTF8      | C            | C           | 
(4 Zeilen)

postgres=# \q

Step03
sudo cat /etc/tryton/trytond.conf #### no edit
https://pastebin.com/tirn0Upj
sudo cat /etc/tryton/trytond.conf #### edit
https://pastebin.com/8x3piAzi
My change, add line 50
uri = postgresql://tryton_test:tryton_test@localhost:5432/

sudo service tryton-server restart

Step04

    trytond - c /etc/tryton/trytond.conf
    usage: trytond [-h] [--version] [-c FILE [FILE ...]] [-v] [--dev]
                   [-d DATABASE [DATABASE ...]] [--logconf FILE] [--pidfile FILE]
    trytond: error: unrecognized arguments: - c /etc/tryton/trytond.conf

Tryton Client:

Did you initialize database?

trytond-admin -c /etc/tryton/trytond.conf --all -d databasename

And command to launch tryton server is:

trytond  -c /etc/tryton/trytond.conf

Installation help for Debian is in README.Debian. It is installed in /usr/share/doc/tryton-server.

Please try to follow it and I will glad to merge improvements that you provide.

Don’t put a space in the arguments: ‘- c’ → ‘-c’

I don’t have initialize my database, i will dot it:

trytfan@debian:~$ sudo trytond-admin -c /etc/tryton/trytond.conf --all -d tryton_test
[sudo] Passwort für trytfan:
"admin" email for "tryton_test":
"admin" password for "tryton_test":
"admin" password confirmation:
trytfan@debian:~$

My email: no email added
My password: tryton_test

trytond  -c /etc/tryton/trytond.conf
5980 139937915766592 [2020-02-05 07:52:49,870] ERROR trytond.config could not load /etc/tryton/trytond.conf
Traceback (most recent call last):
  File "/usr/bin/trytond", line 47, in <module>
    use_reloader=options.dev)
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 814, in run_simple
    inner()
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 774, in inner
    fd=fd)
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 660, in make_server
    passthrough_errors, ssl_context, fd=fd)
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 577, in __init__
    self.address_family), handler)
  File "/usr/lib/python3.7/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/usr/lib/python3.7/http/server.py", line 137, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/usr/lib/python3.7/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

Should i use this tutorial or repair, config my system?

New start xxx? Or repair?

Check in your processes if there’s no other trytond process launched… (ps -ef | grep trytond) and kill them. Then retry to launch your server.

trytfan@debian:~$ ps -ef | grep trytond
tryton    5589     1  0 08:20 ?        00:00:00 /usr/bin/python3 /usr/bin/trytond --config /etc/tryton/trytond.conf --logconf /etc/tryton/trytond_log.conf
trytfan       6336  6331  0 09:12 pts/1    00:00:00 grep trytond
trytfan@debian:~$

For me it looks fine.

trytfan@debian:~$ sudo service tryton-server stop
trytfan@debian:~$ trytond -c /etc/tryton/trytond.conf
1227 139893885613888 [2020-02-05 08:20:04,344] ERROR trytond.config could not load /etc/tryton/trytond.conf

but this :frowning:

What should i check?

sudo   cat /etc/tryton/trytond.conf >> trytonconf-20200205-9:30

trytonconf-20200205-9:30

`Making sure, PostgreSQL is running:’

sudo service postgresql* status
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2020-02-05 09:16:52 CET; 22min ago
  Process: 618 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 618 (code=exited, status=0/SUCCESS)

Feb 05 09:16:52 debian systemd[1]: Starting PostgreSQL RDBMS...
Feb 05 09:16:52 debian systemd[1]: Started PostgreSQL RDBMS.

● postgresql@11-main.service - PostgreSQL Cluster 11-main
   Loaded: loaded (/lib/systemd/system/postgresql@.service; enabled-runtime; vendor preset: enabled)
   Active: active (running) since Wed 2020-02-05 09:16:52 CET; 22min ago
  Process: 461 ExecStart=/usr/bin/pg_ctlcluster --skip-systemctl-redirect 11-main start (code=exited, status=0/SUCCESS)
 Main PID: 505 (postgres)
    Tasks: 7 (limit: 4689)
   Memory: 39.4M
   CGroup: /system.slice/system-postgresql.slice/postgresql@11-main.service
           ├─505 /usr/lib/postgresql/11/bin/postgres -D /var/lib/postgresql/11/main -c config_file=/etc/postgresql/11/main/postgresql.conf
           ├─507 postgres: 11/main: checkpointer   
           ├─508 postgres: 11/main: background writer   
           ├─509 postgres: 11/main: walwriter   
           ├─510 postgres: 11/main: autovacuum launcher   
lines 1-22

Tryton Server check:

sudo service tryton-server status
● tryton-server.service - Tryton Server WSGI App
   Loaded: loaded (/lib/systemd/system/tryton-server.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2020-02-05 09:19:59 CET; 22min ago
     Docs: man:trytond,file:/usr/share/doc/tryton-server,file:/usr/share/doc/tryton-server-doc,http:doc/tryton.org/
  Process: 1203 ExecStart=/usr/bin/trytond --config /etc/tryton/trytond.conf --logconf /etc/tryton/trytond_log.conf (code=killed, signal=TE
 Main PID: 1203 (code=killed, signal=TERM)

Feb 05 09:19:52 debian systemd[1]: Started Tryton Server WSGI App.
Feb 05 09:19:59 debian systemd[1]: Stopping Tryton Server WSGI App...
Feb 05 09:19:59 debian systemd[1]: tryton-server.service: Main process exited, code=killed, status=15/TERM
Feb 05 09:19:59 debian systemd[1]: tryton-server.service: Succeeded.
Feb 05 09:19:59 debian systemd[1]: Stopped Tryton Server WSGI App.

Tryton start again:

trytond  -c /etc/tryton/trytond.conf
1604 140185417029440 [2020-02-05 08:43:28,972] ERROR trytond.config could not load /etc/tryton/trytond.conf

small suggest:

sudo service tryton-server status
● tryton-server.service - Tryton Server WSGI App
   Loaded: loaded (/lib/systemd/system/tryton-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-02-05 09:48:53 CET; 3min 32s ago
     Docs: man:trytond,file:/usr/share/doc/tryton-server,file:/usr/share/doc/tryton-server-doc,http:doc/tryton.org/
 Main PID: 1640 (trytond)
    Tasks: 1 (limit: 4689)
   Memory: 32.0M
   CGroup: /system.slice/tryton-server.service
           └─1640 /usr/bin/python3 /usr/bin/trytond --config /etc/tryton/trytond.conf --logconf /etc/tryton/trytond_log.conf

Feb 05 09:48:53 debian systemd[1]: Started Tryton Server WSGI App.

Database: tryton_test
User name: ?

Password: ?

Ein get the tryton-client screen, but which login data must i use?

I use
Database: tryton_test
User name: tryton_test

but which password?

" tryton_test" doesn’t work, see a posting therefore.

How can ich check my password or reset the password?

username: admin
password: tryton_test

Thank you, nice

Host: localhost
Database: tryton_test
User name: admin
Password: tryton_test

Then you can start install sao
SAO installation