Re: Postgres intermittent connection errors: psql.bin: could not connect to server: Cannot assign requested address

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Vamsi Patchipulusu <vpatchipulusu(at)equinix(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, Danjue Li <danli(at)equinix(dot)com>, Rashmi Panthangi <rpanthangi(at)equinix(dot)com>, Lakshmi Yarlagadda <lyarlagadda(at)equinix(dot)com>
Subject: Re: Postgres intermittent connection errors: psql.bin: could not connect to server: Cannot assign requested address
Date: 2017-05-16 06:00:56
Message-ID: CAKFQuwaneLQ2e4EVq7yf5wV+Gc5Ht70M2Z1_Wrqkx2JXhxE5kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday, May 15, 2017, Vamsi Patchipulusu <vpatchipulusu(at)equinix(dot)com>
wrote:
>
> Error: psql.bin: could not connect to server: Cannot assign
> requested address
>
> Is the server running on host "abchost.corp.xyz.com"
> (xxx.xxx.xxx.xxx) and accepting
>
> TCP/IP connections on port 5432?
>
> Jmeter is the tool we are using for orchestrating the tests. It executes
> a shell script on 50 concurrent threads.
>
The shell script does the following:
>
> a) Connects to postgres database server using psql.
>
> b) Issues a single select statement on table with 200 rows .
>
> c) Writes the results to a text file.
>
Jmeter client and database host are sitting in the same data center.
>
Database OS: RedHat 6.x,
>
> DB Version: Postgres 9.6
>
> Database is of decent config. 16 CPU, 64GB RAM, SAN storage.
>
As you noted this is a client-side error so server specs are immaterial
unless the client and server are the same machine.

> While some calls are failing with the error*: psql.bin: could not
> connect to server: Cannot assign requested address*
>
> Other calls are successful around the same timeframe may be one to two
> seconds later..
>
This points to an O/S problem, possibly configuration. Or it might just be
a problem with JMeter. In any case failing to bind to an address
sporadically isn't really something psql can be blamed for.

Googling jmeter for this turns up a variety of programs and scripts that
seem to have this problem when run within JMeter. Exploring those
results may prove fruitful.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-05-16 06:29:26 Re: Postgres intermittent connection errors: psql.bin: could not connect to server: Cannot assign requested address
Previous Message Tom Lane 2017-05-16 05:58:32 Re: Text value within composite function result not quoted