Re: Cannot reach pg server using -h localhost

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Fritz Meissner <fritz(dot)meissner(at)gmail(dot)com>, Chris Mair <chris(at)1006(dot)org>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cannot reach pg server using -h localhost
Date: 2015-07-21 18:25:58
Message-ID: 55AE8EB6.9070702@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/21/2015 11:00 AM, Fritz Meissner wrote:
>> and if you have it listen to 127.0.0.1, you see 127.0.0.1 in netstat?
>
> Yes, netstat reflects exactly what I have in listen_addresses:
>
> listen_addresses = '127.0.0.1, ::1'
>
> ~ netstat -an | grep 5432
> tcp6 0 0 ::1.5432 *.* LISTEN
> tcp4 0 0 127.0.0.1.5432 *.* LISTEN
>
> If it's just '127.0.0.1' it just lists the tcp4 line.
>
>> and psql -h 127.0.0.1 still fails?
>
> Yes.
>
>> is lo0 still there (ifconfig)?
>
> ~ ifconfig lo0
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
> options=3<RXCSUM,TXCSUM>
> inet6 ::1 prefixlen 128
> inet 127.0.0.1 netmask 0xff000000
> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
> nd6 options=1<PERFORMNUD>
>
>

So what happens if you?:

ping 127.0.0.1
ping localhost

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message William Dunn 2015-07-21 18:37:42 Re: Promoting 1 of 2 slaves
Previous Message William Dunn 2015-07-21 18:14:20 Re: Setting up HA postgresql