Metasploit db connection issue

Briefly describe your issue below:

I installed Parrot security OS several moths ago and I used it for a while before realizing that I did not configure metasploit and its database, so I have got no connection between metasploit and postgresql sql.
I have also got this error while doing apt upgrade

The following packages have been kept back:
linux-headers-amd64 linux-image-amd64 python-cffi-backend

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)
It is Parrot security OS based on amd64 architecture

What method did you use to install Parrot? (Debian Standard / Debian GTK / parrot-experimental)
I dont remember is there a way to check?

Configured to multiboot with other systems? (yes / no)
yes, configured without issues
If there are any similar issues or solutions, link to them below:
not yet
If there are any error messages or relevant logs, post them below:
I don’t know where to look for.

Have you done sudo parrot-upgrade? When you type msfconsole what is the error?

looks like postgresql is not run properly. metasploit can not connect to database.
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”?
I checked postgresql config page looks like 5432 port is configured

In /etc/postgresql/12/main/postgresql.conf I see
port = 5432 # (change requires restart)
And yes, everything is updated.

postgresql log file

2020-07-12 17:52:50.897 UTC [4585] FATAL: could not load server certificate file “/etc/ssl/certs/ssl-cert-snakeoil.pem”: No such file or directory
2020-07-12 17:52:50.897 UTC [4585] LOG: database system is shut down
pg_ctl: could not start server
Examine the log output.

Are there any suggestions in addressing this issue?

@fopr.ggame.playing & @disrupt_the_flow
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.


  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 open armitage without issues.

I hope this helps!

Yes thank you.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.