Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't start psql.exe

Status
Not open for further replies.

georgesamb

Technical User
Mar 6, 2006
13
DE
Hallo!
i have a problem with my postgresql. I used it last time last week and everything worked as usual. But today i get the error"could not connect to server: Connection refused (0x0000274D/10061)Is the server running on host "???" and accepting TCP/IP connections on port 5432?". How can i check if this has been changed and change the configurations so that it works again.
Thanks in advance!
 
No, i am a beginner with Postgresql. can you please tell me how to check this?!
 
psql.exe sounds like Windows.
The server is (should be) running on the same machine?
There should be a section "start services" in Windows, where you can specify to start it (now, allways).

The clickpath might depend on the windows version (vista, me, xp, server2000 ...)

don't visit my homepage:
 
okay, i have been looking around in other forums for a similar problem but still didn't find a solution. So, here are some more Information.
1. I'm running Postgresql as a service on my note-book under win xp pro sp2.

2. I chekced postgres.conf and the configuration is as follows:
# - Connection Settings -
listen_addresses = 'localhost'
port = 5432
max_connections = 100

3. I'm using Zonealarm firewall, but Postgres is authorized on 127.0.0.1:5432. It's been working fine for the last month since installtion and i didn't change any configuration. I stopped both zonealarm and the windows firewall but still success, so i guess it's not a firewall problem.

4. I tried to ping the server using "ping 127.0.0.1" which was successful.

5. I tried to connect to the host with telnet using "telnet 127.0.0.1 5432" but i couldn't connect.

As i said before everything was working fine and i didn't make any changes. I unistalled zonealarm and reinstalled it, but the problem is still there. One thing which I 'n not sure if it has to do with this or not is that i installed VMware player on my laptop. This is the one thing i have recently changed. Does this have to do with my problem?! I unistalled VMware, but no success?
Any suggestion or help is really appreciated!
 
Hi again, just a quick update. I just checked if the service is running, but i wasn't started. I tried to start it from the console but i got the following error:
C:\Programme\PostgreSQL\8.1\bin>pg_ctl.exe runservice -N "pgsql-8.1" -D "C:\Programme\PostgreSQL\8.1\data\"
pg_ctl: could not start service "pgsql-8.1": error code 1063
what does this mean?! Thanks!
 
I'm running Postgresql on linux, but I found by searching for error 1063:
"postmaster starting by a user with administrative permissions is not permitted.
The server must be started under an unprivileged user ID to prevent possible system security compromises."

Solution:
1. Create a new user and make it a member only of the Users group.
2. In Services set Log On for the PostgreSQL Service the newly created user.

don't visit my homepage:
 
I tried to create a new user using createuser.exe but it didn't work. I got the error"could not connect to server: Connection refused (0x0000274D/10061)Is the server running on host "???" and accepting TCP/IP connections on port 5432?". Is there some other way to creat a new user?!
 
Hi,
i created a user with no administrative rights, but i still can't get it to work... any further suggestions?!
 
yes i still get the same error: C:\Programme\PostgreSQL\8.1\bin\pg_ctl.exe runservice -N "pgsql-8.1" -D "C:\Programme\PostgreSQL\8.1\data\"
pg_ctl: could not start service "pgsql-8.1": error code 1063

when i try starting using
C:\Programme\PostgreSQL\8.1\bin>pg_ctl start -D "C:\Programme\PostgreSQL\8.1\dat
a\"
pg_ctl: invalid data in PID file "C:/Programme/PostgreSQL/8.1/data/postmaster.pi
d
 
Rather than tinkering with parameters, why not just uninstall and re-install Postgres?

We are running Postgres on a couple of our Windows servers here and it runs fine.

Remember, there are two users needed at bare minimum. The first is the Windows User Account and the next is the default postgres account (well at least that is what I setup.).

You need the Windows account to run the service and the next account to at least operate Postgres through its user interfaces once its running.

The friendly Postgres installer should setup the user account for you, but you may have to add an attribute to the user account to make it a service account, or allowed to launch services.

Once that is going, as you mentioned earlier, make it so your clients can access the database remotely through both the ...

postgresql.conf and the pg_hba.conf files.

Good luck,

Gary
gwinn7

 
Well, will i lose the data in my database if i uninstall and reinstall Postgres?! My last backup was about a month ago and i don't want to lose the new data?! Is Will it help if i backup the Data folder as in the parameter - D while starting the service ?!
 
Wow, sorry for the delayed response, but here it goes...

My experience with uninstalling is that I never lost the 'data' folder which is, by default, where the databases are kept. However, I would make a backup copy of your data folder just in case your experience differs before uninstalling. Just get a portable drive of some type and copy it. If you reinstall postgres with the same version, then it should be able to remount the data folder with no problem.

I make no warranties about my advice and I don't think any other contributor does either.

Best of luck,

Gary
gwinn7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top