Re: [ADMIN] Cannot start the PostgreSQL service

From: John Scalia <jayknowsunix(at)gmail(dot)com>
To: David Unsworth <dunswort(at)hotmail(dot)com>
Cc: "pgsql-admin-owner(at)postgresql(dot)org" <pgsql-admin-owner(at)postgresql(dot)org>, "pgsql-in-general(at)postgresql(dot)org" <pgsql-in-general(at)postgresql(dot)org>, "pgsql-in-general-owner(at)postgresql(dot)org" <pgsql-in-general-owner(at)postgresql(dot)org>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "pgsql-general-owner(at)postgresql(dot)org" <pgsql-general-owner(at)postgresql(dot)org>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: [ADMIN] Cannot start the PostgreSQL service
Date: 2016-01-30 17:40:50
Message-ID: 3BD15A77-5B3E-4A47-B864-B34EB2EFAC94@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-in-general

The settings in you pg_hba.conf aren't really correct. The second line won't work at all. The max value after the "/" is 32. This is not for the port number. You might wish to search setting a CIDR value, but if you want to allow:

Just 192.168.1.1 then

host all all 192.168.1.1/32 trust

If you want all the systems in 192.168.1.x then

host all all 192.168.1.0/24 trust

If you want all the systems in 192.168.x.x then

host all all 192.168.0.0/16 trust

Hope this helps,
Jay

Sent from my iPad

> On Jan 30, 2016, at 10:24 AM, David Unsworth <dunswort(at)hotmail(dot)com> wrote:
>
> Hello. Sorry if I have sent this to too may mail boxes. I hope one of them is correct. Please forward this on if not.
>
> This was working until recently. In Services I right clicked on properties and I think I changed the METHOD in pg_hba.conf from md5 to trust.
> I think after making this change the problems started.
>
> In Services I cannot start the PostgreSQL Server 8.4 due to Error:1069 The service did not start due to a logon failure.
>
> I have tried to set up pg_hba.conf correctly. Currently it is set to the following -
>
> # TYPE DATABASE USER CIDR-ADDRESS METHOD
> # IPv4 local connections:
> host all all 127.0.0.1/32 trust
> host all all 192.168.1.1/5432 trust
> # IPv6 local connections:
> host all all ::1/128 trust
>
> I have tried to set up pgpass.conf correctly as this was empty. Currently set to the following -
>
> 127.0.0.1:5432:*:postgres:dbpass
>
> The errors remain. Also I have been getting the error "could not connect to Server: Connection refused" detailed below -
>
> http://www.pgadmin.org/docs/1.14/connect-error.html
>
> I wanted to reload the configuration (before attempting to start the Service again ) and I got the error "Reload command returned an error (1)".
>
> I am not sure what to try next. I have some databases I do not want to lose if I can avoid it.
>
> Any ideas?
>
> Thanks, Dave.
>
>
>
>
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Adrian Klaver 2016-01-30 17:44:45 Re: Cannot start the PostgreSQL service
Previous Message Andreas Kretschmer 2016-01-30 16:54:54 Re: Cannot start the PostgreSQL service

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-01-30 17:44:45 Re: Cannot start the PostgreSQL service
Previous Message Andreas Kretschmer 2016-01-30 16:54:54 Re: Cannot start the PostgreSQL service

Browse pgsql-in-general by date

  From Date Subject
Next Message Adrian Klaver 2016-01-30 17:44:45 Re: Cannot start the PostgreSQL service
Previous Message Andreas Kretschmer 2016-01-30 16:54:54 Re: Cannot start the PostgreSQL service