Linux parrot 4.18.0-parrot8-amd64 #1 SMP Parrot 4.18.6-1parrot8 (2018-09-07) x86_64 GNU/Linux
msfconsole
[-] Failed to connect to the database: 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?
Armitage have same problem i have not faced such type of problem before
why this is happaning this time .can any have solution for this problem
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/10/main/postgresql.conf
Search for port = and chage it to 5432
Restart postgresql: sudo service postgresql restart
thats it, hope it is solve your problem
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 chage it to 5432
Restart postgresql: sudo service postgresql restart
thats it, hope it is solve your problem
I know this is old just wanted to share what I found after receiving this same error in parrot 4.10
Steps:
Fresh install of ParrotOS 4.10
Connected to network, ran “sudo parrot-upgrade”, then rebooted.
Noticed postgresql was not running.
/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”
Regenerated the snakeoil cert with “sudo make-ssl-cert generate-default-snakeoil”
Rebuilt the database “sudo msfdb reinit”
Afterwards I was able to confirm the db was connected to metasploit after launching the console with “db_status”.