Thread: cannot connect anymore from a remote host
Hi all, after a crash of my machine I restarted the pgsql as usual, and I can connect from the machine itself, but no more from a remote host. I checked the pg_hba.conf file and it's ok, but either from psql or pgadmin I cannot connect to the host. Nmapping my host I cannot see the daemon listening on the port 5342. I've started the daemon as: postmaster -D /mnt/data/database & and my pg_hba.conf gile contains: local all all trust # IPv4-style local connections: host all all 127.0.0.1 255.255.255.255 trust host all all 192.168.1.0 255.255.255.0 trust host all all 192.168.2.0 255.255.255.0 trust # IPv6-style local connections: host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust Any suggestion? Thanks, Luca
2006/11/9, Luca Ferrari <fluca1978@infinito.it>:
Hi Luca,
Have You checked network interfaces on your machine ? Maybe some of them doesn't start-up properly...
Rgds.
--
-- audi vide sile --
Hi all,
after a crash of my machine I restarted the pgsql as usual, and I can connect
from the machine itself, but no more from a remote host. I checked the
pg_hba.conf file and it's ok, but either from psql or pgadmin I cannot
connect to the host. Nmapping my host I cannot see the daemon listening on
Hi Luca,
Have You checked network interfaces on your machine ? Maybe some of them doesn't start-up properly...
Rgds.
--
-- audi vide sile --
Luca Ferrari wrote: > Hi all, > after a crash of my machine I restarted the pgsql as usual, and I can connect > from the machine itself, but no more from a remote host. I checked the > pg_hba.conf file and it's ok, but either from psql or pgadmin I cannot > connect to the host. Nmapping my host I cannot see the daemon listening on > the port 5342. > I've started the daemon as: > postmaster -D /mnt/data/database & Is that how you normally start your DB server? Not via pg_ctl or your system startup scripts? > and my pg_hba.conf gile contains: If you say it's not listening on port 5432 then the pg_hba.conf doesn't matter. Check your postgresql.conf for valid settings on listen_addresses and port. http://www.postgresql.org/docs/8.1/static/runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SETTINGS Once it's listening on the right port, then look at your pg_hba.conf -- Richard Huxton Archonet Ltd
On Thursday 09 November 2006 15:57 Jeremiasz Miedzinski's cat, walking on the keyboard, wrote: > Have You checked network interfaces on your machine ? Maybe some of them > doesn't start-up properly... Interfaces are ok, and in fact other services on such interface are running correctly. Luca
Richard Huxton <dev@archonet.com> writes: > Luca Ferrari wrote: >> I've started the daemon as: >> postmaster -D /mnt/data/database & > Is that how you normally start your DB server? Ditto. But if you are using a stock postgresql.conf then in fact the postmaster will *not* be listening to TCP with that command line. You need to check listen_addresses or tcpip_socket depending on which Postgres release this is. regards, tom lane
You might want to check the ip tables as well if they have the required entries or not.
Thanks,
-------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
Thanks,
-------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 11/9/06, Richard Huxton <dev@archonet.com> wrote:
Luca Ferrari wrote:
> Hi all,
> after a crash of my machine I restarted the pgsql as usual, and I can connect
> from the machine itself, but no more from a remote host. I checked the
> pg_hba.conf file and it's ok, but either from psql or pgadmin I cannot
> connect to the host. Nmapping my host I cannot see the daemon listening on
> the port 5342.
> I've started the daemon as:
> postmaster -D /mnt/data/database &
Is that how you normally start your DB server? Not via pg_ctl or your
system startup scripts?
> and my pg_hba.conf gile contains:
If you say it's not listening on port 5432 then the pg_hba.conf doesn't
matter. Check your postgresql.conf for valid settings on
listen_addresses and port.
http://www.postgresql.org/docs/8.1/static/runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SETTINGS
Once it's listening on the right port, then look at your pg_hba.conf
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend