From: howardnews@selestial.com
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Rob Sargent <robjsargent@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Connecting to postgres on OSX from Swift using PostgresClientKit
Date: Mon, 01 Aug 2022 01:25:43 +0100
Message-ID: <03427f35037778b0fab1a6bf04297fdb@selestial.com> (raw)
In-Reply-To: <1504414.1659312172@sss.pgh.pa.us>
References: <ee4efe672cd7b7909c68caf8a82c3ba9@selestial.com>
<8b3c9c27-3a13-1a45-b3de-a995a4cbbf19@gmail.com>
<55172d40109beb0daee6ad81a97352fe@selestial.com>
<1504414.1659312172@sss.pgh.pa.us>
On 2022-08-01 01:02, Tom Lane wrote:
> howardnews@selestial.com writes:
>> On 2022-07-31 23:42, Rob Sargent wrote:
>>> On 7/31/22 16:40, howardnews@selestial.com wrote:
>>>> I can successfully connect using psql and/pgadmin, but when I try
>>>> and connect in code I get the following error:
>>>> [Connection-1 Severe] Unable to connect socket: Error Code:
>>>> -9989(0x2705), Operation not permitted
>
>>> Maybe add config.host = "localhost"?
>
>> Thanks, tried localhost, 127.0.0.1 and ::128. No joy
>
> Don't know much about Swift, but it wouldn't surprise me if that
> code is running in some kind of sandbox that disallows IP
> connections by default.
>
Swift/Xcode is new to me too!
> Also, does psql work when you say "psql -h localhost"? It's
> possible that your server isn't listening on localhost, or
> there's a firewall there. Your working connections could all be
> via Unix sockets, from what little you've said so far.
>
> regards, tom lane
Using psql, i can successfully connect to localhost. In the
postgresql.conf the listen address is *.
The application was installed from the EDB installer; not sure about
firewalls on sandboxes in this situation.
Howard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: howardnews@selestial.com, tgl@sss.pgh.pa.us, robjsargent@gmail.com
Subject: Re: Connecting to postgres on OSX from Swift using PostgresClientKit
In-Reply-To: <03427f35037778b0fab1a6bf04297fdb@selestial.com>
References: <ee4efe672cd7b7909c68caf8a82c3ba9@selestial.com> <8b3c9c27-3a13-1a45-b3de-a995a4cbbf19@gmail.com> <55172d40109beb0daee6ad81a97352fe@selestial.com> <1504414.1659312172@sss.pgh.pa.us> <03427f35037778b0fab1a6bf04297fdb@selestial.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox