Closed
Description
The ./msfdb init
command fails to start the database service in a Linux system. It fails with an error.
Steps to reproduce
- git clone the msf repository in a linux system and setup the environment (bundle install)
cd metasploit-framework
, change into installed directory- run
./msfdb init
- Type
no
forinit webservices
, as its not necessary - Check how the script fails with an error message.
Although I am running the MSF through the github repo version, I'm sure this issue would still arise if we install MSF from the installers available online (https://github.com/rapid7/metasploit-framework/wiki/Nightly-Installers)
Expected behavior
The script should continue to initialize the database service.
Current behavior
The script fails with an error.
Error Log:
./msfdb init
[?] Would you like to init the webservice? (Not Required) [no]: no
Clearing http web data service credentials in msfconsole
Running the 'init' command for the database:
Creating database at /home/beleswar/.msf4/db
Starting database at /home/beleswar/.msf4/db...failed
Creating database users
/home/beleswar/.local/share/gem/ruby/3.0.0/gems/pg-1.2.3/lib/pg.rb:58:in `initialize': could not connect to server: Connection refused (PG::ConnectionBad)
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5433?
Metasploit version
Framework: 6.1.24-dev-8e6fa39a93
Console : 6.1.24-dev-8e6fa39a93
Activity