Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo msfdb init [i] Database already started [i] The database appears to be already configured, skipping initialization #19468

Open
littletyger76 opened this issue Sep 18, 2024 · 1 comment
Labels
question Questions about Metasploit Usage Stale Marks an issue as stale, to be closed if no action is taken

Comments

@littletyger76
Copy link

┌──(kali㉿kali)-[~]
└─$ sudo msfdb

Manage the metasploit framework database

You can use an specific port number for the
PostgreSQL connection setting the PGPORT variable
in the current shell.

Example: PGPORT=5433 msfdb init

msfdb init # start and initialize the database
msfdb reinit # delete and reinitialize the database
msfdb delete # delete database and stop using it
msfdb start # start the database
msfdb stop # stop the database
msfdb status # check service status
msfdb run # start the database and run msfconsole

┌──(kali㉿kali)-[~]
└─$ sudo msfdb start
[i] Database already started

┌──(kali㉿kali)-[~]
└─$ sudo msfdb status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: disabled)
Active: active (exited) since Tue 2024-09-17 22:22:25 EDT; 20min ago
Invocation: c2f06f775eab48f8b1d53f11b7d53f51
Process: 890 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 890 (code=exited, status=0/SUCCESS)

Sep 17 22:22:25 kali systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
Sep 17 22:22:25 kali systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
postgres 718 postgres 5u IPv6 6902 0t0 TCP localhost:5432 (LISTEN)
postgres 718 postgres 6u IPv4 6903 0t0 TCP localhost:5432 (LISTEN)

UID PID PPID C STIME TTY STAT TIME CMD
postgres 718 1 0 22:22 ? Ss 0:00 /usr/lib/postgresql/15

[+] Detected configuration file (/usr/share/metasploit-framework/config/database.yml)

┌──(kali㉿kali)-[~]
└─$ sudo msfdb init
[i] Database already started
[i] The database appears to be already configured, skipping initialization

┌──(kali㉿kali)-[~]
└─$ msfconsole -q
msf6 > db_status
[*] postgresql selected, no connection
msf6 >

I am having the issue with no connection. I have gone to several websites to try and fix the problem. Where it says, preset: disabled, I have noticed that in researching solutions, I don't see that in other responses. I have also seen where it's an issue with Metasploit where they need to come up with a fix. I have seen a lot of issues in my research and have tried to do a number of things. Any help would be appreciated. Thanks in advance.

Tammy

@littletyger76 littletyger76 added the question Questions about Metasploit Usage label Sep 18, 2024
Copy link

Hi!

This issue has been left open with no activity for a while now.

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

@github-actions github-actions bot added the Stale Marks an issue as stale, to be closed if no action is taken label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions about Metasploit Usage Stale Marks an issue as stale, to be closed if no action is taken
Projects
None yet
Development

No branches or pull requests

1 participant