Re: Failing tcp/ip connection - Mailing list pgsql-novice

From thiemo
Subject Re: Failing tcp/ip connection
Date
Msg-id 942ED99C-4DD7-11D6-BB95-000A27D62F9E@gmx.ch
Whole thread Raw
In response to Re: Failing tcp/ip connection  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-novice
<excerpt><excerpt>My pg_hba.conf looks like this (at least the lines
that aren't

(/var/lib/pgsql). The third line is not necessairy as I understand. I

################################################################

local      all                                          crypt

host       all         127.0.0.1     255.255.255.255    crypt

host       all         192.168.0.249   255.255.255.255      crypt

host       all         192.168.0.0   255.255.255.0      crypt

################################################################

</excerpt>

1. Make sure that you are, in fact, accessing the pgsql/data/ directory

that you think you are.

</excerpt>

That's the point I am most unsure about. I don't actually know where
to place the file. My book about postgresql only states to put in the
data directory...


nyffeltrach:/var/lib/pgsql # l

total 56

drwx------    6 postgres postgres     4096 Apr 11 23:09 ./

drwxr-xr-x   31 root     root         4096 Apr 12 03:00 ../

-rw-------    1 postgres daemon        185 Apr 10 23:53 .bash_history

-rw-------    1 postgres daemon          4 Apr  6 12:23 PG_VERSION

drwx------    4 postgres daemon       4096 Apr  6 12:23 base/

drwx------    2 postgres daemon       4096 Apr 11 23:09 global/

drwx------    2 postgres daemon       4096 Apr  6 12:23 pg_clog/

lrwxrwxrwx    1 root     root           27 Apr 11 23:08 pg_hba.conf ->
/root/pg_config/pg_hba.conf

-rw-------    1 postgres daemon       1250 Apr  6 12:23 pg_ident.conf

drwx------    2 postgres daemon       4096 Apr  6 12:23 pg_xlog/

-rw-------    1 postgres postgres     3844 Mar 13 22:08 postgresql.conf

-rw-------    1 postgres daemon         48 Apr 11 23:09 postmaster.opts

-rw-------    1 postgres daemon         41 Apr 11 23:09 postmaster.pid

-r--r--r--    1 root     root         1204 Apr 11 07:47 server.crt

-r--r--r--    1 root     root          887 Apr 11 07:47 server.key


BTW: I also put it physically in this directory as well as into the
bin directory of postgres


<excerpt>2. Make sure that your startup script isn't accessing an
alternate

pg_hba.conf directory.

</excerpt>

Below part of the output of ps ax

12833 ?        S      0:00 su - postgres -c /opt/pgsql/bin/postmaster
-D /var/lib/pgsql

12834 ?        S      0:00 -su -c /opt/pgsql/bin/postmaster
-D /var/lib/pgsql

12843 ?        S      0:00 /opt/pgsql/bin/postmaster -D /var/lib/pgsql


The script is

su - postgres \

    -c "/opt/pgsql/bin/postmaster \

                       -D /var/lib/pgsql \

                       1>> /var/log/postgres/postgreSQL.err \

                       2>> /var/log/postgres/postgreSQL.log" &


<excerpt>3. Have you restarted Postmaster since you made the changes to

pg_hba.conf?  Sometimes that's required.

</excerpt>

Yepp.


Hell, it was a permission problem. Links don't work and when I copied
the file to the data directory I did it as root (I was trying to have
the configs at a central point such that I would not loose it too
easily) and forgot to change the owner...


Thx


Thiemo

<fontfamily><param>Helvetica</param>

--

Thiemo Kellner

Tösstalstrasse 146

CH-8400 Winterthur

</fontfamily>>> My pg_hba.conf looks like this (at least the lines that aren't
>> (/var/lib/pgsql). The third line is not necessairy as I understand. I
>> ################################################################
>> local      all                                          crypt
>> host       all         127.0.0.1     255.255.255.255    crypt
>> host       all         192.168.0.249   255.255.255.255      crypt
>> host       all         192.168.0.0   255.255.255.0      crypt
>> ################################################################
>
> 1. Make sure that you are, in fact, accessing the pgsql/data/ directory
> that you think you are.

That's the point I am most unsure about. I don't actually know where to
place the file. My book about postgresql only states to put in the data
directory...

nyffeltrach:/var/lib/pgsql # l
total 56
drwx------    6 postgres postgres     4096 Apr 11 23:09 ./
drwxr-xr-x   31 root     root         4096 Apr 12 03:00 ../
-rw-------    1 postgres daemon        185 Apr 10 23:53 .bash_history
-rw-------    1 postgres daemon          4 Apr  6 12:23 PG_VERSION
drwx------    4 postgres daemon       4096 Apr  6 12:23 base/
drwx------    2 postgres daemon       4096 Apr 11 23:09 global/
drwx------    2 postgres daemon       4096 Apr  6 12:23 pg_clog/
lrwxrwxrwx    1 root     root           27 Apr 11 23:08 pg_hba.conf ->
/root/pg_config/pg_hba.conf
-rw-------    1 postgres daemon       1250 Apr  6 12:23 pg_ident.conf
drwx------    2 postgres daemon       4096 Apr  6 12:23 pg_xlog/
-rw-------    1 postgres postgres     3844 Mar 13 22:08 postgresql.conf
-rw-------    1 postgres daemon         48 Apr 11 23:09 postmaster.opts
-rw-------    1 postgres daemon         41 Apr 11 23:09 postmaster.pid
-r--r--r--    1 root     root         1204 Apr 11 07:47 server.crt
-r--r--r--    1 root     root          887 Apr 11 07:47 server.key

BTW: I also put it physically in this directory as well as into the bin
directory of postgres

> 2. Make sure that your startup script isn't accessing an alternate
> pg_hba.conf directory.

Below part of the output of ps ax
12833 ?        S      0:00 su - postgres -c
/opt/pgsql/bin/postmaster                        -D /var/lib/pgsql
12834 ?        S      0:00 -su -c
/opt/pgsql/bin/postmaster                        -D /var/lib/pgsql
12843 ?        S      0:00 /opt/pgsql/bin/postmaster -D /var/lib/pgsql

The script is
su - postgres \
     -c "/opt/pgsql/bin/postmaster \
                        -D /var/lib/pgsql \
                        1>> /var/log/postgres/postgreSQL.err \
                        2>> /var/log/postgres/postgreSQL.log" &

> 3. Have you restarted Postmaster since you made the changes to
> pg_hba.conf?  Sometimes that's required.

Yepp.

Hell, it was a permission problem. Links don't work and when I copied
the file to the data directory I did it as root (I was trying to have
the configs at a central point such that I would not loose it too
easily) and forgot to change the owner...

Thx

Thiemo

--
Thiemo Kellner
Tösstalstrasse 146
CH-8400 Winterthur

pgsql-novice by date:

Previous
From: Jason Earl
Date:
Subject: Re: less not found
Next
From: Rob
Date:
Subject: Update function