Solved: [!] postgresql selected, no connection error [!]
Simply just follow this steps
$ sudo msfconsol
msf > msfdb start
[*] exec: msfdb start
msf > db_status
[*] postgresql selected, no connection
msf > msfdb init
[*] exec: 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
msf > db_status
[*] postgresql selected, no connection
msf > db_connect -y /usr/share/metasploit-framework/config/database.yml
[*] Rebuilding the module cache in the background…
msf > db_status
[*] postgresql connected to msf
You Are Done!!!
thanks bro, it worked
ReplyDeleteThanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. PostgreSQL NULL value
ReplyDeleteDidnt work, it says this:-
ReplyDeletedb_status
[*] postgresql selected, no connection
msf5 > msfdb init
[*] exec: msfdb init
Metasploit running on Kali Linux as root, using system database
A database appears to be already configured, skipping initialization
msf5 > db_connect -y /usr/share/metasploit-framework/config/database.yml
Connected to the database specified in the YAML file.
msf5 > db_status
[*] postgresql selected, no connection
Try to run it with your normal account(user), not root account
Deleteworthless
ReplyDeleteTry to run it with your normal account(user), not root account
DeleteCheck if Postgresql is not staying started. Check /var/log/postgres/ for perms error on the below file and change the perms if you are running as root:
ReplyDeletechmod 0640 /etc/ssl/private/ssl-cert-snakeoil.key
systemctl start postgresql
Check postgres logs again for no errors...
Continue on to msfconsole.
thanks man
ReplyDelete