pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpsql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13]
6+ messages / 2 participants
[nested] [flat]
* psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13]
@ 2021-10-27 15:51 Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 15:58 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 6+ messages in thread
From: Jérémy Garniaux @ 2021-10-27 15:51 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi,
After experiencing issues related to the existence of two different
PostgreSQL versions installed on the same machine, I decided to do a
"remove --purge postgresql*" and reinstall postgresql-13. Now the output
of "psql --version" is "psql (PostgreSQL) 13.4 (Ubuntu 13.4-1)".
However, trying to enter psql, I have this error:
psql: error: could not connect to server: Aucun fichier ou dossier de ce
type
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I assume this has been asked many times, but I tried different solutions
proposed on similar posts and none solved my issue.
Thanks,
Best regards
Jeremy
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13]
2021-10-27 15:51 psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
@ 2021-10-27 15:58 ` Adrian Klaver <adrian.klaver@aklaver.com>
2021-10-27 16:01 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Klaver @ 2021-10-27 15:58 UTC (permalink / raw)
To: Jérémy Garniaux <jeremy@mapper.fr>; pgsql-general@lists.postgresql.org
On 10/27/21 08:51, Jérémy Garniaux wrote:
> Hi,
>
> After experiencing issues related to the existence of two different
> PostgreSQL versions installed on the same machine, I decided to do a
> "remove --purge postgresql*" and reinstall postgresql-13. Now the output
> of "psql --version" is "psql (PostgreSQL) 13.4 (Ubuntu 13.4-1)".
> However, trying to enter psql, I have this error:
>
> psql: error: could not connect to server: Aucun fichier ou dossier de ce
> type
> Is the server running locally and accepting
> connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
>
> I assume this has been asked many times, but I tried different solutions
> proposed on similar posts and none solved my issue.
Same response as to your SO question:
What is the output of pg_lsclusters?
>
> Thanks,
>
> Best regards
>
> Jeremy
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13]
2021-10-27 15:51 psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 15:58 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Adrian Klaver <adrian.klaver@aklaver.com>
@ 2021-10-27 16:01 ` Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 17:30 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 6+ messages in thread
From: Jérémy Garniaux @ 2021-10-27 16:01 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi Adrian,
Thanks for answering on both sides!
Le 27/10/2021 à 17:58, Adrian Klaver a écrit :
> On 10/27/21 08:51, Jérémy Garniaux wrote:
>> Hi,
>>
>> After experiencing issues related to the existence of two different
>> PostgreSQL versions installed on the same machine, I decided to do a
>> "remove --purge postgresql*" and reinstall postgresql-13. Now the
>> output of "psql --version" is "psql (PostgreSQL) 13.4 (Ubuntu
>> 13.4-1)". However, trying to enter psql, I have this error:
>>
>> psql: error: could not connect to server: Aucun fichier ou dossier de
>> ce type
>> Is the server running locally and accepting
>> connections on Unix domain socket
>> "/var/run/postgresql/.s.PGSQL.5432"?
>>
>> I assume this has been asked many times, but I tried different
>> solutions proposed on similar posts and none solved my issue.
>
> Same response as to your SO question:
>
> What is the output of pg_lsclusters?
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
13 main 5433 online postgres
/var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13]
2021-10-27 15:51 psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 15:58 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Adrian Klaver <adrian.klaver@aklaver.com>
2021-10-27 16:01 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
@ 2021-10-27 17:30 ` Adrian Klaver <adrian.klaver@aklaver.com>
2021-10-27 19:51 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Klaver @ 2021-10-27 17:30 UTC (permalink / raw)
To: Jérémy Garniaux <jeremy@mapper.fr>; pgsql-general@lists.postgresql.org
On 10/27/21 9:01 AM, Jérémy Garniaux wrote:
> Hi Adrian,
>
> Thanks for answering on both sides!
>
>>
>> Same response as to your SO question:
>>
>> What is the output of pg_lsclusters?
> 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
> 13 main 5433 online postgres
> /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log
>
>
Your Postgres 13 cluster is up and listening on 5433.
Your choices:
1) Connect using psql -d <some_db> -U <some_user> -p 5433
2) Open:
sudo vi /etc/postgresql/13/main/postgresql.conf
and change
port = 5433
to
port = 5432
and then restart server.
While you are at it:
sudo pg_dropcluster 12 main
to get rid of the orphaned cluster.
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13]
2021-10-27 15:51 psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 15:58 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Adrian Klaver <adrian.klaver@aklaver.com>
2021-10-27 16:01 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 17:30 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Adrian Klaver <adrian.klaver@aklaver.com>
@ 2021-10-27 19:51 ` Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 22:17 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 6+ messages in thread
From: Jérémy Garniaux @ 2021-10-27 19:51 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org
Adrian,
Le 27/10/2021 à 19:30, Adrian Klaver a écrit :
>
> Your Postgres 13 cluster is up and listening on 5433.
>
> Your choices:
>
> 1) Connect using psql -d <some_db> -U <some_user> -p 5433
>
>
> 2) Open:
>
> sudo vi /etc/postgresql/13/main/postgresql.conf
>
> and change
>
> port = 5433
>
> to
>
> port = 5432
>
> and then restart server.
>
>
> While you are at it:
>
> sudo pg_dropcluster 12 main
>
> to get rid of the orphaned cluster.
Great, thanks for your help. Everything is back in order now.
I found out about Pg clusters in the process!
Best regards,
Jeremy
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13]
2021-10-27 15:51 psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 15:58 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Adrian Klaver <adrian.klaver@aklaver.com>
2021-10-27 16:01 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 17:30 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Adrian Klaver <adrian.klaver@aklaver.com>
2021-10-27 19:51 ` Re: psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
@ 2021-10-27 22:17 ` Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Klaver @ 2021-10-27 22:17 UTC (permalink / raw)
To: Jérémy Garniaux <jeremy@mapper.fr>; pgsql-general@lists.postgresql.org
On 10/27/21 12:51, Jérémy Garniaux wrote:
> Adrian,
>
> Le 27/10/2021 à 19:30, Adrian Klaver a écrit :
>> While you are at it:
>>
>> sudo pg_dropcluster 12 main
>>
>> to get rid of the orphaned cluster.
>
> Great, thanks for your help. Everything is back in order now.
>
> I found out about Pg clusters in the process!
Just to be clear the commands I showed are specific to the Debian/Ubuntu
Postgres packaging.
>
> Best regards,
>
> Jeremy
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-10-27 22:17 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 15:51 psql could not connect to server after complete reinstallation [Ubuntu 21.10 / PostgreSQL 13] Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 15:58 ` Adrian Klaver <adrian.klaver@aklaver.com>
2021-10-27 16:01 ` Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 17:30 ` Adrian Klaver <adrian.klaver@aklaver.com>
2021-10-27 19:51 ` Jérémy Garniaux <jeremy@mapper.fr>
2021-10-27 22:17 ` Adrian Klaver <adrian.klaver@aklaver.com>
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