health
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health] Creating the GNU Health database


From: William Moura
Subject: Re: [Health] Creating the GNU Health database
Date: Mon, 02 May 2016 12:32:05 +0000

Thanks for all of your help folks. The approach that worked for me was installing on Ubuntu Server as recommended by documentation.

Regards,

William

On Mon, Apr 25, 2016 at 20:21 Marc Murray <address@hidden> wrote:
Dear William, 

It is possible that the user account under which you are running GNU Health does not have permissions to create a new database  - which is what you're trying to do. 

For you, you seem to have the correct permissions in your pg_hba.conf, however, you need to ensure the user exists and has the create database permission. If you never did do a  "sudo -u postgres -i" to create a user account in the PostgreSQL database for your GNU Health user, this may be your problem. 

So, to create your user in the database engine to work with the settings you have, do:

sudo -u postgres createuser -RSd gnuhealth

The options are : R (cannot create roles), S (not a superuser), d (can create databases)

This creates a user that can only connect to postgres using identd or trust since there's no password. 

I hope this helps. 

---
MM

On Mon, Apr 25, 2016 at 10:53 AM, William Moura <address@hidden> wrote:
I had already installed it. This message shows up after running the Tryton Client in order to create gnuhealth database. I'm trying to run the client on the same machine as the server, but with different users. I went through all documentation repeating the process multiple times, but always I've received this error message. Is my tryond.conf file properly set up to Tryton Server and Tryton Client running on the same machine (localhost)?

Regards,

William

On Sun, Apr 24, 2016 at 19:22 Roberto Novaes <address@hidden> wrote:
> I have installed GNU Health, on Ubumtu 14.04 LTS following all steps and
> requirements in https://en.wikibooks.org/wiki/GNU_Health/Installation but I
> didn't succeed yet. I have the Tryton Client installed on the same machine
> but in another user. My pg_hba.conf is set as follows:
>
> local   all             all                                     trust
>
> host    all             all             127.0.0.1/32            trust
>
> My trytond.conf is set as follows:
> [database]
> uri = postgresql://localhost:5432
> path = /home/gnuhealth/attach
>
> [session]
> super_pwd = M0thnfkds987
>
> [jsonrpc]
> listen: *:8000
>
> The error I have recieved is:
> 3405 140594225813248 [2016-04-24 15:52:10,305] ERROR
> trytond.protocols.dispatcher CREATE DB: gnuhealth failed Traceback (most
> recent call last): File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/protocols/dispatcher.py",
> line 229, in create pool.init(update=['res', 'ir'], lang=[lang]) File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/pool.py",
> line 144, in init self.start() File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/pool.py",
> line 97, in start register_classes() File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/modules/__init__.py",
> line 319, in register_classes import trytond.ir File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/ir/__init__.py",
> line 4, in <module> from .configuration import * File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/ir/configuration.py",
> line 3, in <module> from ..model import ModelSQL, ModelSingleton, fields
> File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/model/__init__.py",
> line 3, in <module> from .model import Model File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/model/model.py",
> line 9, in <module> from trytond.model import fields File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/model/fields/__init__.py",
> line 4, in <module> from .field import * File
> "/home/gnuhealth/gnuhealth/tryton/server/trytond-3.8.5/trytond/model/fields/field.py",
> line 7, in <module> from sql import operators, Column, Literal, Select,
> CombiningQuery, Null ImportError: cannot import name Null
>

It appears that all of your settings are correct. But you have not
installed one of the dependencies: python-sql.

You can install it with pip install python-sql

Hope it helps,

Roberto Novaes
www.silexsistemas.com.br


reply via email to

[Prev in Thread] Current Thread [Next in Thread]