FAQ
Hello All,

I am attempting to access postgresql on another machine through PGAdmin III.
I filled out the defaults in the "New Server Registration" dialog and when
I hit "OK" I get an error stating "Error connecting to the server: FATAL:
missing or erroneous pg_hba.conf file HINT: See server log for details."

The log file states that I have an invalid entry...
The pg_hba.conf looks like the following:

#IPV4 local connections:
host all all 127.0.0.1/32 md5
devfrances all all 192.168.1.23/32 password

Note: I've also tried changing the devfrances to "... 192.168.1.23
255.255.255.0..." and "...md5" and "...trust"

I've read all the documentation I can find on this particular setup and as
far as I can tell, I am not doing anything wrong. Any ideas?

Thank you,
Frances Collier

Search Discussions

  • Richard Broersma Jr at Apr 19, 2006 at 12:03 am

    #IPV4 local connections:
    host all all 127.0.0.1/32 md5
    devfrances all all 192.168.1.23/32 password

    This this my guess, the first valid value for type is [ host | local ] I am not sure what
    devfrances is but my guess is that you should my it to either the database column or user column.

    Also check that your config file located in /etc/conf.d/postgresql has the "-i" option enabled to
    allow tcp/ip connections.

    Below is the order of the conf file parameters.

    # TYPE DATABASE USER CIDR-ADDRESS METHOD
  • Shane Ambler at Apr 19, 2006 at 2:44 am
    I am guessing that entering devfrances you are entering a dns hostname of
    the machine to allow connections - this is what would replace the
    192.168.1.23 address but dns hostnames are not supported in pg_hba.conf. You
    can enter a network such as 192.168.1.0/24 to allow anyone in the local
    network to connect.

    You must enter host at the start of the line not the dns hostname of the
    machine you want to allow a connection from.

    If you read the top of the pg_hba.conf file you will find the first column
    refers to the type of connection - accepted values are :-
    local
    host
    hostssl
    hostnossl

    A local connection is a client connection from the same machine as the
    server. The host connections refer to clients connecting from another
    machine over tcp.

    So a line like
    host all all 192.168.1.23/32 password
    Would allow a connection to any database using any login username from the
    machine at 192.168.1.23 using password authentication.

    You can use the hostssl and hostnossl to specify that the connection from
    that machine must use an ssl connection or cannot connect with an ssl
    connection.

    http://www.postgresql.org/docs/8.1/interactive/client-authentication.html
    Provides the full documentation on these settings.

    On 19/4/2006 8:49, "Frances Collier" wrote:

    Hello All,

    I am attempting to access postgresql on another machine through PGAdmin III.
    I filled out the defaults in the "New Server Registration" dialog and when
    I hit "OK" I get an error stating "Error connecting to the server: FATAL:
    missing or erroneous pg_hba.conf file HINT: See server log for details."

    The log file states that I have an invalid entry...
    The pg_hba.conf looks like the following:

    #IPV4 local connections:
    host all all 127.0.0.1/32 md5
    devfrances all all 192.168.1.23/32 password

    Note: I've also tried changing the devfrances to "... 192.168.1.23
    255.255.255.0..." and "...md5" and "...trust"

    I've read all the documentation I can find on this particular setup and as
    far as I can tell, I am not doing anything wrong. Any ideas?

    Thank you,
    Frances Collier




    ---------------------------(end of broadcast)---------------------------
    TIP 4: Have you searched our list archives?

    http://archives.postgresql.org
  • Frances Collier at Apr 20, 2006 at 3:48 pm
    Thank you so much. I changed devfrances to host in the pg_hba.conf file and
    it worked. I thought "host" was a placeholder and I needed to put in an
    actual machine name/ip. Thank you also for the link. I didn't see that the
    first time around.

    Sincerely,
    Frances Collier

    -----Original Message-----
    From: Shane Ambler
    Sent: Tuesday, April 18, 2006 7:21 PM
    To: Frances Collier; PostgreSQL Mailing lists
    Subject: Re: [NOVICE] postgresql connection problems

    I am guessing that entering devfrances you are entering a dns hostname of
    the machine to allow connections - this is what would replace the
    192.168.1.23 address but dns hostnames are not supported in pg_hba.conf. You
    can enter a network such as 192.168.1.0/24 to allow anyone in the local
    network to connect.

    You must enter host at the start of the line not the dns hostname of the
    machine you want to allow a connection from.

    If you read the top of the pg_hba.conf file you will find the first column
    refers to the type of connection - accepted values are :-
    local
    host
    hostssl
    hostnossl

    A local connection is a client connection from the same machine as the
    server. The host connections refer to clients connecting from another
    machine over tcp.

    So a line like
    host all all 192.168.1.23/32 password
    Would allow a connection to any database using any login username from the
    machine at 192.168.1.23 using password authentication.

    You can use the hostssl and hostnossl to specify that the connection from
    that machine must use an ssl connection or cannot connect with an ssl
    connection.

    http://www.postgresql.org/docs/8.1/interactive/client-authentication.html
    Provides the full documentation on these settings.

    On 19/4/2006 8:49, "Frances Collier" wrote:

    Hello All,

    I am attempting to access postgresql on another machine through PGAdmin III.
    I filled out the defaults in the "New Server Registration" dialog and when
    I hit "OK" I get an error stating "Error connecting to the server: FATAL:
    missing or erroneous pg_hba.conf file HINT: See server log for details."

    The log file states that I have an invalid entry...
    The pg_hba.conf looks like the following:

    #IPV4 local connections:
    host all all 127.0.0.1/32 md5
    devfrances all all 192.168.1.23/32 password

    Note: I've also tried changing the devfrances to "... 192.168.1.23
    255.255.255.0..." and "...md5" and "...trust"

    I've read all the documentation I can find on this particular setup and as
    far as I can tell, I am not doing anything wrong. Any ideas?

    Thank you,
    Frances Collier




    ---------------------------(end of broadcast)---------------------------
    TIP 4: Have you searched our list archives?

    http://archives.postgresql.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedApr 18, '06 at 11:41p
activeApr 20, '06 at 3:48p
posts4
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase