msfdb creation problem

here is the problem
each time i try to create or reinitialize my msfdb it fails at creating schema
below is the error code i get , any help i get will be deeply appreciated

#msfdb reinit
[i] Database already started
[+] Dropping databases ‘msf’
[+] Dropping databases ‘msf_test’
[+] Dropping database user ‘msf’
[+] Deleting configuration file /usr/share/metasploit-framework/config/database.yml
[+] Stopping database
[+] Starting database
[+] Creating database user ‘msf’
[+] Creating databases ‘msf’
[+] Creating databases ‘msf_test’
[+] Creating configuration file ‘/usr/share/metasploit-framework/config/database.yml’
[+] Creating initial database schema
rake aborted!
NoMethodError: undefined method without' for #<Bundler::Settings:0x000055c302f507b0> Did you mean? with_options /usr/share/metasploit-framework/Rakefile:18:inrescue in <top (required)>’
/usr/share/metasploit-framework/Rakefile:12:in <top (required)>' /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in<top (required)>’

Caused by:
LoadError: cannot load such file – rspec/core
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require' /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire_with_backports’
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in block in require' /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:inload_dependency’
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in require' /usr/share/metasploit-framework/Rakefile:13:in<top (required)>’
/usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>’
(See full trace by running task with --trace)

1 Like

I dont know what cause the error, i am also interested :thinking:
But if i check the db_status, it shows me that “connected”
you can check this at: msfconsole > db_status

This still seems to be an issue.

The resolution can be found here:


My issue was Postgresql has changed its default port.

Hi,
Do you have any news about this ?
I got a similar problem with the last version

Thank you in advance