| From: | Tomas Pospisek <tpo2(at)sourcepole(dot)ch> |
|---|---|
| To: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: error: connection to server on socket... |
| Date: | 2023-08-01 10:38:23 |
| Message-ID: | dcaec1bc-c837-9b83-3e12-7c4c80bcd810@sourcepole.ch |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 01.08.23 12: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
> <https://wiki.debian.org/PostgreSql#User_access> 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?
When executing the `sudo` command above:
* as which user are you doing that (you can see that via `id`)?
* in which directory are you executing it (you can see that via `pwd`)?
* what is the home directory of the postgres user (you can see that via
`grep postgres /etc/passwd`)
* what does `ls -ld /var/run/postgresql/; ls -l
/var/run/postgresql/.s.PGSQL.5432` show?
You also wrote:
> I tried this, but to no avail : `sudo systemctl start postgresql`
- what does `journalctl -xeu postgresql` say?
- what does `tail -n 20
/var/log/postgresql/postgresql-*-qgisclouddb.log` show?
*t
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Pospisek | 2023-08-01 10:41:20 | Re: PORT 5432 ERROR |
| Previous Message | Amn Ojee Uw | 2023-08-01 10:25:54 | Re: error: connection to server on socket... |