Results 1 to 16 of 16

Thread: No connection to Database for metasploit after update - solution

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by zabeehullah View Post
    "db_connect -y /etc/dradis/database.yml" it would be working for every kali 2.0 user.
    DO NOT DO THIS..

    This is linking the use of a 3rd party application (database) into Metasploit & progresql.

    If you are using Kali 2 or kali rolling, use msfdb init
    Code:
    root@kali:~# msfdb init
    Creating database user 'msf'
    Enter password for new role: 
    Enter it again: 
    Creating databases 'msf' and 'msf_test'
    Creating configuration file in /usr/share/metasploit-framework/config/database.yml
    Creating initial database schema
    root@kali:~#
    As you can see - it will create the database file for you /usr/share/metasploit-framework/config/database.yml
    ...if something goes wrong, msfdb reinit
    This is a Kali-Linux support forum - not general IT/infosec help.

    Useful Commands: OS, Networking, Hardware, Wi-Fi
    Troubleshooting: Kali-Linux Installation, Repository, Wi-Fi Cards (Official Docs)
    Hardware: Recommended 802.11 Wireless Cards

    Documentation: http://docs.kali.org/ (Offline PDF version)
    Bugs Reporting & Tool Requests: https://bugs.kali.org/
    Kali Tool List, Versions & Man Pages: https://tools.kali.org/

  2. #2
    Join Date
    2014-Oct
    Posts
    7
    Quote Originally Posted by g0tmi1k View Post
    DO NOT DO THIS..

    This is linking the use of a 3rd party application (database) into Metasploit & progresql.

    If you are using Kali 2 or kali rolling, use msfdb init
    Code:
    root@kali:~# msfdb init
    Creating database user 'msf'
    Enter password for new role: 
    Enter it again: 
    Creating databases 'msf' and 'msf_test'
    Creating configuration file in /usr/share/metasploit-framework/config/database.yml
    Creating initial database schema
    root@kali:~#
    As you can see - it will create the database file for you /usr/share/metasploit-framework/config/database.yml
    ...if something goes wrong, msfdb reinit

    I'm facing this problem, and i did all that.. but the connection keep failing..

    Code:
    [-] Failed to connect to the database: could not connect to server: Connection refused
    	Is the server running on host "localhost" (::1) and accepting
    	TCP/IP connections on port 5432?
    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 5432?
    
                                                      
    
                     _---------.
                 .' #######   ;."
      .---,.    ;@             @@`;   .---,..
    ." @@@@@'.,'@@            @@@@@',.'@@@@ ".
    '-.@@@@@@@@@@@@@          @@@@@@@@@@@@@ @;
       `.@@@@@@@@@@@@        @@@@@@@@@@@@@@ .'
         "--'.@@@  -.@        @ ,'-   .'--"
              ".@' ; @       @ `.  ;'
                |@@@@ @@@     @    .
                 ' @@@ @@   @@    ,
                  `.@@@@    @@   .
                    ',@@     @   ;           _____________
                     (   3 C    )     /|___ / Metasploit! \
                     ;@'. __*__,."    \|--- \_____________/
                      '(.,...."/
    
    
    Taking notes in notepad? Have Metasploit Pro track & report
    your progress and findings -- learn more on http://rapid7.com/metasploit
    
           =[ metasploit v4.11.5-2016010401                   ]
    + -- --=[ 1517 exploits - 875 auxiliary - 257 post        ]
    + -- --=[ 437 payloads - 37 encoders - 8 nops             ]
    + -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
    
    msf > db_status [*] postgresql selected, no connection
    :\ tks!!

  3. #3
    Join Date
    2014-Oct
    Posts
    7
    Hey, after 2 days i've found the solution here.

    https://forums.kali.org/showthread.p...mitage-problem

    tks, it worked.

Similar Threads

  1. setoolkit + metasploit database
    By zurek in forum General Archive
    Replies: 2
    Last Post: 2013-12-17, 20:18
  2. Metasploit update: IP connection failure
    By Swift in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2013-11-23, 10:45

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •