Whenever I search for an exploit in msfconsole, it shows a message [*] module database cache not built yet and after 1-2 minutes it shows search results, same database problem with armitage when I issue a command :

root@kali# service postgresql start

and then armitage it again shows a database misconfiguration error. How to resolve?

Metasploit error part 1 Metasploit error part 2

  • What is the actual error you're seeing? – Seth Jun 14 '17 at 6:04
  • Here i am providing two links since i am not allowed to upload a screenshot due to insufficient reputations. i.stack.imgur.com/f0Rlk.jpg (for armitage) i.stack.imgur.com/bdihJ.jpg (for metasploit) – daya Jun 15 '17 at 9:20
  • Did you try to run the suggested commands in the message box and/or tried to check the database.yml? – Seth Jun 15 '17 at 10:38
  • No, in which directory I should check database. yml? – daya Jun 15 '17 at 11:02
  • Should be somewhere in the metasploit directory. But did you simply run the init command? – Seth Jun 16 '17 at 5:14

To check whenever your metasploit is connected to the database, run the following command:


If metasploit is connected to the database, run the following command to rebuild the cache:


Rebuilding the cache takes some time.

Taken from: Fix metasploit “Database not connected or cache not built”

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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