Neuinstallation / Update

120 views
Skip to first unread message

Hans Normann

unread,
May 13, 2016, 7:26:54 AM5/13/16
to tryton-de
Da ich alle Pakete meiner "aktuellen" Installation per dnf installiert habe, hat mir Fedora23 ziemlich alte Pakete untergejubelt (Version 2.6). Wenn man schon neu anfängt, dann sollte man mit relativ neuem Release starten.

Frage, muss ich alle Module einschließlich Datenbank deinstallieren / löschen und dann neu aufsetzen oder geht ein Update, dieses mal allerdings mit pip? Ich denke an Version 4.0.1

Neu aufsetzen ist auf einem dnf verwaltetem System ja nicht das Problem, mich interessiert aber auch das Verhalten von Tryton beim Update.

Wie sind die Erfahrungen?

Hans Normann

unread,
May 13, 2016, 1:21:28 PM5/13/16
to tryton-de
OK, allePakete per dnf entfernt und per pip neu installiert. Ergebnis: Nichts geht

Die Datei /etc/trytond.conf wurde nicht angelegt. OK, habe einach die alte Datei kopiert. trtond.services felt gänzlich. Habe mall eine Datei von SUSE genommen, aber es geht noch immer nicht.

bei der Installation wurde das Fehlen von YAML angemeckert. Da habe ich PyYAML per pip nachinstalliert. Nun kommen diesbezüglich keine Fehlermeldungen mehr. Die tryton Datenbank habe ich per creatdb angelegt, weil trytond-admin auch nicht so wollte wie die Programmierer das gedacht haben.

[root@localhost ~]# trytond --verbose -c /etc/trytond.conf --pidfile /tmp/trytond.pid -d postgres://tryton                                                                                                                                
2322 140158556198656 [2016-05-13 17:15:30,044] INFO trytond.config using /etc/trytond.conf as configuration file                                                                                                                           
2322 140158556198656 [2016-05-13 17:15:30,045] INFO trytond.pool init pool for "postgres://tryton"                                                                                                                                         
Traceback (most recent call last):                                                                                                                                                                                                         
  File "/usr/bin/trytond", line 29, in <module>                                                                                                                                                                                            
    Pool(name).init()                                                                                                                                                                                                                      
  File "/usr/lib/python2.7/site-packages/trytond/pool.py", line 155, in init                                                                                                                                                               
    lang=lang)                                                                                                                                                                                                                             
  File "/usr/lib/python2.7/site-packages/trytond/modules/__init__.py", line 428, in load_modules                                                                                                                                           
    with Transaction().start(database_name, 0):                                                                                                                                                                                            
  File "/usr/lib/python2.7/site-packages/trytond/transaction.py", line 87, in start                                                                                                                                                        
    database = Database(database_name).connect()                                                                                                                                                                                           
  File "/usr/lib/python2.7/site-packages/trytond/backend/sqlite/database.py", line 220, in connect                                                                                                                                         
    raise IOError('Database "%s" doesn\'t exist!' % db_filename)                                                                                                                                                                           
IOError: Database "postgres://tryton.sqlite" doesn't exist!  
                                                                                                                                                                              
                
Wer sagt, dass ich eine sqlite-Datenbank verwenden will? Da scheint das System die alte /etc/trytond.conf auch nicht mehr zu  verstehen.                       

Hans Normann

unread,
May 14, 2016, 6:26:46 AM5/14/16
to tryton-de
Oh je oh je, die Dokumentation könnte von MS .......

Noch vor dem Pfingstochsenessen noch einen Schritt weitergekommen. Der Service läuft und trytond-admin natürlich auch.

trytond-admin
benötigt zwingend eine Config-Datei! Ich habe die /etc/trytond.conf wie folgt erweitert.

[database]
uri
= postgresql://tryton:XXXXXXXX@localhost:5432/
path
= /var/lib/trytond



trytond.service
so ist der aktuelle Status:

[root@localhost trytond]# systemctl -l status trytond.service
trytond.service - Tryton server
   Loaded: loaded (/usr/lib/systemd/system/trytond.service; enabled; vendor preset: disabled)
   Active: active (running) since Sa 2016-05-14 11:09:20 CEST; 42min ago
 Main PID: 832 (trytond)
   CGroup: /system.slice/trytond.service
           └─832 /usr/bin/python /usr/bin/trytond --config /etc/trytond.conf --pidfile=/var/lib/trytond/trytond.pid

