0

I run Windows and I am trying to install postgres, but I can't get it to work. During installation, I get the error:

Failed to load sql modules into the database cluster

When I try to access the server in pgadmin or via SQL Shell, I get the error:

could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?"

I have found a log in the data-folder saying:

2021-04-08 14:53:44.315 CEST [11088] LOG:  starting PostgreSQL 13.2, compiled by Visual C++ build 1914, 64-bit
2021-04-08 14:53:44.321 CEST [11088] LOG:  could not listen on IPv6 address "::": Permission denied
2021-04-08 14:53:44.326 CEST [11088] LOG:  could not listen on IPv4 address "0.0.0.0": Permission denied
2021-04-08 14:53:44.327 CEST [11088] WARNING:  could not create listen socket for "*"
2021-04-08 14:53:44.328 CEST [11088] FATAL:  could not create any TCP/IP sockets
2021-04-08 14:53:44.331 CEST [11088] LOG:  database system is shut down

Can someone please help me?

4
  • What installer are you using? Commented Apr 8, 2021 at 16:34
  • @jjanes I don't know, sorry, I use a link provided by my university: enterprisedb.com/downloads/postgres-postgresql-downloads I choose version 13.2, Windows x86-64 Commented Apr 8, 2021 at 20:09
  • That is the major installer for Windows. I've used it many times. Did you do this from a privileged account or an ordinary account? Can you find an installation-specific log file, like maybe c:/Program Files/PostgreSQL/13/installation_summary.log Commented Apr 9, 2021 at 1:17
  • I solved it, it worked to create a new Windows user called postgres and install it as that user Commented Apr 9, 2021 at 9:17

1 Answer 1

0

I had the same issue and followed different tips and tricks available on the internet but nothing worked.

I fixed that issue by following these steps:

  1. First disable antivirus for an hour
  2. Create a folder in either C drive or D drive and give full permission to User
  3. Then again install a fresh application. If you have already installed then uninstall that and install from starting.
  4. Make sure to choose that folder only at the time of installation
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.