By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Server doesn't listen

P: 70
hi,

i have postgresql 8.1 and it was running very well but to store another database i copied the data folder of another database to C:\Program Files\PostgreSQL\8.1\ on my system then started service but as soon as i type the password to connect to the postgre,its showes a window named Server not listing, in which following messages is showing

Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
If you encounter this message, please check if the server you're trying to .......


i m not able to get what is the problem.
Feb 26 '07 #1
Share this Question
Share on Google+
5 Replies


Expert 100+
P: 534
Did you look whether postgresql.conf you copied needs an update w.r.t. port number and other parameters?
Feb 26 '07 #2

gauravgmbhr
100+
P: 107
ITS because u copied data from a different machine
it has a different settings of pg_hba.conf and possibaly postgre.cong

U need to add ur Own IP machine(given By 127.0.0.1), or may be port number:5432 to the conf files

next time when u want to copy data from another data base
try using the backup option(by ri8 clicking on the database) and creating a compressed backup and then moving the backup file
then creating a DB (with same name as the old one or the one u copied the dfata from )on the machine u wish to shift the data and then rib clicking on that database then use the restore option to get all data
Mar 1 '07 #3

P: 5
I think my problem is similar to the other persons in this thread.
I also am not fully versed in the ways of the sql.
I am attempting to reinstall from a windows gone bad problem.
XP had "died" and unable bootinto os, so there was no backup or copy database made.

Have installed new hdd. copied most all of the old hdd to a "backup" folder on new hdd. I know of the program files ms sql data subdir.
System state.
XP professional , not sharing on network, so is like standalone pc.
sql is 8.0 ( the downloaded version that was part of the installation of a precreated data base.)
XP is now sp2 I do not think it was prior.
I copied the contents of the old data folder to the new folder, overwriting the install created db files.
error given when running data base is
This program cannot connect to your database file, cuttingedge_xpo.
Please make sure that your database is started and start Program again.

I contacted the “support” people of the db and they said a sql db cannot be moved / recovered except by back up and restore, which is impossible in this case.
I cannot believe a db product is “unrecoverable” from this.
Did I miss any other sql files like configs or is this just not possible.
I do not want to retype a lot.
May 31 '07 #4

Expert 100+
P: 534
First make sure that your database server can be started.
If it is setup as Windows service it should start automatically, if not you can start it with pg_ctl

Bring up the Windows Task Manager and check if postgres.exe is listed among running processes.

You may also need to check on pg_hba.conf and postgresql.conf
Both files are located in the database directory (something like C:\Program Files\PostgreSQL\8.1\data)

Follow these links for more information on authentication and connection parameters
http://www.postgresql.org/docs/8.1/s...ntication.html
http://www.postgresql.org/docs/8.1/s...onnection.html

If server is running but you still cannot connect look at the database log, see if there are any messages there about rejected connections.
Then post all relevant info, including pg_hba.conf, postgresql.conf, the exact error message you are getting, and describe how exactly you trying to connect (psql at the DOS prompt, PGAdmin, some other application, etc)
Jun 5 '07 #5

P: 1
In case you are using Windows 2000/XP check the properties of the user created when installed Postgres; for example, for the user 'postgres', you must set the option the "password never expires..." Once you have changed that, in Start -->Postgres 8.1-->click on Reload configuration.
Next in Control Panel...go to Services... and restart Postgres.

other thing to change can be the mask for your IP in pg_hba.conf: if there are some changes to the network, check your mask and change it. Example:

Mask 255.255.255.255 mask=32
Mask 255.0.0.0 mask=8
Mask = 255.255.0.0 mask =16

Hope it helps...
Dec 11 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.