Problem with the database in metasploit

Hi thanks for watching this post, well my problem is in metasploit, when i try to enter at the msfconsole it show this messange “Problem with the database in metasploit (postgresql selected, no connection)”. This is the only problem, i’m try all but i can’t fixed, someone can help me?
the parrot sistem is Linux parrot 4.19.0-parrot1-13t-amd64 #1 SMP Debian 4.19.13-1parrot1.13t (2019-01-09) x86_64 GNU/Linux.
thanks guys and sorry for my english.

=============================================================================
Hola bueno mi problema es el siguiente al momento de ingresar a msfconsole me sale una advertencia sobre que la base de datos no esta conectada (postgresql selected, no connection) ya intente todo pero sigue apareciendome el mismo error alguien sabe como solucionarlo ?
las especificaciones del sistema esta arriba en la parte en ingles :v
bueno gracias de antemano por ayudarme

Take a look in here: Mfsconsole & armitage connetion refused

“”"
In Parrot Security the msf cant connect to postgres on a fresh install.
Msf want to connect to postges on port 5432
You need to change the port from 5433 to 5432
Edit the /etc/postgresql/10/main/postgresql.conf :
`sudo nano /etc/postgresql/11/main/postgresql.conf

Search for port = and change it to 5432
Restart postgresql:
sudo service postgresql restart
that’s it, hope it solves your problem
“”"
This solved my problem with postgresql.

1 Like

Possibly postgres service doesn’t start with system. That is why we have this script

└──╼ $cat /usr/bin/msfconsole-start 
#!/bin/bash
service postgresql start
msfdb init
msfdb start
msfd
msfconsole
3 Likes

Thanks bro, my problem was fixed by you solution.

now the warning is not showing when i try initialize the msfconsole

1 Like

i have all scripts in this route, but the problem already fixed but thanks for you help

I’m glad to have helped you :grinning:

If you do not mind, check the box next to the heart that indicates my answer as a solution so that other people can be helped too.