Mai 14 11:09:20 localhost.localdomain systemd[1]: Started Tryton server.
Mai 14 11:09:20 localhost.localdomain systemd[1]: Starting Tryton server...
Mai 14 11:21:13 localhost.localdomain trytond[832]: 832 139777563031296 [2016-05-14 09:21:13,989] ERROR werkzeug 127.0.0.1 - - [14/May/2016 09:21:13] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03s1\xfd\x8f\xfb')
Mai 14 11:30:45 localhost.localdomain trytond[832]: 832 139777563031296 [2016-05-14 09:30:45,835] ERROR werkzeug 127.0.0.1 - - [14/May/2016 09:30:45] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\xd8?^\x90\xc6-\x90+\x1f\x0f\xadu\x06\xd8\x99aW\xfc')
[root@localhost trytond]#

Was sind das für HTTP Fehler? Das Tool Werkzeug ist aktuell. Neuer is nur die Entwicklerversion.

Die /etc/config sieht jetzt so aus (Kommentarzeilen gelöscht)
[options]

jsonrpc
= [::]:8000
db_type
= postgresql
db_host
= localhost
db_port
= 5432
db_user
= tryton
db_password
= XXXXXXXXX

[database]
uri
= postgresql://tryton:XXXXXXXX@localhost:5432/
path
= /var/lib/trytond


Der Service konnte in der 2.6er Version mit der Option --logfile=/var/lib/...... gestartet werden. Diese Option gibt es in 4.0 nicht mehr. Dafür gibt es den Parameter --logconf, welcher auf eine Configdatei verweist. Aufbau und Inhalt der Datei unbekannt. Wo ist die Doku?

Und nun starten wir tryton. Jetzt fragt der Client beim Anlegen einer neuen Profile die Datenbanken ab! Ich bekomme beim Verbinden nur Anmeldename oder Passwort falsch. Habe die User tryton und admin probiert, wobei Admin in Postgresql nicht angelegt ist.

[nor@localhost ~]$ tryton --verbose
/usr/lib/python2.7/site-packages/tryton/gui/window/dblogin.py:573: GtkWarning: Theme directory base/ of theme oxygen has no size field

  self.dialog.show_all()
INFO:tryton.rpc:common.server.version(None, None)
INFO:tryton.rpc:common.db.login(tryton, xxxxxxxxxx)

Wo kann hier der Fehler liegen?

Jan Grasnick | ag kommunikation

unread,
May 14, 2016, 6:30:57 AM5/14/16
to tryt...@googlegroups.com
Am 13.05.2016 um 19:21 schrieb Hans Normann:
OK, allePakete per dnf entfernt und per pip neu installiert. Ergebnis: Nichts geht

noch nicht



Die Datei /etc/trytond.conf wurde nicht angelegt. OK, habe einach die alte Datei kopiert.

die geht dann nicht mehr. Hat sich einiges geändert und man muss die Konfiguration von Hand anlegen:

http://tryton.readthedocs.io/projects/trytond/en/latest/topics/configuration.html
für 3.4 ein Beispiel hier: https://gist.github.com/sharoonthomas/0b425318b47b3dc999e1

Bitte genau die Doku lesen für die installierte Version.



                                                                                                                               
IOError: Database "postgres://tryton.sqlite" doesn't exist!  
                                                                                                                                                                              
                
Wer sagt, dass ich eine sqlite-Datenbank verwenden will? Da scheint das System die alte /etc/trytond.conf auch nicht mehr zu  verstehen.                       

Stimmt :) Siehe oben.

Jan


Hans Normann

unread,
May 14, 2016, 10:13:25 AM5/14/16
to tryton-de

so, der Service läuft nur bei der Client spinnt. Jeder Versuch sich einzuloggen wird mit "Anmeldename existiert nicht oder falsches Passwort" quittiert. Habe aber (noch) keinen Plan, was in der Config fehlen könnte

#This file is part of Tryton.  The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
[database]
#xxxxxxx = password im Klartext(?)

