On server machine, unable to connect to 'localhost'

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

On server machine, unable to connect to 'localhost'

Postby DrewOnTilt » Mon Apr 12, 2010 8:05 pm

Hi all,

I have PT3 set up on a server. I recently upgraded the server and had to reconfigure my databases, PSQL, and PT3 settings. All is working fine except for one issue: I can connect to the PT3 databases without problem from the workstations by using the server name 192.168.1.20, but I can't connect to 'localhost' from the instance of PT3 that is installed on the server machine. If I remember correctly, the server name should be 'localhost' for PT3 on the server machine.

If I use the IP address 192.168.1.20 instead, I can connect, but I have to enter that IP address every time I add or modify a database.

This does not work:
Image

Image

This works:
Image
DrewOnTilt
 
Posts: 134
Joined: Fri Jan 25, 2008 6:34 pm

Re: On server machine, unable to connect to 'localhost'

Postby kraada » Tue Apr 13, 2010 8:34 am

The problem is that in the pg_hba.conf line the ::1 entry (localhost, for IPv6) is commented out. Click Start --> Programs --> PostgreSQL --> Configuration Files --> Edit pg_hba.conf. In the file that opens, scroll down to find the line that beings # ::1, remove the # sign, save the file, exit out of notepad, then stop and restart the server (via the stop and start server options in Start --> Programs --> PostgreSQL), and then localhost should work for you.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 37 guests

cron