pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedUnable to connect Postgres using psql while postgres is already running.
3+ messages / 2 participants
[nested] [flat]
* Unable to connect Postgres using psql while postgres is already running.
@ 2018-01-10 09:01 Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
2018-01-10 09:10 ` Re: Unable to connect Postgres using psql while postgres is already running. Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 3+ messages in thread
From: Dinesh Chandra 12108 @ 2018-01-10 09:01 UTC (permalink / raw)
To: pgsql-performance
Hi Expert,
After restarting PostgreSQL Server, I am unable to connect postgres from putty, I am getting error
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
While postgres is already running and also I am able to connect databases from PGAdmin tool but not from command prompt.
Software-postgresql-9.3
Os-Centos
Regards,
Dinesh Chandra
|Database administrator (Oracle/PostgreSQL)| Cyient Ltd. Noida.
------------------------------------------------------------------
Mobile: +91-9953975849 | Ext 1078 |dinesh.chandra@cyient.com<mailto:%7Cdinesh.chandra@cyient.com>
Plot No. 7, NSEZ, Phase-II ,Noida-Dadri Road, Noida - 201 305,India.
________________________________
DISCLAIMER:
This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Check all attachments for viruses before opening them. All views or opinions presented in this e-mail are those of the author and may not reflect the opinion of Cyient or those of our affiliates.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Unable to connect Postgres using psql while postgres is already running.
2018-01-10 09:01 Unable to connect Postgres using psql while postgres is already running. Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
@ 2018-01-10 09:10 ` Laurenz Albe <laurenz.albe@cybertec.at>
2018-01-10 12:42 ` RE: Re: Unable to connect Postgres using psql while postgres is already running. Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
0 siblings, 1 reply; 3+ messages in thread
From: Laurenz Albe @ 2018-01-10 09:10 UTC (permalink / raw)
To: Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>; pgsql-performance
Dinesh Chandra 12108 wrote:
> After restarting PostgreSQL Server, I am unable to connect postgres from putty, I am getting error
>
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
> While postgres is already running and also I am able to connect databases from PGAdmin tool but not from command prompt.
You know that a local connection only works when you are logged in
on the database machine, right?
Is your database listening on port 5432?
Connect as user "postgres" and run the following queries:
SHOW port;
SHOW unix_socket_directories;
That will show the port and the directories where UNIX sockets are created.
You can use a socket directory name with the -h option of psql.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 3+ messages in thread
* RE: Re: Unable to connect Postgres using psql while postgres is already running.
2018-01-10 09:01 Unable to connect Postgres using psql while postgres is already running. Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
2018-01-10 09:10 ` Re: Unable to connect Postgres using psql while postgres is already running. Laurenz Albe <laurenz.albe@cybertec.at>
@ 2018-01-10 12:42 ` Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
0 siblings, 0 replies; 3+ messages in thread
From: Dinesh Chandra 12108 @ 2018-01-10 12:42 UTC (permalink / raw)
To: pgsql-performance
Hi Laurenz Albe,
Thanks for your response.
But file ".s.PGSQL.5432" does not exist .
How can I re-create this or any other option?
Regards,
Dinesh
-----Original Message-----
From: Laurenz Albe [mailto:laurenz.albe@cybertec.at]
Sent: 10 January, 2018 2:41 PM
To: Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>; pgsql-performance@postgresql.org
Subject: [EXTERNAL]Re: Unable to connect Postgres using psql while postgres is already running.
Dinesh Chandra 12108 wrote:
> After restarting PostgreSQL Server, I am unable to connect postgres
> from putty, I am getting error
>
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
> While postgres is already running and also I am able to connect databases from PGAdmin tool but not from command prompt.
You know that a local connection only works when you are logged in on the database machine, right?
Is your database listening on port 5432?
Connect as user "postgres" and run the following queries:
SHOW port;
SHOW unix_socket_directories;
That will show the port and the directories where UNIX sockets are created.
You can use a socket directory name with the -h option of psql.
Yours,
Laurenz Albe
________________________________
DISCLAIMER:
This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Check all attachments for viruses before opening them. All views or opinions presented in this e-mail are those of the author and may not reflect the opinion of Cyient or those of our affiliates.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-01-10 12:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-10 09:01 Unable to connect Postgres using psql while postgres is already running. Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
2018-01-10 09:10 ` Laurenz Albe <laurenz.albe@cybertec.at>
2018-01-10 12:42 ` Dinesh Chandra 12108 <Dinesh.Chandra@cyient.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