My machine
Code:
root@bt:~# uname -a
Linux bt 3.2.6 #1 SMP Fri Feb 17 10:34:20 EST 2012 x86_64 GNU/Linux
Metasploit version:
Code:
msf > version
Framework: 4.6.0-dev.16226
Console  : 4.6.0-dev.16333
ok.. I know the reason but not the solution.
msfconsole is giving me this message:

Code:
root@bt:~# msfconsole
[-] Failed to connect to the database: could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 7337?
could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 7337?
could not connect to server: Connection timed out
	Is the server running on host "localhost" (192.168.56.101) and accepting
	TCP/IP connections on port 7337?
when I try to start framework-postgres manually this is what I get:

Code:
root@bt:~# service framework-postgres start
LOG:  could not bind IPv4 socket: Cannot assign requested address
HINT:  Is another postmaster already running on port 7337? If not, wait a few seconds and retry.
FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=7337001, size=41279488, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 41279488 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
  If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
  The PostgreSQL documentation contains more information about shared memory configuration.
/opt/metasploit/postgresql/scripts/ctl.sh : postgresql  could not be started
When I run update-rc.d to update the start-up script I get the following output

Code:
root@bt:~# update-rc.d framework-postgres defaults
update-rc.d: warning: /etc/init.d/framework-postgres missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
System start/stop links for /etc/init.d/framework-postgres already exist.
root@bt:~# update-rc.d metasploit-postgres defaults
update-rc.d: warning: /etc/init.d/metasploit-postgres missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
System start/stop links for /etc/init.d/metasploit-postgres already exist.
Please some one help.