Results 1 to 8 of 8

Thread: Msfconsole/Armitage (Db Connections) Dead!

  1. #1
    Junior Member L21ZIFER's Avatar
    Join Date
    Nov 2011
    Posts
    47

    Default Msfconsole/Armitage (Db Connections) Dead!

    What happened?

    I fired up my BT5 like usual and tried to launch armitage,
    which I did yesterday without any problems. And I did nothing, which could be connected
    with MySQL or similar.

    So, launching Armitage says that I should check my connection and msfconsole
    is not connected to the db. db_driver doesn't exist as a command anymore btw.

    I can start mysqld and it is running.

    My error log says
    Code:
    120326 15:32:04 [ERROR] Plugin 'InnoDB' init function returned error.
    120326 15:32:04 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    120326 15:32:04 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
    120326 15:32:04 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    120326 15:32:04 [ERROR] Aborting
    
    120326 15:32:04 [Note] mysqld: Shutdown complete
    
    120326 15:35:53 [Note] Plugin 'FEDERATED' is disabled.
    120326 15:35:53  InnoDB: Initializing buffer pool, size = 8.0M
    120326 15:35:53  InnoDB: Completed initialization of buffer pool
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    120326 15:35:53  InnoDB: Retrying to lock the first data file
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    
    ...
    
    
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    120326 15:37:33  InnoDB: Unable to open the first data file
    InnoDB: Error in opening ./ibdata1
    120326 15:37:33  InnoDB: Operating system error number 11 in a file operation.
    InnoDB: Error number 11 means 'Resource temporarily unavailable'.
    InnoDB: Some operating system error numbers are described at
    InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html
    InnoDB: Could not open or create data files.
    InnoDB: If you tried to add new data files, and it failed here,
    InnoDB: you should now edit innodb_data_file_path in my.cnf back
    InnoDB: to what it was, and remove the new ibdata files InnoDB created
    InnoDB: in this failed attempt. InnoDB only wrote those files full of
    InnoDB: zeros, but did not yet use them in any way. But be careful: do not
    InnoDB: remove old data files which contain your precious data!
    120326 15:37:33 [ERROR] Plugin 'InnoDB' init function returned error.
    120326 15:37:33 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    mysqld: Too many arguments (first extra is 'stop').
    Use --verbose --help to get a list of available options
    120326 15:37:33 [ERROR] Aborting
    
    120326 15:37:33 [Note] mysqld: Shutdown complete
    So what to do?
    Btw, I have only 4GB of HDD left.

  2. #2
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Msfconsole/Armitage (Db Connections) Dead!

    Looking at the first new lines it seems it is trying to start up a mysql server instance but finding port 3306 already in use (likely mysql DB already started).

    Have you done a ps looking for mysqld to see if it's running?
    Have you done a netstat to see if something is already listening on 3306?
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  3. #3
    Junior Member L21ZIFER's Avatar
    Join Date
    Nov 2011
    Posts
    47

    Default Re: Msfconsole/Armitage (Db Connections) Dead!

    So,

    launching msfconsole cries out:
    Code:
     Failed to connect to the database: could not connect to server: Connection refused
    	Is the server running on host "localhost" and accepting
    	TCP/IP connections on port 7337?
    could not connect to server: Connection refused
    	Is the server running on host "localhost" and accepting
    	TCP/IP connections on port 7337?
     {"adapter"=>"postgresql", "database"=>"msf3dev", "username"=>"msf3", "password"=>"c7e20780", "port"=>7337, "host"=>"localhost", "pool"=>256, "timeout"=>5} ["/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:968:in `initialize'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:968:in `new'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:968:in `connect'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in `initialize'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `block (2 levels) in checkout'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `block in checkout'", "/opt/metasploit/ruby/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'", "/opt/metasploit/msf3/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'", "/opt/metasploit/msf3/lib/active_record/base.rb:1271:in `columns'", "/opt/metasploit/msf3/lib/active_record/base.rb:1284:in `column_names'", "/opt/metasploit/msf3/lib/active_record/base.rb:1297:in `column_methods_hash'", "/opt/metasploit/msf3/lib/active_record/base.rb:1986:in `block in all_attributes_exists?'", "/opt/metasploit/msf3/lib/active_record/base.rb:1986:in `each'", "/opt/metasploit/msf3/lib/active_record/base.rb:1986:in `all?'", "/opt/metasploit/msf3/lib/active_record/base.rb:1986:in `all_attributes_exists?'", "/opt/metasploit/msf3/lib/active_record/base.rb:1842:in `method_missing'", "/opt/metasploit/msf3/lib/msf/core/model/workspace.rb:70:in `default'", "/opt/metasploit/msf3/lib/msf/core/db.rb:198:in `default_workspace'", "/opt/metasploit/msf3/lib/msf/core/db_manager.rb:161:in `connect'", "/opt/metasploit/msf3/lib/msf/ui/console/driver.rb:195:in `initialize'", "/opt/metasploit/msf3/msfconsole:134:in `new'", "/opt/metasploit/msf3/msfconsole:134:in `<main>'"]
    ps -ef | grep mysql
    Code:
    root      2186  1816  0 16:02 pts/0    00:00:00 grep --color=auto mysql
    and netstat -l 7337
    Code:
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State      
    tcp6       0      0 [::]:www                [::]:*                  LISTEN     
    udp        0      0 *:bootpc                *:*                                
    udp        0      0 *:bootpc                *:*                                
    udp        0      0 *:bootpc                *:*                                
    Active UNIX domain sockets (only servers)
    Proto RefCnt Flags       Type       State         I-Node   Path
    unix  2      [ ACC ]     STREAM     LISTENING     12313    /tmp/ssh-MVMolF1540/agent.1540
    unix  2      [ ACC ]     STREAM     LISTENING     12349    /tmp/.ICE-unix/1592
    unix  2      [ ACC ]     STREAM     LISTENING     12348    @/tmp/.ICE-unix/1592
    unix  2      [ ACC ]     STREAM     LISTENING     12358    /tmp/orbit-root/linc-63f-0-2a40f1ce89f6e
    unix  2      [ ACC ]     STREAM     LISTENING     12580    /tmp/orbit-root/linc-638-0-6ec8ee1391024
    unix  2      [ ACC ]     STREAM     LISTENING     12620    /tmp/orbit-root/linc-645-0-5a07b99d3e97e
    unix  2      [ ACC ]     STREAM     LISTENING     11157    /tmp/keyring-O3fIBx/control
    unix  2      [ ACC ]     STREAM     LISTENING     1834     @/com/ubuntu/upstart
    unix  2      [ ACC ]     STREAM     LISTENING     11158    /tmp/keyring-O3fIBx/ssh
    unix  2      [ ACC ]     STREAM     LISTENING     12630    /tmp/keyring-O3fIBx/pkcs11
    unix  2      [ ACC ]     STREAM     LISTENING     11248    /tmp/orbit-root/linc-656-0-24b2b5a7af478
    unix  2      [ ACC ]     STREAM     LISTENING     12830    /tmp/orbit-root/linc-652-0-5d0e2be34e011
    unix  2      [ ACC ]     STREAM     LISTENING     11451    /tmp/.X11-unix/X0
    unix  2      [ ACC ]     STREAM     LISTENING     11450    @/tmp/.X11-unix/X0
    unix  2      [ ACC ]     STREAM     LISTENING     12341    @/tmp/dbus-F4uG16Hsf6
    unix  2      [ ACC ]     STREAM     LISTENING     12897    /tmp/orbit-root/linc-65a-0-127e2227e570b
    unix  2      [ ACC ]     STREAM     LISTENING     13413    /tmp/orbit-root/linc-657-0-244d3a5262705
    unix  2      [ ACC ]     STREAM     LISTENING     12927    /tmp/orbit-root/linc-65d-0-4e49b2339a17d
    unix  2      [ ACC ]     STREAM     LISTENING     13513    /tmp/orbit-root/linc-69a-0-325f4fa988a3c
    unix  2      [ ACC ]     STREAM     LISTENING     13595    /tmp/orbit-root/linc-6a6-0-6f5e4f0bac88c
    unix  2      [ ACC ]     STREAM     LISTENING     13025    /tmp/orbit-root/linc-6a5-0-64cb0bd1af457
    unix  2      [ ACC ]     STREAM     LISTENING     13753    /tmp/orbit-root/linc-6b1-0-7087491699774
    unix  2      [ ACC ]     STREAM     LISTENING     13762    /tmp/orbit-root/linc-6b9-0-2f748be0a605b
    unix  2      [ ACC ]     STREAM     LISTENING     13785    /tmp/orbit-root/linc-6b7-0-2931bfe825066
    unix  2      [ ACC ]     STREAM     LISTENING     13855    /tmp/orbit-root/linc-6ba-0-3a90faf66d79
    unix  2      [ ACC ]     STREAM     LISTENING     14544    /tmp/orbit-root/linc-70c-0-37ca519c6ea2
    unix  2      [ ACC ]     STREAM     LISTENING     15699    /tmp/orbit-root/linc-751-0-51bfd9eb1f90d
    unix  2      [ ACC ]     STREAM     LISTENING     9213     /var/run/dbus/system_bus_socket

  4. #4
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Msfconsole/Armitage (Db Connections) Dead!

    msfconsole is trying to use postgresql not mysql. In your first post armitage is trying to use mysql.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  5. #5
    Junior Member L21ZIFER's Avatar
    Join Date
    Nov 2011
    Posts
    47

    Default Re: Msfconsole/Armitage (Db Connections) Dead!

    Quote Originally Posted by thorin View Post
    msfconsole is trying to use postgresql not mysql. In your first post armitage is trying to use mysql.
    Alright Thorin - so if your life is this forum then,

    #mysqld start
    #armitage

    Code:
    Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP Connections.
    ps -ef | grep mysql
    Code:
    root      3508     1  3 16:35 tty1     00:00:00 gedit /var/log/mysql/error.log
    root      3557  3210  0 16:36 pts/0    00:00:00 grep --color=auto mysql
    And how do you recommend, should I repair postgresql asf.?

  6. #6
    Junior Member L21ZIFER's Avatar
    Join Date
    Nov 2011
    Posts
    47

    Default Re: Msfconsole/Armitage (Db Connections) Dead!

    Alright,

    after firing up Synaptic and completely reinstalling everything I had with Metasploit
    everything went green and all my problems were solved.
    Armitage and Msfconsole are ready again.

    And for those, who might come to this thread after days, weeks, months or even years:
    My next try would have been this one:

    Code:
    Most likely the postgresql server is set to listen for unix socket connections and/or connections from localhost only. Look for the following in your postgresql.conf file:
    
    #listen_addresses = 'localhost' # what IP interface(s) to listen on;
                                    # defaults to localhost, '*' = any
    
    You most likely want to change that to:
    
    listen_addresses = '*'
    
    
    That's from an 8.x config file. If you have an older version the terminology is likely different, but the effect is similar.
    Credits to Jeff Frost on this one.

  7. #7
    Junior Member L21ZIFER's Avatar
    Join Date
    Nov 2011
    Posts
    47

    Default Re: Msfconsole/Armitage (Db Connections) Dead!

    Double-post
    Last edited by L21ZIFER; 03-26-2012 at 11:58 AM.

  8. #8
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Msfconsole/Armitage (Db Connections) Dead!

    Yay! Congrats on getting it going again!
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

Similar Threads

  1. Need help.. Got to a Dead end. BTHomeHub phonetap
    By Dellk in forum OLD BackTrack 4 General Support
    Replies: 0
    Last Post: 01-01-2010, 06:31 PM
  2. Milw0rm Dead?
    By mcd1992 in forum OLD Pentesting
    Replies: 7
    Last Post: 11-21-2009, 10:33 PM
  3. Dead Harddrive?
    By 7ELEVEN in forum OLD General IT Discussion
    Replies: 5
    Last Post: 11-09-2008, 10:51 PM
  4. im not dead....
    By shamanvirtuel in forum OLD General IT Discussion
    Replies: 11
    Last Post: 08-02-2007, 04:03 AM

Posting Permissions

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