uri
= postgresql://tryton:XXXXXXXX@localhost:5432/

path
= /var/lib/trytond

[web]
listen
= [::]:8000
hostname
= localhost

[session]
super_pwd
= YYYYYYYY


Hans Normann

unread,
May 15, 2016, 6:38:32 AM5/15/16
to tryton-de
Mal wieder einen kleinen Schritt weitergekommen. Ich behaupte einmal, dass die Verbindung zur Posgresql Datenbank steht. Fragt sich jetzt, warum ich sofort wieder raus geschmissen werde?

Tryton
[nor@localhost ~]$ tryton --verbose
/usr/lib/python2.7/site-packages/tryton/gui/window/dblogin.py:573: GtkWarning: Theme directory base/ of theme oxygen has no size field

 
self.dialog.show_all()
INFO
:tryton.rpc:common.server.version(None, None)
INFO
:tryton.rpc:common.db.login(tryton, xxxxxxxxxx)

INFO
:tryton.rpc:common.db.logout()


Postgresql Logfile
LOG:  Verbindung empfangen: Host=localhost Port=44934
LOG
:  Verbindung authorisiert: Benutzer=tryton Datenbank=tryton
LOG
:  Verbindungsende: Sitzungszeit: 0:05:37.723 Benutzer=tryton Datenbank=tryton Host=localhost port=44924



Udo Spallek

unread,
May 15, 2016, 3:27:53 PM5/15/16
to tryt...@googlegroups.com
Sat, 14 May 2016 07:13:25 -0700 (PDT)
Hans Normann <hans.g....@gmail.com>:

>so, der Service läuft nur bei der Client spinnt. Jeder Versuch sich
>einzuloggen wird mit "*Anmeldename existiert nicht oder falsches
>Passwort*" quittiert. Habe aber (noch) keinen Plan, was in der Config
>fehlen könnte
>
>#This file is part of Tryton. The COPYRIGHT file at the top level of
>#this repository contains the full copyright notices and license terms.
>[database]
>#xxxxxxx = password im Klartext(?)
Ja, richtig.

>uri = postgresql://tryton:XXXXXXXX@localhost:5432/
>
>path = /var/lib/trytond
>
>[web]
>listen = [::]:8000
>hostname = localhost
>
>[session]
>super_pwd = YYYYYYYY
Das wird so erstellt:

http://tryton.readthedocs.io/projects/trytond/en/latest/topics/configuration.html#super-pwd

super_pwd ist != admin password

Udo Spallek

unread,
May 15, 2016, 3:29:01 PM5/15/16
to tryt...@googlegroups.com
Sun, 15 May 2016 03:38:31 -0700 (PDT)
Hans Normann <hans.g....@gmail.com>:

>Mal wieder einen kleinen Schritt weitergekommen. Ich behaupte einmal,
>dass die Verbindung zur Posgresql Datenbank steht. Fragt sich jetzt,
>warum ich sofort wieder raus geschmissen werde?
>
>*Tryton*
>[nor@localhost ~]$ tryton --verbose
>/usr/lib/python2.7/site-packages/tryton/gui/window/dblogin.py:573:
>GtkWarning: Theme directory base/ of theme oxygen has no size field
>
> self.dialog.show_all()
>INFO:tryton.rpc:common.server.version(None, None)
>INFO:tryton.rpc:common.db.login(tryton, xxxxxxxxxx)
>INFO:tryton.rpc:common.db.logout()

>*Postgresql LogfileLOG: Verbindung empfangen: Host=localhost
>Port=44934LOG: Verbindung authorisiert: Benutzer=tryton
>Datenbank=trytonLOG: Verbindungsende: Sitzungszeit: 0:05:37.723
>Benutzer=tryton Datenbank=tryton Host=localhost port=44924*

Was sagt das Tryton server log? Ggf. den systemd prozess stoppen und
von Hand starten, damit man das log lesen kann.

Hans Normann

unread,
May 16, 2016, 11:39:58 AM5/16/16
to tryton-de

