Postgresql service errors and Metasploit database (msfdb)

Briefly describe your issue below:

Okay so let me start from the beginning. I wanted to use the wmap tool available with msfconsole, so i loaded up msfconsole and typed in load wmap. The following error was thrown -
[-] Failed to load plugin from /usr/share/metasploit-framework/plugins/wmap: Database not connected (try db_connect)

I investigated further. Checked the db_status which returned:
[*] postgresql selected, no connection

Exited msfconsole and typed in sudo msfdb status. Returned:
[i] No network service running
[+] Detected configuration file (/usr/share/metasploit-framework/config/database.yml)

sudo service postgresql restart and then sudo msfdb reinit threw the following errors:
psql: error: could not connect to server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host “localhost” (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host “localhost” (127.0.0.1) and accepting
TCP/IP connections on port 5432?

All of this led me to conclude that postgresql was not getting setup to listen on 127.0.0.1:5432. An nmap 127.0.0.1 confirmed this further.

I have been trying to debug this issue for a week now any directions to resolve it would be much much much appreciated!

What version of Parrot are you running? (include version (e.g. 4.6), edition(e.g. Home//KDE/OVA, etc.), and architecture (currently we only support amd64)
I am using Parrot Sec 4.9 , KDE plasma version 5.17.5 on amd64

What method did you use to install Parrot? (Debian Standard / Debian GTK / parrot-experimental)
do not remember, if this is important let me know.
Configured to multiboot with other systems? (yes / no)
yes

@dexter-morgan
I can confirm this is still an issue but I have figured out how to resolve it. I reinstalled parrot OS today, dual booted alongside windows without issues. Version 4.10.

Steps:

  1. Fresh install of ParrotOS 4.10
  2. Connected to network, ran “sudo parrot-upgrade”, then rebooted.
  3. Noticed postgresql was not running.
  4. /var/log/postgresql/postgresql-12-main.log showed “FATAL: could not load server certificate file “/etc/ssl/certs/ssl-cert-snakeoil.pem”: No such file or directory”
  5. Regenerated the snakeoil cert with “sudo make-ssl-cert generate-default-snakeoil”
  6. Rebuilt the database “sudo msfdb reinit”
  7. Afterwards I was able to confirm the db was connected to metasploit after launching the console with “db_status”.

I hope this helps!
-Rick