View Issue Details

IDProjectCategoryView StatusLast Update
0001690Kali LinuxKali Package Bugpublic2015-08-31 12:27
ReporterArr0way Assigned Torhertzog  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Product Version1.0.8 
Summary0001690: msfconsole fails to connect to database
Description

msfconsole fails to connect to database from a fully up to date Kali 1.0.8 instance (see screenshot).

Steps To Reproduce

http://i.imgur.com/5gESwRw.png

apt-get update && apt-get dist-upgrade -y && init 6

Start services:

/etc/init.d/metasploit start
/etc/init.d/postgresql start

msfconsole

msf > search smb

[!] Database not connected or cache not built, using slow search

db_status verified the db was not connected (see screenshot).

Additional Information

Useful info

Troubleshooting process


Credentials below taken from: /opt/metasploit/apps/pro/ui/config/database.yml

From msfconsole:

msf > db_connect msf3:mHJnv2LeuIo1KOuqeM87BizAkilHqLep@localhost:5432/msf3
[*] Rebuilding the module cache in the background...

Started another msfconsole:

msf > db_connect -y /opt/metasploit/apps/pro/ui/config/database.yml
[*] Rebuilding the module cache in the background...

^ verifies it's not a permissions issue.

msf > irb
[*] Starting IRB shell...

Metasploit::Framework::Application.config.paths['config/database']
=> ["/opt/metasploit/apps/pro/ui/config/database.yml"]

Workaround:

cp /opt/metasploit/apps/pro/ui/config/database.yml ~/.msf4/database.yml

Attached Files
kali-msf-db-issue.PNG (73,332 bytes)   
kali-msf-db-issue.PNG (73,332 bytes)   

Activities

faildox

faildox

2014-08-27 23:57

reporter   ~0002490

Hi
I assume you have..But may I suggest #~:service postgresql start

I had the same issue as you starting it the same way then I done it as above and I got the normal msfconsole banner?

Not sure this is a bug though, more just human error?

Arr0way

Arr0way

2014-08-29 18:59

reporter   ~0002495

Last edited: 2014-08-29 21:55

Hi,

As far as I know, it makes no difference starting the service using either method does the same. Anyway, I have attempted to start the servicing using your method - just to rule it out (see attached image).

FYI, muts replicated this issue - I wanted to make sure it was not just my kali instance (fresh kali 1.8.0 VMWare image after an apt-get update && apt-get dist-upgrade && init 6)

Also: https://community.rapid7.com/thread/4246

I verified the db credentials are correct and that it's not a perms issue. It would appear msf is ignoring the database.yml file, as it works from ~/.msf4 and when specified via msfconsole (see ticket for details).

LeeRock

LeeRock

2014-08-29 23:21

reporter   ~0002496

I'm having the same issue on both my upgraded Kali and a new install.

rhertzog

rhertzog

2015-08-31 12:27

administrator   ~0003855

This bug is no longer relevant with metasploit-framework and Kali 2.

Issue History

Date Modified Username Field Change
2014-08-24 19:25 Arr0way New Issue
2014-08-24 19:25 Arr0way File Added: kali-msf-db-issue.PNG
2014-08-27 23:57 faildox Note Added: 0002490
2014-08-29 18:58 Arr0way File Added: metasploit-issue-service-start.PNG
2014-08-29 18:59 Arr0way Note Added: 0002495
2014-08-29 19:00 Arr0way Note Edited: 0002495
2014-08-29 21:55 Arr0way Note Edited: 0002495
2014-08-29 23:21 LeeRock Note Added: 0002496
2015-08-31 12:27 rhertzog Note Added: 0003855
2015-08-31 12:27 rhertzog Status new => closed
2015-08-31 12:27 rhertzog Assigned To => rhertzog
2015-08-31 12:27 rhertzog Resolution open => won't fix