Re: Connection problems with "psql -h localhost postgres"
От | Tom Lane |
---|---|
Тема | Re: Connection problems with "psql -h localhost |
Дата | |
Msg-id | 18572.1115047044@sss.pgh.pa.us обсуждение исходный текст |
Ответ на |
Connection problems with "psql -h localhost |
Список | pgsql-novice |
Wayne Pierce <shalofin@gmail.com> writes: > I have PostgreSQL setup and everything is working fine when I use > "psql -d <dbName>" on the command line or when I use mod_python to > connect. However I when I use "psql -h localhost <dbName> postgres" I > get the following error: > psql: could not connect to server: Connection refused > Is the server running on host "localhost" and accepting > TCP/IP connections on port 5432? This is a kernel-level refusal: your connection request never got to the postmaster at all, ergo the contents of pg_hba.conf etc are irrelevant. Assuming you did start the postmaster with tcpip_socket enabled, the only other possibility I know of is that the kernel is refusing the connection because of packet filtering rules. Check your firewall setup and see what sort of restrictions are imposed on localhost connections. You at least want to allow traffic to/from port 5432, and may want to loosen it up more while you are at it. regards, tom lane
В списке pgsql-novice по дате отправления: