Page 1 of 1

On server machine, unable to connect to 'localhost'

PostPosted: Mon Apr 12, 2010 8:05 pm
by DrewOnTilt
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

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

PostPosted: Tue Apr 13, 2010 8:34 am
by kraada
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.

highfalutin