[Asterisk-Users] PostgreSQL

Steven Critchfield critch at basesys.com
Wed May 26 06:54:19 MST 2004


On Wed, 2004-05-26 at 08:40, Fabio Donaggio wrote:
> Hi to all!!
> 
> Here's my problem:
> 
> [cdr_pgsql.so] => (PostgreSQL CDR Backend)
>   == Parsing '/etc/asterisk/cdr_pgsql.conf': Found
> May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:298 my_load_module: cdr_pgsql:
> Unable to connect to database server localhost.
> Calls will not be logged!
> May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:299 my_load_module: cdr_pgsql:
> Reason: could not connect to server:
> Connection refused
>         Is the server running on localhost and accepting
>         TCP/IP connections on port 5432?
> 
> Anyone can help me??? Anyone have some suggest about this or about how to
> connect PostgreSQL to Asterisk???
> Thanks!

Seems it told you pretty clear that it could not establish a connection
to your postgresql server. I suggest you start by checking that it is
running, that it is accessible via TCP/IP(maybe use nmap), and that you
can connect to it with 'psql -h localhost'. 

Most likely you are not configured to answer TCP/IP. Look in
/etc/postgresql/postgresql.conf for something like 'tcpip_socket = true'
and 'port = 5432'. You may also need to have '-i' in POSTMASTER_OPTIONS
under postmaster.conf. There is still the possibility then that you
don't have the proper pg_hba.conf entry to allow connects in. Don't
forget to restart postgres after your config changes so they take
effect. I'm not sure how much it will allow to change when you kill -HUP
it.
-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list