pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed(no subject)
5+ messages / 2 participants
[nested] [flat]
* (no subject)
@ 2017-03-21 22:05 Santiago DIEZ <santiago.diez@caoba.fr>
0 siblings, 1 reply; 5+ messages in thread
From: Santiago DIEZ @ 2017-03-21 22:05 UTC (permalink / raw)
To: pgsql-admin
Hi,
I'm trying to execute postgresql inside a chroot environment.
initdb runs OK
pg_ctl runs OK and server can be queried.
But, the logs show :
2017-03-21 22:34:03 CET LOG: could not receive test message on socket for
statistics collector: Connection refused
2017-03-21 22:34:03 CET LOG: disabling statistics collector for lack of
working socket
2017-03-21 22:34:03 CET WARNING: autovacuum not started because of
misconfiguration
2017-03-21 22:34:03 CET HINT: Enable the "track_counts" option.
2017-03-21 22:34:03 CET LOG: database system was shut down at 2017-03-21
22:34:03 CET
2017-03-21 22:34:04 CET LOG: database system is ready to accept connections
Note that outside the chroot, the server is not showing any error :
2017-03-21 17:51:58 CET LOG: database system was shut down at 2017-03-21
17:51:58 CET
2017-03-21 17:51:58 CET LOG: database system is ready to accept connections
2017-03-21 17:51:58 CET LOG: autovacuum launcher started
What is necessary to run statistic collector?
How should I configure my chroot?
How can I debug? (apart from setting log_min_messages to debug1 which does
not help me much because I can't interpret the output).
Regards
-------------------------
*Santiago DIEZ*
<http://www.google.com/url?q=http%3A%2F%2Fsantiago.news.free.fr%2Flogo.png&sa=D&sntz=1&us...;
-------------------------
*Quark Systems & CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris*-------------------------
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re:
@ 2017-03-22 03:23 Tom Lane <tgl@sss.pgh.pa.us>
parent: Santiago DIEZ <santiago.diez@caoba.fr>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2017-03-22 03:23 UTC (permalink / raw)
To: Santiago DIEZ <santiago.diez@caoba.fr>; +Cc: pgsql-admin
Santiago DIEZ <santiago.diez@caoba.fr> writes:
> I'm trying to execute postgresql inside a chroot environment.
> initdb runs OK
> pg_ctl runs OK and server can be queried.
> But, the logs show :
> 2017-03-21 22:34:03 CET LOG: could not receive test message on socket for
> statistics collector: Connection refused
> 2017-03-21 22:34:03 CET LOG: disabling statistics collector for lack of
> working socket
Apparently there's some aspect of your chroot setup that breaks TCP
connections to "localhost". You need to fix that ...
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re:
@ 2017-03-22 08:28 Santiago DIEZ <santiago.diez@caoba.fr>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Santiago DIEZ @ 2017-03-22 08:28 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
Hi Tom,
Thanks for your advice. I'm indeed only able to connect to the cluster from
outside the chroot using unix sockets like:
$ psql --host /jail/tmp --port 5421 mydb
If I try and force a TCP/IP connexion, it fails with:
$ psql --host localhost --port 5421 mydb
psql: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5421?
FATAL: no pg_hba.conf entry for host "192.168.1.103", user "santiago",
database "santiago"
I have mounted /dev, /proc and /sys inside the chroot. What else could be
necessary to allow TCP/IP connections to postgresql?
Regards
-------------------------
*Santiago DIEZ*
*+33 6 37 90 81 98*
-------------------------
<http://www.google.com/url?q=http%3A%2F%2Fsantiago.news.free.fr%2Flogo.png&sa=D&sntz=1&us...;
-------------------------
*Quark Systems & CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris*-------------------------
On Wed, Mar 22, 2017 at 4:23 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Santiago DIEZ <santiago.diez@caoba.fr> writes:
> > I'm trying to execute postgresql inside a chroot environment.
> > initdb runs OK
> > pg_ctl runs OK and server can be queried.
>
> > But, the logs show :
> > 2017-03-21 22:34:03 CET LOG: could not receive test message on socket
> for
> > statistics collector: Connection refused
> > 2017-03-21 22:34:03 CET LOG: disabling statistics collector for lack of
> > working socket
>
> Apparently there's some aspect of your chroot setup that breaks TCP
> connections to "localhost". You need to fix that ...
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re:
@ 2017-03-22 08:53 Santiago DIEZ <santiago.diez@caoba.fr>
parent: Santiago DIEZ <santiago.diez@caoba.fr>
0 siblings, 1 reply; 5+ messages in thread
From: Santiago DIEZ @ 2017-03-22 08:53 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
Hi,
Actually, port 5421 is open for localhost but not on eth0. What puzzles me
is why psql is resolving localhost to 192.168.1.103 when nc is rightfully
resolving it to 127.0.0.1:
$ nc -vz localhost 5421
localhost [127.0.0.1] 5421 (?) open
$ nc -vnz 192.168.1.103 5421
(UNKNOWN) [192.168.1.103] 5421 (?) : Connection refused
$ psql --host localhost --port 5421
psql: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5421?
FATAL: no pg_hba.conf entry for host "192.168.1.103", user "santiago",
database "santiago"
$ psql --host 127.0.0.1 --port 5421
psql: FATAL: no pg_hba.conf entry for host "192.168.1.103", user
"santiago", database "santiago"
-------------------------
*Santiago DIEZ*
*Quark Systems & CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris*-------------------------
On Wed, Mar 22, 2017 at 9:28 AM, Santiago DIEZ <santiago.diez@caoba.fr>
wrote:
> Hi Tom,
>
> Thanks for your advice. I'm indeed only able to connect to the cluster
> from outside the chroot using unix sockets like:
> $ psql --host /jail/tmp --port 5421 mydb
>
> If I try and force a TCP/IP connexion, it fails with:
> $ psql --host localhost --port 5421 mydb
> psql: could not connect to server: Connection refused
> Is the server running on host "localhost" and accepting
> TCP/IP connections on port 5421?
> FATAL: no pg_hba.conf entry for host "192.168.1.103", user "santiago",
> database "santiago"
>
> I have mounted /dev, /proc and /sys inside the chroot. What else could be
> necessary to allow TCP/IP connections to postgresql?
>
> Regards
> -------------------------
> *Santiago DIEZ*
> *+33 6 37 90 81 98*
> -------------------------
>
> <http://www.google.com/url?q=http%3A%2F%2Fsantiago.news.free.fr%2Flogo.png&sa=D&sntz=1&us...;
> -------------------------
> *Quark Systems & CAOBA*
>
> *23 rue du Buisson Saint-Louis, 75010 Paris*-------------------------
>
> On Wed, Mar 22, 2017 at 4:23 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>> Santiago DIEZ <santiago.diez@caoba.fr> writes:
>> > I'm trying to execute postgresql inside a chroot environment.
>> > initdb runs OK
>> > pg_ctl runs OK and server can be queried.
>>
>> > But, the logs show :
>> > 2017-03-21 22:34:03 CET LOG: could not receive test message on socket
>> for
>> > statistics collector: Connection refused
>> > 2017-03-21 22:34:03 CET LOG: disabling statistics collector for lack of
>> > working socket
>>
>> Apparently there's some aspect of your chroot setup that breaks TCP
>> connections to "localhost". You need to fix that ...
>>
>> regards, tom lane
>>
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re:
@ 2017-03-22 13:15 Tom Lane <tgl@sss.pgh.pa.us>
parent: Santiago DIEZ <santiago.diez@caoba.fr>
0 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2017-03-22 13:15 UTC (permalink / raw)
To: Santiago DIEZ <santiago.diez@caoba.fr>; +Cc: pgsql-admin
Santiago DIEZ <santiago.diez@caoba.fr> writes:
> Actually, port 5421 is open for localhost but not on eth0. What puzzles me
> is why psql is resolving localhost to 192.168.1.103 when nc is rightfully
> resolving it to 127.0.0.1:
Maybe the chroot's /etc/hosts file says so?
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2017-03-22 13:15 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21 22:05 Santiago DIEZ <santiago.diez@caoba.fr>
2017-03-22 03:23 ` Re: Tom Lane <tgl@sss.pgh.pa.us>
2017-03-22 08:28 ` Re: Santiago DIEZ <santiago.diez@caoba.fr>
2017-03-22 08:53 ` Re: Santiago DIEZ <santiago.diez@caoba.fr>
2017-03-22 13:15 ` Re: Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox