Postgres Unable to Connect

If you encounter the "Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 7337?" error while you are installing Metasploit, you may already have an existing PostgreSQL database installed on the machine. This issue commonly occurs when you have Nexpose installed on the same system.

If you already have a Postgres server installed, you will need to specify a different database server port for Metasploit to use. You can do this during the installation process. Instead of using the default port for the database server, you can specify a different port on the screen shown below.