Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIJFo-0002SP-Il for pgsql-general@arkaria.postgresql.org; Mon, 01 Aug 2022 00:25:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oIJFn-0006bC-9F for pgsql-general@arkaria.postgresql.org; Mon, 01 Aug 2022 00:25:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIJFm-0006b3-VA for pgsql-general@lists.postgresql.org; Mon, 01 Aug 2022 00:25:50 +0000 Received: from mail-falcon.ukwebsolutionsdirect.com ([193.189.75.23]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIJFg-0005PY-Vd for pgsql-general@lists.postgresql.org; Mon, 01 Aug 2022 00:25:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=selestial.com; s=default; h=Content-Transfer-Encoding:Content-Type: Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date:MIME-Version:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=I1dY87rl8bIp65LsPt6d3CJHQKbyP0Xtbp3kKxHXNZA=; b=jdIfDa3u4eFcKtEUhaZ29k0RwM wqGkKyU4M7OuvCE8FWOAOAIc4vSfLrLNZXP3pzENLkDakPffdhFv4HOn4YL3m4yk4nQamLRxiCPp1 /dXSYXjQAbXida6qQ2QekrDwnbKJ8cEKwUdYZIuIUlt9zODM+bhCTyXHrr98kWXsx42D5NU1dx6/L VWgdElBtsRlLCCYPDqiZfxrBw8R7jppXe1ADQCqscog/q0aom2o+1JG6iz++pVDPVXX+XN5blesOS kyLcz7VoNTGaN4x6rCTJN+mEpG4g0wZQAgS1S3L5Wyy0Bnn+B8BW/XusnD2vaQ8zpXHs0dulrmW0/ fKmChszg==; Received: from [::1] (port=34824 helo=falcon.ukwebsolutionsdirect.com) by falcon.ukwebsolutionsdirect.com with esmtpa (Exim 4.95) (envelope-from ) id 1oIJFf-0054Uc-VP; Mon, 01 Aug 2022 01:25:43 +0100 MIME-Version: 1.0 Date: Mon, 01 Aug 2022 01:25:43 +0100 From: howardnews@selestial.com To: Tom Lane Cc: Rob Sargent , pgsql-general@lists.postgresql.org Subject: Re: Connecting to postgres on OSX from Swift using PostgresClientKit In-Reply-To: <1504414.1659312172@sss.pgh.pa.us> References: <8b3c9c27-3a13-1a45-b3de-a995a4cbbf19@gmail.com> <55172d40109beb0daee6ad81a97352fe@selestial.com> <1504414.1659312172@sss.pgh.pa.us> User-Agent: Roundcube Webmail/1.5.2 Message-ID: <03427f35037778b0fab1a6bf04297fdb@selestial.com> X-Sender: howardnews@selestial.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - falcon.ukwebsolutionsdirect.com X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - selestial.com X-Get-Message-Sender-Via: falcon.ukwebsolutionsdirect.com: authenticated_id: howardnews@selestial.com X-Authenticated-Sender: falcon.ukwebsolutionsdirect.com: howardnews@selestial.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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