msf > db_connect postgresql
[-] Error while running command db_connect: Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?


Call stack:
/opt/framework3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:2028:in `db_connect_postgresql'
/opt/framework3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1731:in `cmd_db_connect'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:331:in `run_command'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:293:in `block in run_single'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:287:in `each'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:287:in `run_single'
/opt/framework3/msf3/lib/rex/ui/text/shell.rb:143:in `run'
/opt/framework3/msf3/msfconsole:130:in `<main>'