Обсуждение: Fwd: cannot login to psql without specifying host
Good morning,
--
I run a postgres 9.4.8 standby server, replicating our production server. I can login using our pguser linux login if I specify the host on the command line but cannot login if I leave the host off:
psql -U postgres prime_production -p 5433 -h arprodpsqlreplication01
Password for user postgres:
psql (9.4.8)
Type "help" for help.
psql -U postgres prime_production -p 5433
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.5433"?
I have changed the UNIX_SOCKET_DIRECTORIES to something other than /tmp because we have another instance pointing to that directory. I restarted postgres. Didn't help. I have attached our 3 config files along with an ls -la listing of our database cluster directory. Any insights welcome.
Thank you
Mark Steben
Database Administrator
@utoRevenue | Autobase
CRM division of Dominion Dealer Solutions
95D Ashley Ave.
West Springfield, MA 01089
t: 413.327-3045
f: 413.383-9567
Database Administrator
@utoRevenue | Autobase
CRM division of Dominion Dealer Solutions
95D Ashley Ave.
West Springfield, MA 01089
t: 413.327-3045
f: 413.383-9567
www.fb.com/DominionDealerSolutions
www.twitter.com/DominionDealer
www.drivedominion.com
Вложения
Re: Mark Steben 2018-10-02 <CADyzmyw66x_SgxR=gX+RddQaBgHWVVW=eyNO2w_iygewF+piDw@mail.gmail.com> > *psql -U postgres prime_production -p 5433 * > *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.5433"?* > > I have changed the UNIX_SOCKET_DIRECTORIES to something other than /tmp > because we have another instance pointing to that directory. I restarted > postgres. Didn't help. I have attached our 3 config files along with an > ls -la listing of our database cluster directory. Any insights welcome. You can use "psql -h /database/prime_data/PSQL_94/tmp" to use that socket directory. In practise, that will fail for any user than the cluster owner because that is inside your PGDATA, and that is 0700. Christoph
On Tue, Oct 2, 2018 at 4:12 AM Mark Steben <mark.steben@drivedominion.com> wrote:
Good morning,I run a postgres 9.4.8 standby server, replicating our production server. I can login using our pguser linux login if I specify the host on the command line but cannot login if I leave the host off:psql -U postgres prime_production -p 5433 -h arprodpsqlreplication01Password for user postgres:psql (9.4.8)Type "help" for help.psql -U postgres prime_production -p 5433psql: could not connect to server: No such file or directoryIs the server running locally and acceptingconnections on Unix domain socket "/tmp/.s.PGSQL.5433"?I have changed the UNIX_SOCKET_DIRECTORIES to something other than /tmp because we have another instance pointing to that directory. I restarted postgres. Didn't help. I have attached our 3 config files along with an ls -la listing of our database cluster directory. Any insights welcome.
I've seen this when your postgresql.com "listen_address" isn't sent properly. It's probably something like this:
listen_addresses = '192.168.58.13'
The error message is telling you that Postgres is not listening on localhost. Instead, you may want something like this:
listen_addresses = 'localhost,192.168.58.13'
or this:
listen_addresses = '*'
Craig
Thank you--Mark Steben
Database Administrator
@utoRevenue | Autobase
CRM division of Dominion Dealer Solutions
95D Ashley Ave.
West Springfield, MA 01089
t: 413.327-3045
f: 413.383-9567www.fb.com/DominionDealerSolutions
www.twitter.com/DominionDealer
www.drivedominion.com
---------------------------------
Craig A. James
Chief Technology OfficerCraig A. James
Oh wait, my mistake ...
--
eMolecules, Inc.
---------------------------------
On Tue, Oct 2, 2018 at 8:27 AM Craig James <cjames@emolecules.com> wrote:
On Tue, Oct 2, 2018 at 4:12 AM Mark Steben <mark.steben@drivedominion.com> wrote:Good morning,I run a postgres 9.4.8 standby server, replicating our production server. I can login using our pguser linux login if I specify the host on the command line but cannot login if I leave the host off:psql -U postgres prime_production -p 5433 -h arprodpsqlreplication01Password for user postgres:psql (9.4.8)Type "help" for help.psql -U postgres prime_production -p 5433psql: could not connect to server: No such file or directoryIs the server running locally and acceptingconnections on Unix domain socket "/tmp/.s.PGSQL.5433"?I have changed the UNIX_SOCKET_DIRECTORIES to something other than /tmp because we have another instance pointing to that directory. I restarted postgres. Didn't help. I have attached our 3 config files along with an ls -la listing of our database cluster directory. Any insights welcome.I've seen this when your postgresql.com "listen_address" isn't sent properly. It's probably something like this:listen_addresses = '192.168.58.13'The error message is telling you that Postgres is not listening on localhost. Instead, you may want something like this:listen_addresses = 'localhost,192.168.58.13'or this:listen_addresses = '*'
I didn't see your attached postgresql.conf, which already has this. Ignore my suggestion, there's something else that others probably know more about than me.
Craig
CraigThank you--Mark Steben
Database Administrator
@utoRevenue | Autobase
CRM division of Dominion Dealer Solutions
95D Ashley Ave.
West Springfield, MA 01089
t: 413.327-3045
f: 413.383-9567www.fb.com/DominionDealerSolutions
www.twitter.com/DominionDealer
www.drivedominion.com-----------------------------------eMolecules, Inc.---------------------------------Chief Technology Officer
Craig A. James
---------------------------------
Craig A. James
Chief Technology OfficerCraig A. James