health
[Top][All Lists]
Advanced

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

Re: [Health] Could not connect to server problem


From: David Bruchmann
Subject: Re: [Health] Could not connect to server problem
Date: Tue, 7 Jul 2015 22:53:55 +0700

The postgres user is for managing the database and has - concerning the database - root access.
For accessing the database for Gnu Health you should connect by the gnuhealth user, while the tryton-server is started from the gnuhealth Linux-user.
The tryton-client should be started with another user account - as in general it can be called from any PC and never needs any special rights.

On Tue, Jul 7, 2015 at 10:39 PM, Scott Hazelhurst <address@hidden> wrote:




Dear all

Many thanks for the previous responses. I am back from my travels and I would like to make a concerted attempt to get this to work now.

I have looked at the suggestions made, but I have had no progress.

Just to recap: the problem manifests  itself in following these instructions https://en.wikibooks.org/wiki/GNU_Health/Installation

when I get to the step "Creating the GNU Health database”


I get to this point:  "Click on Manage profiles, then click on Add. Give your new connection a name on the left side, and fill the fields on the right side. If you're doing the installation on the same machine, choose localhost as the hostname.” At that point I get a can’t connect to database error — at no point does the Create DB option occur….


To answer some questions

1. I am using trying 3.4.4 which is the same version  that the server uses. I have also tried 3.4.2
2. The client and server are running on the same machine with different userid — no firewall rules at all
3. If I do a telnet localhost 8000, I get a connection
4. If I log in as the postgres user, I can run psql
5. The instructions above imply that misconfiguration of postgres may be a reason for the type of error I am getting

I have played around but this is what I currently have as my current setup

address@hidden:~$ psql -t -P format=unaligned -c 'show hba_file'
/etc/postgresql/9.4/main/pg_hba.conf

address@hidden:~$ cat /etc/postgresql/9.4/main/pg_hba.conf | grep -v \#

local     all  all  trust
host   all   all        127.0.0.1/32    trust



Many thanks for any ideas …

Scott





> On 17 Jun 2015, at 1:01 PM, Luis Falcon <address@hidden> wrote:
>
> Dear Scott
>
> On Fri, 12 Jun 2015 15:39:25 +0000
> Scott Hazelhurst <address@hidden> wrote:
>
>>
>> Dear Mailing List
>>
>> I am trying to install gnuhealth and have run into this problem where
>> the client can’t seem to connect to the server — the triton client
>> gives me the message “Could not connect to the server". I see others
>> have had the same problem but I can’t see anything  to help me.
>> Obviously, I’m missing something obvious, so please help me
>>
> Sorry for the late reply ! Just got back from your country (BTW, thank
> you so much for the hospitality ! I had a great time )
>
> Are you able to connect now ? You might want to check that you can
> access port 8000, and make sure you're using the Tryton client 3.4
>
> The entry about the Community Server at the GNU Health wikibook might
> also give you some clues about the connection parameters.[1]
>
> Let us know if you could solve the problem.
>
> 1.
> https://en.wikibooks.org/wiki/GNU_Health/The_Demo_database#Online_Demo_Database
>
> Have a great day !
> Luis
>
>
>
>> Many thanks
>>
>> Scott
>>
>>
>>
>> 1. We have install this on a machine running Ubuntu 15.04
>> 2. At the  moment only in localhost mode — the server is running as
>> the gnuhealth user, and the client is running as another user 3. In
>> the postgres log file I see
>>
>> tail postgresql-9.4-main.log
>>
>> 2015-06-12 16:58:18 SAST [10670-1] address@hidden LOG:  could
>> not receive data from client: Connection reset by peer 2015-06-12
>> 17:06:03 SAST [11167-1] address@hidden LOG:  could not receive
>> data from client: Connection reset by peer 2015-06-12 17:06:06 SAST
>> [11174-1] address@hidden LOG:  could not receive data from
>> client: Connection reset by peer 2015-06-12 17:06:57 SAST [11233-1]
>> address@hidden LOG:  could not receive data from client:
>> Connection reset by peer 2015-06-12 17:07:41 SAST [11289-1]
>> address@hidden LOG:  could not receive data from client:
>> Connection reset by peer
>>
>> 4. When I try to connect, the server prints out the following
>>
>>
>> [Fri Jun 12 15:07:41 2015] INFO:database:connect to “template1"
>>
>>
>> 5. My trytond.conf file says
>>
>> [database]
>> uri = postgresql://localhost:5432
>> path = /home/gnuhealth/attach
>>
>> [jsonrpc]
>> listen = localhost:8000
>>
>> [session]
>>
>>
>> 6.  My pg_hba.conf file presently says
>>
>> local   all             all                                     trust
>> # IPv4 local
>> connections: host    all             all
>> 127.0.0.1/32            trust host    all             all
>> localhost            trust
>>
>>
>>
>> 7. As the gnuhealth user I can make psql connections
>>
>> address@hidden:~ $ createdb foo
>> address@hidden:~ $ psql foo
>> psql (9.4.2)
>> Type "help" for help.
>>
>>
>>
>> 8. Running gnuhealth 2.8.1 and tryton 3.4.2
>>
>> Many thanks
>>
>> Scott
>>
>>
>>
>> <table width="100%" border="0" cellspacing="0" cellpadding="0"
>> style="width:100%;"> <tr>
>> <td align="left" style="text-align:justify;"><font
>> face="arial,sans-serif" size="1" color="#999999"><span
>> style="font-size:11px;">This communication is intended for the
>> addressee only. It is confidential. If you have received this
>> communication in error, please notify us immediately and destroy the
>> original message. You may not copy or disseminate this communication
>> without the permission of the University. Only authorised signatories
>> are competent to enter into agreements on behalf of the University
>> and recipients are thus advised that the content of this message may
>> not be legally binding on the University and may contain the personal
>> views and opinions of the author, which are not necessarily the views
>> and opinions of The University of the Witwatersrand, Johannesburg.
>> All agreements between the University and outsiders are subject to
>> South African Law unless the University agrees in writing to the
>> contrary. </span></font></td> </tr> </table
>
>
> --
> Luis Falcon, M.D.
> GNU Health
> Freedom and Equity in Health care
> http://health.gnu.org


<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;">
<tr>
<td align="left" style="text-align:justify;"><font face="arial,sans-serif" size="1" color="#999999"><span style="font-size:11px;">This communication is intended for the addressee only. It is confidential. If you have received this communication in error, please notify us immediately and destroy the original message. You may not copy or disseminate this communication without the permission of the University. Only authorised signatories are competent to enter into agreements on behalf of the University and recipients are thus advised that the content of this message may not be legally binding on the University and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of The University of the Witwatersrand, Johannesburg. All agreements between the University and outsiders are subject to South African Law unless the University agrees in writing to the contrary. </span></font></td>
</tr>
</table


reply via email to

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