Thread: Cannot connect to postgresql
Hello, I emailed to the group last week about being able to access one of my postgres databases from other machines on my network. I thought the problem was a installation of 8.2.10 that I had been testing an upgrade on had clobbered some of the files that the system needed. I had been testing implementing enabling of ssl, so I thought that I had gotten a partial installation that was causing my password authentication failure. I did a package add on another machine of the same package that was used to load our original 8.2.3 with everything the same. I still can't connect. I think the pg_hba.conf file is fine. Where else should I be looking? Carol Walter
On Tuesday 21 July 2009 10:35:46 Carol Walter wrote: > Hello, > > I emailed to the group last week about being able to access one of my > postgres databases from other machines on my network. I thought the > problem was a installation of 8.2.10 that I had been testing an > upgrade on had clobbered some of the files that the system needed. I > had been testing implementing enabling of ssl, so I thought that I had > gotten a partial installation that was causing my password > authentication failure. I did a package add on another machine of the > same package that was used to load our original 8.2.3 with everything > the same. I still can't connect. I think the pg_hba.conf file is > fine. Where else should I be looking? > > Carol Walter it sounds like either a network issue, or a pg_hba.conf issue. If you send me the following, I'll have a look: - pg_hba.conf file from the target machine (the one you're trying to connect to) - the i.p.'s/hostnames of both boxes - the command you're using to try and connect
> #--------------------------------------------------------------------------- > > # CONNECTIONS AND AUTHENTICATION > #--------------------------------------------------------------------------- > > > # - Connection Settings - > > #listen_addresses = 'localhost' # what IP address(es) to listen > on; > # comma-separated list of addresses; > # defaults to 'localhost', '*' = all > > > listen_addresses = '*' > > #port = 5432 That seems ok. I don't know what OS you use, but check if postgres is listening to port 5432. Also check your firewall settings. -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050
Attachment
I'm running Solaris 10. Carol On Jul 24, 2009, at 3:07 AM, Julius Tuskenis wrote: > >> #--------------------------------------------------------------------------- >> # CONNECTIONS AND AUTHENTICATION >> #--------------------------------------------------------------------------- >> >> # - Connection Settings - >> >> #listen_addresses = 'localhost' # what IP address(es) to >> listen on; >> # comma-separated list of addresses; >> # defaults to 'localhost', '*' = all >> >> >> listen_addresses = '*' >> >> #port = 5432 > That seems ok. I don't know what OS you use, but check if postgres > is listening to port 5432. Also check your firewall settings. > > -- > Julius Tuskenis > Programavimo skyriaus vadovas > UAB nSoft > mob. +37068233050 >
Hello, Carol try command "netstat -l --numeric-ports" to see all ports your system listens to. You should see something like this: tcp 0 0 *:5432 *:* LISTEN If you see the line - your postgres is configured to listen. It is likely to be true as you can connect to postgres localy. Then from other computer try telneting the port. If you will succeed - then I'd say theres something wrong with your pg_hba.conf. Also see postgres log files. Maybe they will tell you what is wrong. Carol Walter rašė: > I'm running Solaris 10. > > Carol > > On Jul 24, 2009, at 3:07 AM, Julius Tuskenis wrote: > >> >>> #--------------------------------------------------------------------------- >>> >>> # CONNECTIONS AND AUTHENTICATION >>> #--------------------------------------------------------------------------- >>> >>> >>> # - Connection Settings - >>> >>> #listen_addresses = 'localhost' # what IP address(es) to >>> listen on; >>> # comma-separated list of addresses; >>> # defaults to 'localhost', '*' = all >>> >>> >>> listen_addresses = '*' >>> >>> #port = 5432 >> That seems ok. I don't know what OS you use, but check if postgres is >> listening to port 5432. Also check your firewall settings. >> >> -- >> Julius Tuskenis >> Programavimo skyriaus vadovas >> UAB nSoft >> mob. +37068233050 >> > > -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050
Attachment
Problem solved. I don't know why! Nothing in the pg_hba.conf file or the postgresql.conf file appeared to be a problem. I was still getting password authorization failures. I thought the password had changed, perhaps, without my knowing it. I changed the password to what it was originally was - and it worked! Then I tried to get into my test database with my test user. It didn't work. Then I reset the password to what it already was and it worked. Then I tried this with several other accounts. It behaved the same way each time. Does anyone know what might have caused this behavior? Carol On Jul 24, 2009, at 1:39 PM, Carol Walter wrote: > I'm running Solaris 10. > > Carol > > On Jul 24, 2009, at 3:07 AM, Julius Tuskenis wrote: > >> >>> #--------------------------------------------------------------------------- >>> # CONNECTIONS AND AUTHENTICATION >>> #--------------------------------------------------------------------------- >>> >>> # - Connection Settings - >>> >>> #listen_addresses = 'localhost' # what IP address(es) to >>> listen on; >>> # comma-separated list of addresses; >>> # defaults to 'localhost', '*' = all >>> >>> >>> listen_addresses = '*' >>> >>> #port = 5432 >> That seems ok. I don't know what OS you use, but check if postgres >> is listening to port 5432. Also check your firewall settings. >> >> -- >> Julius Tuskenis >> Programavimo skyriaus vadovas >> UAB nSoft >> mob. +37068233050 >> > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin