[Asterisk-Users] Asterisk with PostgreSQL
asterisk at spindrift.on.ca
asterisk at spindrift.on.ca
Thu Jun 24 08:36:03 MST 2004
Looks like PostgreSQL is running in UNIX local socket mode (which is
default) and does not allow incoming TCP/IP connections even for
localhost. Did you check for "tcpip_socket = true" line in your
postgresql.conf file (it is /var/lib/pgsql/data/ directory on my
system)? You can also check permissions in pg_hba.conf in the same
directory.
Ivan Gostev
Caleb Kow wrote:
> Hello Everybody,
>
> I am trying to configure Asterisk to listen into a database which is
> created in PostgreSQL. Whenever asterisk starts up, it is unable to
> connect to the pg database and gives the following error:
>
> [cdr_pgsql.so] => (PostgreSQL CDR Backend)
> == Parsing '/etc/asterisk/cdr_pgsql.conf': Found
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:284 my_load_module:
> cdr_pgsql: got hostname of localhost
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:285 my_load_module:
> cdr_pgsql: got port of 5432
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:288 my_load_module:
> cdr_pgsql: got user of asteriskpg
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:289 my_load_module:
> cdr_pgsql: got dbname of asteriskpgcdr
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:290 my_load_module:
> cdr_pgsql: got password of 65plesk
> Jun 24 21:20:53 ERROR[1074494336]: cdr_pgsql.c:298 my_load_module:
> cdr_pgsql: Unable to connect to database server localhost. Calls will
> not be logged!
> Jun 24 21:20:53 ERROR[1074494336]: cdr_pgsql.c:299 my_load_module:
> cdr_pgsql: Reason: could not connect to server: Connection refused
> Is the server running on host localhost and accepting
> TCP/IP connections on port 5432?
>
> However, the strange thing is that when I try to connect to this
> database using the command prompt, it puts me through! :) Only when
> Asterisk tries to connect to the postgresql database does it not work.
> Any idea why this is happening?
>
> Many thanks in advance
>
> Cheers
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
> .
>
More information about the asterisk-users
mailing list