Mfsconsole & armitage connetion refused

Sysinfo:

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

here is the scrrenshots of Armitage

Screenshot%201

i have the same problem !!!

This fixed my issue:

1 Like

sudo msfstart-armitage

I had the same problem, and neither of these options worked for me.

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 :slight_smile:

3 Likes

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

1 Like

I know this is old just wanted to share what I found after receiving this same error in parrot 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

3 Likes

This is a different problem i believe. It could be new postgresql problem about cert. Program updates, structure changes, bugs happen.

This was a huge help I had a problem getting it to work and this got it to work thanks!!

1 Like

Thanks very much - I had the same issue after a fresh install and an update. This fixed it.

its work for me thnx dud :smiley: