Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After installing Ubuntu 12.10, I tried intalling Metasploit (ruby already installed).

First, I get:

[-] Failed to connect to the database: 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 7337?

Then about 30 seconds later it loads the metasploit console, however after trying:

msfupdate

I get this:

msf > sudo msfupdate
[*] exec: sudo msfupdate

[*]
[*] Attempting to update the Metasploit Framework...
[*]

[-] https://localhost:3790 (note, Metasploit Community
[-] Edition is totally free and takes just a few seconds
[-] to register!)
[-] ERROR: Failed to update Metasploit installation

[-] In order to update your Metasploit installation,
[-] you must first register it through the UI, here:

This would be fine, however I cannot access localhost on any ports?! Earlier when I tried installing Utorrent, I couldn't access localhost:8080 so I had to uninstall that.

Every local.host I try to visit returns

Firefox can't establish a connection to the server at https://localhost:XXXX.

Why can't I do anything?!

share|improve this question

The error message explained why:

[-] Failed to connect to the database: 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 7337?

You don't have a database running and accepting connections on port 7337.

Until you confirm that you have a server running and listening on a particular port, there's no point in trying to connect to that port. Of course it will fail.

share|improve this answer
1  
@Seananners netstat -lnt | grep 7337 is your friend here. – Rich Homolka Mar 4 '13 at 19:14
    
Thank you David, but how then can I get my database running? Surely Metasploit would have created this during installation? – Seananners Mar 4 '13 at 19:46
    
What database back end are you using? – David Schwartz Mar 4 '13 at 20:08
    
Currently using Postgres as per installation default. – Seananners Mar 4 '13 at 20:31
    
Okay, so is Postgres running? – David Schwartz Mar 4 '13 at 21:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .