Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Really appreciate your site. Really good site for learning what others do when they run into problems. You guy's are great!!!..."

Geography

Where in the world do Tek-Tips members come from?
georgesamb (TechnicalUser)
23 Feb 08 18:34
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!
SteveBrett (Programmer)
25 Feb 08 10:13
have you made sure the postmaster is running ?
georgesamb (TechnicalUser)
25 Feb 08 16:27
No, i am a beginner with Postgresql. can you please tell me how to check this?!
stefanwagner (Programmer)
25 Feb 08 18:52
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: http://home.arcor.de/hirnstrom/bewerbung

georgesamb (TechnicalUser)
26 Feb 08 12:39
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!
georgesamb (TechnicalUser)
26 Feb 08 12:56
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!
stefanwagner (Programmer)
27 Feb 08 17:17
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: http://home.arcor.de/hirnstrom/bewerbung

georgesamb (TechnicalUser)
28 Feb 08 8:37
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?!
stefanwagner (Programmer)
29 Feb 08 12:43
No.
It's the OS (Windows) superuser who should not run the postgresql server.

Create an unprivileged windowsuser to run the database.

don't visit my homepage: http://home.arcor.de/hirnstrom/bewerbung

georgesamb (TechnicalUser)
4 Mar 08 6:04
Hi,
i created a user with no administrative rights, but i still can't get it to work... any further suggestions?!
stefanwagner (Programmer)
4 Mar 08 21:53
The same errormessage?

don't visit my homepage: http://home.arcor.de/hirnstrom/bewerbung

georgesamb (TechnicalUser)
5 Mar 08 5:50
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"
gwinn7 (Programmer)
12 Mar 08 12:43
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

georgesamb (TechnicalUser)
14 Mar 08 13:53
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 ?!
gwinn7 (Programmer)
25 Mar 08 8:56
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

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close