PDA

View Full Version : Can't connect to the server...



blackrain17
09-08-2010, 12:24 PM
Since yesterday I can't seem to connect to the server and get this message "The following error occurred when trying to open the database: Failed to establish a connection to '127.0.0.1'.<br />
<br />
I downloaded the latest 1.11.05 beta upgrade, opened the "C:\Windows\system32\drivers\etc" and opened the "hosts" file with notepad to check for everything. But still won't work. Any suggestions?

blackrain17
09-08-2010, 10:28 PM
Is there anything else I can do besides these steps? I can't connect to the server...

If youve just recently had a problem where it says Failed to establish a connection to ‘127.0.0.1’ then its most likely due to an update microsoft released for defender. Please try the following to fix it

1: Go to "C:\Windows\system32\drivers\etc" and open the "hosts" file with
notepad

It might look something like this:

PHP Code:
**************************************************
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

::1 localhost
************************************************** ****
2: Enter "127.0.0.1 localhost" (without the quotes) at the bottom of the
file, so it looks like this:

PHP Code:
**************************************************
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
::1 localhost
************************************************** ****



4: Save the file
5: Reboot your PC

Patvs
09-09-2010, 02:17 AM
hosts looks OK





First try to reboot.

If no help, try this:

Start > Programs > PostgreSQL > 8.x > Stop Service

Start > Programs > PostgreSQL > 8.x > Start Service

If that doesnt help delete the \postgresql\8.x\data\postmaster.pid file, if you see it. And reboot.



If that doesn't help you will have to reinstall PostgreSQL completely