Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.