[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Health] Updates: Gnu Health 2.8 Could not connect to local database ser
From: |
Chris R. Kasangaki |
Subject: |
[Health] Updates: Gnu Health 2.8 Could not connect to local database server |
Date: |
Thu, 19 Feb 2015 18:57:18 +0300 |
Hi Axel,
Here is an update. This is what I get after creating the database
manually. Actually I uploaded the demo database from gnusolidario.org.
See below
address@hidden:/home/kitovu/Downloads> psql -l
List of databases
Name | Owner | Encoding | Collate | Ctype |
Access privileges
----------------+----------+----------+-------------+-------------+-----------------------
gnuhealth_demo | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres +
| | | | |
postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres +
| | | | |
postgres=CTc/postgres
(4 rows)
address@hidden:/home/kitovu/Downloads> exit
exit
linux:/home/kitovu/Downloads # trytond -c /etc/tryton/trytond.conf -d
gnuhealth_demo --all
[Thu Feb 19 12:46:52 2015]
INFO:trytond.server:using /etc/tryton/trytond.conf as configuration file
[Thu Feb 19 12:46:52 2015] INFO:trytond.server:initialising distributed
objects services
[Thu Feb 19 12:46:52 2015] INFO:database:connect to "gnuhealth_demo"
Traceback (most recent call last):
File "/usr/bin/trytond", line 80, in <module>
trytond.server.TrytonServer(options).run()
File "/usr/lib/python2.7/site-packages/trytond/server.py", line 93, in
run
cursor.execute('SELECT code FROM ir_lang '
File
"/usr/lib/python2.7/site-packages/trytond/backend/postgresql/database.py", line
314, in execute
return self.cursor.execute(sql)
psycopg2.ProgrammingError: permission denied for relation ir_lang
linux:/home/kitovu/Downloads #
Can you make head or tail of this?
Thanks again
Chris R. Kasangaki
-----------------
Team Leader
Community Open Software Solutions Network
P.O. Box 23545
Kampala, Uganda.
Mobile: +256772648222, +256705648222,
+256794648222, +256752648222
Fax, Voice, Int.: +447092178997
(Gmail, Yahoo, Hotmail): chriskasangaki
skype: kris-kay
On Thu, 2015-02-19 at 15:06 +0100, Axel Braun wrote:
> Hi Chris,
>
> > No, we have not mailed before on this subject, but I have read an
> > earlier thread and tried to follow your solutions. Thank you for your
> > quick response; I was getting quite desperate.
>
> Yes, can imagine.....
>
> > My most critical server is OpenSuSE and I have done what you said; here
> > below are the results.
> >
> >
> > linux:/home/kitovu # systemctl status postgresql
> > postgresql.service - LSB: Start the PostgreSQL master daemon
> > Loaded: loaded (/etc/init.d/postgresql)
> > Active: inactive (dead)
> >
> > linux:/home/kitovu # systemctl restart postgresql
> > linux:/home/kitovu # systemctl status postgresql
> > postgresql.service - LSB: Start the PostgreSQL master daemon
> > Loaded: loaded (/etc/init.d/postgresql)
> > Active: active (exited) since Thu 2015-02-19 13:35:47 EAT; 3s ago
> > Process: 5220 ExecStart=/etc/init.d/postgresql start (code=exited,
> > status=0/SUCCESS)
>
> OK, here the server is running!
>
> > Feb 19 13:35:45 linux.site su[5233]: (to postgres) root on none
> > Feb 19 13:35:46 linux.site su[5270]: (to postgres) root on none
> > Feb 19 13:35:46 linux.site su[5270]: pam_unix(su-l:session): session
> > opened for user postgres by (uid=0)
> > Feb 19 13:35:46 linux.site postgresql[5220]: Starting PostgreSQL 9.3.5
> > pg_ctl: another server might be running; trying to start server anyway
> > Feb 19 13:35:47 linux.site postgresql[5220]: ..done
> > linux:/home/kitovu # systemctl restart trytond
> > linux:/home/kitovu # systemctl status trytond
> > trytond.service - Tryton server
> > Loaded: loaded (/usr/lib/systemd/system/trytond.service; enabled)
> > Active: active (running) since Thu 2015-02-19 13:36:18 EAT; 13s ago
> > Main PID: 5332 (trytond)
> > CGroup: /system.slice/trytond.service
> > └─5332 /usr/bin/python /usr/bin/trytond
> > --config /etc/tryton/trytond.conf --pidfile=/var/lib/trytond/trytond.pid
> > --logconf=/etc/try...
>
> looks like it is running as well!
>
> > linux:/home/kitovu # su postgres
> > address@hidden:/home/kitovu> psql -l
> > List of databases
> > Name | Owner | Encoding | Collate | Ctype | Access
> > privileges
> > -----------+----------+----------+-------------+-------------+-----------------------
> > postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
> > template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
> > =c/postgres +
> > | | | | |
> > postgres=CTc/postgres
> > template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
> > =c/postgres +
> > | | | | |
> > postgres=CTc/postgres
> > (3 rows)
>
> OK, I thought so...you have no tryton/gnuhealth database where the client can
> connect to!
> Tryton changed the behaviour in release 3.4....it does not necessarily make
> it more user friendly.
>
> You have two options:
> 1) enable the system to create a DB from the client (most productive
> installations won't allow this...)
>
> See super_pwd: http://doc.tryton.org/3.4/trytond/doc/topics/configuration.html
> if you have installed gnuhealth already, there is a script called
> serverpass.py which should do the job (havent tried myself, sorry...)
>
> 2) create a database manually
>
> createdb .....
>
> and then initialize it for tryton:
> http://doc.tryton.org/3.4/trytond/doc/topics/setup_database.html
>
> now you are able to connect to the DB!
>
> Let me know if it works
> Axel