PDA

View Full Version : Metasploit framework Faild to connect



Jimbas
2016-03-22, 18:55
Hi there,

I'm have this issue and i'm have tried (a lot) in google to solve it, no luck!

when i started the metasploit it gives me this:


A database appears to be already configured, skipping initialization
[-] 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?

[-] WARNING! The following modules could not be loaded!
[-] /root/.msf5/modules/exploits/windows/smb/ms09_050_smb2_negotiate_func_index.rb: Errno::ENOENT No such file or directory @ rb_sysopen - /root/.msf5/modules/exploits/windows/smb/ms09_050_smb2_negotiate_func_index.rb



msf > db_status
postgresql selected, no connection


i have tried to:
service postgresql start

and nothing changes,

also tried

/etc/init.d/postgresql start
[ ok ] Starting postgresql (via systemctl): postgresql.service.

still no luck

any one has any idea how to solve this ?

tks!! =)

grid
2016-03-24, 11:40
I'd check /usr/share/metasploit-framework/config/database.yml and ensure it looks correct. I think the default postgresql credentials for the database are msf msf

If that fails you can try removing & reinstalling.