<p>i have installed database <strong>postgresql</strong>&nbsp; for storing call details. when i restart database i get the error.</p>
<p>[<strong>root@localhost server]# psql -h 127.0.0.1 -U asterisk Password<br />psql: could not connect to server: Connection refused<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is the server running on host "127.0.0.1" and accepting<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCP/IP connections on port 5432?</strong></p>
<p>&nbsp;</p>
<p>&nbsp;<strong>this is my /var/lib/pgsql/data/postgresql.conf</strong></p>
<p><strong># CONNECTIONS AND AUTHENTICATION<br />#---------------------------------------------------------------------------<br /><br /># - Connection Settings -<br /><br />#listen_addresses = 'localhost'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # what IP address(es) to listen on;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # comma-separated list of addresses;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # defaults to 'localhost', '*' = all<br />port = 5432<br />&nbsp;max_connections = 100<br /># note: increasing max_connections costs ~400 bytes of shared memory per<br /># connection slot, plus lock space (see max_locks_per_transaction).&nbsp; You<br /># might also need to raise shared_buffers to support more connections.<br />#superuser_reserved_connections = 2<br />#unix_socket_directory = ''<br />#unix_socket_group = ''<br />#unix_socket_permissions = 0777&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # octal<br />#bonjour_name = ''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # defaults to the computer</strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>asterisk is not able to make TCP/Ip connection. plz guide me where i am doing wrong.</p>