I've got a little problem with metasploit and postgresql:

I open up a terminal window and type in "msfconsole" or "msfcli ..." - doesn't matter, just open up metasploit. Everything seems to work normally but there is an error at the top:

[-] Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 7337?
could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 7337?
{"adapter"=>"postgresql", "database"=>"msf3dev", "username"=>"msf3", "password"=>"c80c3cea", "port"=>7337, "host"=>"localhost", "pool"=>256, "timeout"=>5} ["/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:968:in `initialize'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:968:in `new'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:968:in `connect'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in `initialize'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `block (2 levels) in checkout'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `block in checkout'", "/opt/metasploit/ruby/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'", "/opt/metasploit/msf3/lib/active_record/base.rb:1271:in `columns'", "/opt/metasploit/msf3/lib/active_record/base.rb:1284:in `column_names'", "/opt/metasploit/msf3/lib/active_record/base.rb:1297:in `column_methods_hash'", "/opt/metasploit/msf3/lib/active_record/base.rb:1986:in `block in all_attributes_exists?'", "/opt/metasploit/msf3/lib/active_record/base.rb:1986:in `each'", "/opt/metasploit/msf3/lib/active_record/base.rb:1986:in `all?'", "/opt/metasploit/msf3/lib/active_record/base.rb:1986:in `all_attributes_exists?'", "/opt/metasploit/msf3/lib/active_record/base.rb:1842:in `method_missing'", "/opt/metasploit/msf3/lib/msf/core/model/workspace.rb:70:in `default'", "/opt/metasploit/msf3/lib/msf/core/db.rb:197:in `default_workspace'", "/opt/metasploit/msf3/lib/msf/core/db_manager.rb:161:in `connect'", "/opt/metasploit/msf3/lib/msf/ui/console/driver.rb:195:in `initialize'", "/opt/metasploit/msf3/msfconsole:134:in `new'", "/opt/metasploit/msf3/msfconsole:134:in `<main>'"]
He sais that he can't connect to the postgresql database, but I never advised him to do that.
I've made a complete fresh install from the .iso of BT5 R2 and I didn't play around with any metasploit files. I received this error also in BT5 R1 some days before the release of BT5 R2.

It isn't such a big problem, but it really sucks - everytime I start up metasploit the half of my terminal windows is filled up with this error.


- stallhofen -