0

I am trying to start the postgres erver from the Windows command line but it keeps failing with the same error:

2015-04-14 10:25:19 GST LOG:  could not bind IPv6 socket: No error

2015-04-14 10:25:19 GST HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.

2015-04-14 10:25:19 GST LOG:  could not bind IPv4 socket: No error

2015-04-14 10:25:19 GST HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.

2015-04-14 10:25:19 GST WARNING:  could not create listen socket for "*"

2015-04-14 10:25:19 GST FATAL:  could not create any TCP/IP sockets

I am able to access the server if I try connecting to it from pgAdmin. I do not have any other services running on 5432 since I have checked the Task Manager for apps running on that port.

The command I am using to start is

pg_ctl start -D "C:\Program Files (x86)\PostgreSQL\9.4\data"

but I have also tried

postgres -D "C:\Program Files (x86)\PostgreSQL\9.4\data"

My IPv6 setting are set to dynamic ip while my v4 settings are set to my broadband modem ip. I also disabled Windows Firewall and my antivirus AVG. What am I doing wrong?

closed as off-topic by Jenny D, Sven Apr 14 '15 at 15:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Jenny D, Sven
If this question can be reworded to fit the rules in the help center, please edit the question.

2

The most likely explanation is that there is a service already on that port, but you don't see it in Task Manager because by default it will only show tasks owned by your user.

Check the netstat command's output, when run in an Administrator command prompt.

Also look in services.msc for a postgresql-9.4-x86 service that might be running.

Note that in addition to this issue, PostgreSQL should generally be run as a Windows service. Use pg_ctl register to create a service if one does not exist.

If you want to run PostgreSQL by hand, I suggest initdbing your own data directory, rather than re-using the one created by the installer. You can otherwise run into problems with file permissions if you switch back to running as a service later.

Not the answer you're looking for? Browse other questions tagged or ask your own question.