I tried again trytond by typing the Postgresql uri in my config file.
I observed two cases:
Case 1: using the postgresql database with my linux username, which is already exist for a long time ago. It seems I cannot login to the database due to invalid password.
OperationalError: FATAL: password authentication failed for user "why2"
FATAL: password authentication failed for user "why2"
I tried to change my password using :
> psql -c"ALTER USER why2 WITH PASSWORD 'mypassword'" -d trytondb
> ALTER ROLE
Started the daemon and the app, I saw this log:
[2018-06-01 16:02:37,690] ERROR trytond.security login failed for 'why2' from '127.0.0.1' on database 'trytondb'
Case 2: Create a new Role called tryton_admin
, and its postgresql DB db_tryton
. After starting the daemon and the app, this is what I get:
Traceback (most recent call last):
File "./tryton", line 69, in <module>
client.TrytonClient().run()
File "/home/why2/tryton/tryton/tryton/client.py", line 294, in run
main.sig_login()
File "/home/why2/tryton/tryton/tryton/gui/main.py", line 858, in sig_login
common.Login(func)
File "/home/why2/tryton/tryton/tryton/common/common.py", line 1126, in __init__
func(parameters)
File "/home/why2/tryton/tryton/tryton/gui/main.py", line 855, in <lambda>
host, port, database, username, parameters, language)
File "/home/why2/tryton/tryton/tryton/rpc.py", line 72, in login
result = connection.common.db.login(username, parameters, language)
File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
return self.__send(self.__name, args)
File "/home/why2/tryton/tryton/tryton/jsonrpc.py", line 296, in __request
raise Fault(*response['error'])
Fault: <Fault u'relation "ir_cache" does not exist\nLINE 1: SELECT "a"."timestamp", "a"."name" FROM "ir_cache" AS "a"\n ^\n': u'Traceback (most recent call last):\n File "/trytond/wsgi.py", line 73, in dispatch_request\n return endpoint(request, **request.view_args)\n File "/trytond/protocols/dispatcher.py", line 40, in rpc\n request, database_name, *request.rpc_params)\n File "/trytond/protocols/dispatcher.py", line 57, in login\n database_name, user, parameters, context=context)\n File "/trytond/security.py", line 30, in login\n with Transaction().start(dbname, 0, context=context) as transaction:\n File "/trytond/transaction.py", line 106, in start\n Cache.clean(database.name)\n File "/trytond/cache.py", line 111, in clean\n cursor.execute(*table.select(table.timestamp, table.name))\n File "/trytond/backend/postgresql/database.py", line 61, in execute\n cursor.execute(self, sql, args)\nProgrammingError: relation "ir_cache" does not exist\nLINE 1: SELECT "a"."timestamp", "a"."name" FROM "ir_cache" AS "a"\n ^\n\n'>
Another case that I have is that if I start tryton
with the same virtual env what I set for trytond, it cannot find gi
module ImportError: No module named gi
. If I start without virtual env, I can start the tryton application. But than get the error as the both cases above .