I've installed Kali Linux from the windows store, and have been trying to get postgresql to run, but it doesn't work. I've googled it, and lots of people have the same kind of error but none have the same one as me. This is the error message I get:

'''Starting PostgreSQL 12 database server: mainError: /usr/lib/postgresql/12/bin/pg_ctl /usr/lib/postgresql/12/bin/pg_ctl start -D /var/lib/postgresql/12/main -l /var/log/postgresql/postgresql-12-main.log -s -o -c config_file="/etc/postgresql/12/main/postgresql.conf" exited with status 1: 2020-05-13 11:24:14.677 DST [4603] LOG: starting PostgreSQL 12.2 (Debian 12.2-4) on x86_64-pc-linux-gnu, compiled by gcc (Debian 9.3.0-8) 9.3.0, 64-bit 2020-05-13 11:24:14.678 DST [4603] LOG: could not bind IPv4 address "": Address already in use 2020-05-13 11:24:14.678 DST [4603] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2020-05-13 11:24:14.678 DST [4603] WARNING: could not create listen socket for "localhost" 2020-05-13 11:24:14.678 DST [4603] FATAL: could not create any TCP/IP sockets 2020-05-13 11:24:14.679 DST [4603] LOG: database system is shut down pg_ctl: could not start server Examine the log output. ... failed! failed!'''

  • 1
    Hello Ali. That's not very readable. Please take a moment to format it. (Paste the text, select it, and click {} on the formatting bar.) – roaima May 13 '20 at 10:31
  • 1
    > HINT: Is another postmaster already running on port 5432? – Jeff Schaller May 13 '20 at 11:01

There it says clearly...

"could not bind IPv4 address" "Is another postmaster already running on port 5432

Try with this.

ss -putona | grep 5432


nmap localhost -Pn -p 5432 -sV

And verify that there is nothing running on that port.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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