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