Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qQuWl-001MrA-AY for pgsql-general@arkaria.postgresql.org; Tue, 01 Aug 2023 18:55:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qQuWh-009Ul8-Bq for pgsql-general@arkaria.postgresql.org; Tue, 01 Aug 2023 18:55:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qQuWg-009Uky-T4 for pgsql-general@lists.postgresql.org; Tue, 01 Aug 2023 18:55:24 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qQuWc-000ETy-Qt for pgsql-general@lists.postgresql.org; Tue, 01 Aug 2023 18:55:23 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 2CF703200931; Tue, 1 Aug 2023 14:55:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 01 Aug 2023 14:55:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1690916115; x=1691002515; bh=p2jae9ib3yJ0MVO1S2iBVTYW5PnIC0w6Vu8 FGZQn1bw=; b=xDy/EIuDlhIsF7WUxoWm8eDd+RbQKohqTsXT8b8n25ef0X4UrMH jjze2xizztmW4aLeDkC1zDQdL1FFhdtOHtOC3kjrCypKgIk7m3NjOWbdOANndNOx 28E+DYFlvIe9HQg3eGKuf1LhjpuomgS7vov0LGTPwE1d7V74bi/WSPSMVOeSQdcf ZHCJ3tjcsVW6emmIEIhiSj0A3ZuKF/aLYpn1UX+EYX9MCPiW7q1mby1x0GlYtNqY QpTEzSV/WWm1EP7P0eEkJZiHQpvrKTwrogs3wX7QKbWSj4hFkpei4FFYpcAqcj3F 9WfcOIIiRjDq/sP83oPzei0ZnzkNNs+r8oQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1690916115; x= 1691002515; bh=p2jae9ib3yJ0MVO1S2iBVTYW5PnIC0w6Vu8FGZQn1bw=; b=I ZvXcQ4/yn+FZr31pSzH+zVq/otb9epzX2Q0UQRMZoYhKoQL6OKIEkjDOWItit8uj 9EijVt17k3cI5JYd2oVoIyHJQURWy9Y/A9aViGSVBEnMIdn4/McLvp5qBXWK+ezn 2dRtokZTG/gtO9UqqZyaRlbGOXuKr0bdtxgZlOQCg77M+h9pdtva8ze10IeRR+Mg RDXIS7YcV9yLbhLiok9pB27tAa3ad+IPPha+b5lRGwV/IMLjrwno52tUTLq21gFf 16UgIX6sgzrRDGexa4DhPQ5cMHG+mNdy71U7D9o7WtELsvhsib64lT8c9NhXjHTN fD6fk/2KeThMoA13sF59Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrjeeigdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepvdegudethe dtueeitdefffeggfdvhfeuffdvhfehfeffhfekvedtuddtfeefgeevnecuffhomhgrihhn pehpohhsthhgrhgvshhqlhdrohhrghdpuggvsghirghnrdhorhhgnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgv rhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 1 Aug 2023 14:55:14 -0400 (EDT) Message-ID: <11ee7173-cfb6-7f4c-c17b-dcced24e2bc9@aklaver.com> Date: Tue, 1 Aug 2023 11:55:14 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: error: connection to server on socket... Content-Language: en-US To: Amn Ojee Uw , pgsql-general@lists.postgresql.org References: <97d77785-22a0-5d48-9582-4a7beb2dc14f@gmail.com> <863bf07c-6993-ce36-f260-6749ab327632@aklaver.com> <148c784c-8eac-0bae-43c9-f819d265e288@gmail.com> From: Adrian Klaver In-Reply-To: <148c784c-8eac-0bae-43c9-f819d265e288@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/1/23 11:42, Amn Ojee Uw wrote: > Ah! Adrean, here is something interesting. > > /*pg_lsclusters*/ displays the following information > > /*Ver Cluster Port Status                Owner    Data > directory              Log file*//* > *//*12  main    5432 down,binaries_missing postgres > /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log*//* > *//*15  main    5433 online                postgres > /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log*/ > > What is version 12 is doing there, I thought that I had completely > removed it and replaced it with version 15!! You didn't, read: https://www.postgresql.org/message-id/20230731125247.puiaz7fjkfvljdwy%40alvherre.pgsql and https://www.postgresql.org/message-id/33f0fc61-2d0f-60bd-e0ed-4cada3c30301@aklaver.com The clue is "binaries_missing". You remove(ed) all the files except the conf files. > Should I remove that log file? Run: sudo apt purge postgresql-12 That will take care of removing all the conf files. To connect you need to specify the correct port, 5433 or do: sudo vi /etc/postgresql/15/main/postgresql.conf and change port = 5433 to port = 5432 Then restart the server. You then need to spend some time at the links in this message: https://www.postgresql.org/message-id/c1ad730a-a84a-ae97-2f23-6891cb06ef26%40aklaver.com > > Regarding /pf@pfortin.com/ assertion, I am working with a _/Debian 12/_ > machine and /*ls -l /tmp/.s.PGSQL.5432*/ > displays the following error message : /*ls: cannot access > '/tmp/.s.PGSQL.5432': No such file or directory*/ > > As for Tomas Pospisek questions : > * as which user are you doing that (you can see that via `id`)? > > Due to matters of security let us assume that the output is : > /*id*//* > *//*uid=1000(my_account) gid=1000(my_account) > groups=1000(my_account),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),100(users),*/ > /*106(netdev),111(bluetooth),113(lpadmin),116(scanner),122(postgres),1001(tomcat)*/ > > * in which directory are you executing it  (you can see that via `pwd`)? > > /*/home/*//*my_account*/ > > * what is the home directory of the postgres user (you can see that via > `grep postgres /etc/passwd`) /* > */ > > /*~$ grep postgres /etc/passwd*//* > *//*postgres:x:113:122:PostgreSQL > administrator,,,:/var/lib/postgresql:/bin/bash*/ > > * what does `ls -ld /var/run/postgresql/; ls -l > /var/run/postgresql/.s.PGSQL.5432` show? > > /*ls -ld /var/run/postgresql/*//* > *//*drwxrwsr-x 2 postgres postgres 100 Jul 31 20:45 > /var/run/postgresql/*/ > > /*ls -l /var/run/postgresql/.s.PGSQL.5432*//* > *//*ls: cannot access '/var/run/postgresql/.s.PGSQL.5432': No such > file or directory*/ > > > - what does `journalctl -xeu postgresql` say? > > /*sudo journalctl -xeu postgresql*//* > *//*[sudo] password for *//*/**//*my_account*/: *//* > *//*░░ Support: https://www.debian.org/support*//* > *//*░░ *//* > *//*░░ A start job for unit postgresql.service has begun execution.*//* > *//*░░ *//* > *//*░░ The job identifier is 3496.*//* > *//*Jul 31 20:45:13 *//*tree.com systemd[1]: Finished > postgresql.service - PostgreSQL R>*//* > *//*░░ Subject: A start job for unit postgresql.service has finished > successfully*//* > *//*░░ Defined-By: systemd*//* > *//*░░ Support: https://www.debian.org/support*//* > *//*░░ *//* > *//*░░ A start job for unit postgresql.service has finished > successfully.*//* > *//*░░ *//* > *//*░░ The job identifier is 3496.*//* > *//*lines 4-16/16 (END)*/ > > - what does `tail -n 20 > /var/log/postgresql/postgresql-*-qgisclouddb.log` show? > > /*sudo tail -n 20 /var/log/postgresql/postgresql-*-qgisclouddb.log*//* > *//*tail: cannot open > '/var/log/postgresql/postgresql-*-qgisclouddb.log' for reading: No > such file or directory*/ > > > I hope I was able to answer all the interesting questions posted as > reply to my original post. > > /Thanks folks, I really appreciate the time you have dedicated to my > question./ > > > On 8/1/23 10:35 a.m., Adrian Klaver wrote: >> On 8/1/23 03:22, Amn Ojee Uw wrote: >>> Using the following command on my Debian 12 machine: >>> >>> /*sudo apt-get install postgresql postgresql-15 >>> postgresql-client-common postgresql-common postgresql-contrib >>> postgresql-doc phppgadmin >>> */ >>> >>> >>> and following the instruction on this >>> web page I have >>> installed PostgreSQL-15. >>> The installation went smooth, until the following command was issued : >>> >>> /*sudo -u postgres psql*/ >>> >>> ... I get an error message that reads: >>> >>> /*could not change directory to "/home/my_account": Permission >>> denied*//* >>> *//*psql: error: connection to server on socket >>> "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or >>> directory*//* >>> *//*    Is the server running locally and accepting connections on >>> that socket?*/ >>> >>> What can I do to resolve this issue? >> >> Run >> >> pg_lsclusters >> >> and see what port the server is running on. >> >>> >>> Thanks in advance. >>> >> -- Adrian Klaver adrian.klaver@aklaver.com