Tryton not loading from database

Until about a week ago when I last checked, my Tryton installation was all working fine. It’s a gnuhealth 4.3.2 with sao on opensuse leap 15.1.
So I checked today and found out tryton not loading at all (although server status was active). I restarted both tryton and postgres and good enough tryton and sao loaded but sao did not load the available databases to choose from on the login page (the drop down was empty). So it was impossible to log in.

No error in tryton and system logs. Although it looks like tryton user is having trouble reading the database in tryton log below.

Between now and the last time all was good, I have installed pgadmin. I could access postgres via pgadmin and the shell. Databases look ok. I have also included tryton user in root user group and another group. Could this be causing problem for tyrton user getting access to database?

Below is Tryton log extract at server restart.

Sat Aug 22 12:39:18 2020] INFO:server:using /etc/tryton/trytond_log.conf as logging configuration file
Sat Aug 22 12:39:44 2020] INFO:trytond.modules:ir:registering classes
Sat Aug 22 12:39:44 2020] INFO:trytond.modules:res:registering classes
Sat Aug 22 12:39:44 2020] INFO:trytond.modules:country:registering classes
Sat Aug 22 12:39:44 2020] INFO:trytond.modules:currency:registering classes
Sat Aug 22 12:39:44 2020] INFO:trytond.modules:dashboard:registering classes
Sat Aug 22 12:39:44 2020] INFO:trytond.modules:tests:registering classes
Sat Aug 22 12:39:44 2020] INFO:trytond.modules:webdav:registering classes
Sat Aug 22 12:39:44 2020] INFO:trytond.modules:calendar:registering classes
Sat Aug 22 12:39:45 2020] INFO:trytond.modules:party:registering classes
Sat Aug 22 12:40:12 2020] INFO:trytond.modules:stock_package_shipping:registering classes
Sat Aug 22 12:40:12 2020] INFO:trytond.modules:production_work:registering classes
Sat Aug 22 12:40:12 2020] INFO:trytond.modules:production_work_timesheet:registering classes
Sat Aug 22 12:40:13 2020] INFO:werkzeug: * Running on https://localhost:8000/ (Press CTRL+C to quit)
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[37mGET / HTTP/1.1e[0m" 200 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[1me[31mGET /favicon.ico HTTP/1.1e[0m" 405 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/moment/min/moment.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/mousetrap/mousetrap.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/bootstrap-rtl-ondemand/dist/css/bootstrap-rtl-ondemand.min.css HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /dist/tryton-sao.min.css HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /custom.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /custom.css HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/moment/min/locales.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/jquery/dist/jquery.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/bootstrap/dist/js/bootstrap.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/gettext.js/dist/gettext.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/d3/d3.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/c3/c3.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/fullcalendar/dist/fullcalendar.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/papaparse/papaparse.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/fullcalendar/dist/locale-all.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/bootstrap/dist/css/bootstrap.min.css HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/c3/c3.min.css HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /bower_components/fullcalendar/dist/fullcalendar.min.css HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:08 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:08] "e[36mGET /dist/tryton-sao.min.js HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:09 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:09] "e[1me[31mGET /favicon.ico HTTP/1.1e[0m" 405 -
Sat Aug 22 12:48:09 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:09] "e[36mGET /images/tryton-menu.svg HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:09 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:09] "e[36mGET /images/tryton-icon.png HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:10 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:10] "e[36mGET /locale/en_GB.json HTTP/1.1e[0m" 304 -
Sat Aug 22 12:48:10 2020] INFO:trytond.backend.postgresql.database:connect to "template1"
Sat Aug 22 12:48:10 2020] INFO:werkzeug:192.168.1.1 - - [22/Aug/2020 12:48:10] "e[37mPOST / HTTP/1.1e[0m" 200 -

Your help will be appreciated on how to figure out what went wrong.

Thank you.

I do not see any error messages on your log. Tryton is connectinc correctly to the database.

No, the crediantials that tryton uses to connect to the database are set on the configuration file or in the TRYTOND_DATABASE_URI environtment variables. You should check that this user is allowed to connect to your postgres database.

You are a life saver Pokoli.

I had changed the pg_hba.conf value (local all all md5) from md5 to trust for tryton. But this value is required to be changed to md5 for phppgadmin which I installed after tryton has been running well. Changing the value back to trust brought tryton back to life.
Thanks ever so much!

1 Like