Das System mag mich nicht :-(

Also die Logdatei gibt aber auch nichts her. Ich habe den Level schon auf NOTSET gesetzt. Und der Client sagt im --verbose Modus auch nichts aus. Hatte ich ja schon gepostet..

Aber wenn ich systemctl status trytond eingebe wird es interessant.
[root@localhost trytond]# systemctl status trytond -l

trytond.service - Tryton server
   
Loaded: loaded (/usr/lib/systemd/system/trytond.service; enabled; vendor preset: disabled)

   
Active: active (running) since Mo 2016-05-16 17:29:10 CEST; 2min 3s ago
 
Main PID: 29908 (trytond)
   
CGroup: /system.slice/trytond.service
           
└─29908 /usr/bin/python /usr/bin/trytond --config /etc/trytond.conf --pidfile=/var/lib/trytond/trytond.pid --logconf=/etc/trytondlog.conf

Mai 16 17:30:49 localhost.localdomain trytond[29908]: tryton
Mai 16 17:30:49 localhost.localdomain trytond[29908]: Mon May 16 15:30:49 2016] INFO:trytond.backend.postgresql.database:postgresql connect
Mai 16 17:30:49 localhost.localdomain trytond[29908]: Mon May 16 15:30:49 2016] INFO:trytond.backend.postgresql.database:postgresql connection
Mai 16 17:30:49 localhost.localdomain trytond[29908]: DEBUG:  CommitTransaction
Mai 16 17:30:49 localhost.localdomain trytond[29908]: DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
Mai 16 17:30:49 localhost.localdomain trytond[29908]: tryton
Mai 16 17:30:49 localhost.localdomain trytond[29908]: Mon May 16 15:30:49 2016] INFO:trytond.backend.postgresql.database:postgresql connect
Mai 16 17:30:49 localhost.localdomain trytond[29908]: Mon May 16 15:30:49 2016] INFO:trytond.backend.postgresql.database:postgresql connection
Mai 16 17:30:49 localhost.localdomain trytond[29908]: Mon May 16 15:30:49 2016] INFO:werkzeug:::1 - - [16/May/2016 15:30:49] "POST /tryton/ HTTP/1.1" 200 -
Mai 16 17:30:59 localhost.localdomain trytond[29908]: Mon May 16 15:30:59 2016] INFO:werkzeug:::1 - - [16/May/2016 15:30:59] "POST /tryton/ HTTP/1.1" 200 -
[root@localhost trytond]#


wieso sehe ich nach einem vergeblichem Login postgresql connect und postgresql connection?

Udo Spallek

unread,
May 17, 2016, 4:05:44 AM5/17/16
to tryt...@googlegroups.com
Mon, 16 May 2016 08:39:57 -0700 (PDT)
Hans Normann <hans.g....@gmail.com>:
>Aber wenn ich *systemctl status trytond* eingebe wird es interessant.
>wieso sehe ich nach einem vergeblichem Login *postgresql connect* und
>*postgresql connection*?

Um überhaupt soweit zu kommen, sich in Tryton einloggen zu können,
braucht es eine funktionierende Datenbankverbindung. Das klingt also
schon mal gut.

Ich denke das in der Datenbank hinterlegte admin user Passwort ist
nicht dasselbe Passwort mit dem Du versuchst Dich einzuloggen.

Ich würde die Datenbank neu erstellen und das admin user Passwort
dabei nochmal neu setzen.
BTW: Das admin user password wird nur während des Anlegens der Datenbank
in der Kommandozeile abgefragt, bzw. im Tryton Datenbankassistenten
(Datei > Datenbank) hinterlegt.

Dieses Passwort wird nur abgefragt und kann nicht in der Konfiguration
hinterlegt werden wie super_pwd und das Datenbank Passwort in der uri
http://doc.tryton.org/4.0/trytond/doc/topics/configuration.html#uri

Viele Grüße
Udo Spallek
--
_____________________________
virtual things
Preisler & Spallek GbR
München - Aachen

Windeckstr. 77
81375 München
Tel: +49 (89) 710 481 55
Fax: +49 (89) 710 481 56

in...@virtual-things.biz
http://www.virtual-things.biz

Hans Normann

unread,
May 17, 2016, 5:45:56 AM5/17/16
to tryton-de
 
.... Das admin user password wird nur während des Anlegens ....

Ja ja, alles da, nur kein admin :-(   Angelegt und nun habe ich neue Fenster

Danke an alle
Reply all
Reply to author
Forward
0 new messages