Re: Cannot reach pg server using -h localhost

From: Chris Mair <chris(at)1006(dot)org>
To: Fritz Meissner <fritz(dot)meissner(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cannot reach pg server using -h localhost
Date: 2015-07-22 07:23:36
Message-ID: 5d2441947dbe1deb0d07b43ad548f2f0@smtp.hushmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> This is interesting, I tried nc a few times. Inconsistent results:
>
> - most of the time the first line doesn't get through, even after a long wait
> - on sending a second line from the client both lines appear
> instantly, and it's 100% from there on
> - or I can send a line from the server. The first line from client is
> still lost but both ends are 100% after that
> - 1/10 "sessions" behave perfectly

The plot thickens...

Here, on OS X 10.10.4 it works every time and every line entered shows
up in terminal 1 instantly (as it should).

If you ping 127.0.0.1 for some time you do have 0% loss, right?

At this point I'd try to look at the OS X logs. Firewall is off right?
Try to stop other software (any virtualization software, obscure network
tools?)...

What happens if you use the IP of en0, en1, ..., enX... instead of
127.0.0.1?

Rebooting doesn't help (Windows docet)?

When the first line doesn't get through, does it show up in the
Recv-Q Send-Q fields in netstat -an (provided the connection shows
up at all)?

When you keep a third terminal open running sudo tcpdump -n -i lo0
while you do the nc thing, do you see anything?

> BTW ^D just ends the session without sending anything, I'm hitting
> enter to send instead.

Oh yes, I wasn't clear on that...

Bye,
Chris.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fritz Meissner 2015-07-22 10:18:59 Re: Cannot reach pg server using -h localhost
Previous Message Joshua D. Drake 2015-07-22 02:57:20 Re: Setting up HA postgresql