[Asterisk-Users] Asterisk with PostgreSQL
Neil Cherry
ncherry at comcast.net
Thu Jun 24 14:44:45 MST 2004
Caleb Kow wrote:
> Results of netstat -ap
You seem to be missing the top part of the output which looks like this:
[root at wolfgang build]# netstat -ap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 *:nfs *:* LISTEN -
tcp 0 0 *:time *:* LISTEN
3339/xinetd
:
: (more of the smae looking lines follow).
Sorry if that wrapped.
>
> Active UNIX domain sockets (servers and established)
> Proto RefCnt Flags Type State I-Node PID/Program
> name Path
> unix 2 [ ACC ] STREAM LISTENING 5881 3623/
> /tmp/.iroha_unix/IROHA
> unix 2 [ ACC ] STREAM LISTENING 3971 3326/
> /var/lib/mysql/mysql.sock
> unix 2 [ ACC ] STREAM LISTENING 6002 3690/
> /tmp/jd_sockV4
> unix 2 [ ACC ] STREAM LISTENING 9522765 24900/httpd
> /var/run/fpcgisock
> unix 2 [ ACC ] STREAM LISTENING 5863 3607/gpm
> /dev/gpmctl
> unix 13 [ ] DGRAM 2839 3171/syslogd
> /dev/log
> unix 2 [ ACC ] STREAM LISTENING 9623759
> 21382/postmaster /tmp/.s.PGSQL.5432
> unix 2 [ ACC ] STREAM LISTENING 6060 3767/
> /tmp/.font-unix/fs7100
> unix 3 [ ] STREAM CONNECTED 9569452 3326/
> /var/lib/mysql/mysql.sock
> unix 3 [ ] STREAM CONNECTED 9569451 24907/
> unix 3 [ ] STREAM CONNECTED 9565499 3326/
> /var/lib/mysql/mysql.sock
> unix 3 [ ] STREAM CONNECTED 9565498 24905/
> unix 3 [ ] STREAM CONNECTED 9565496 3326/
> /var/lib/mysql/mysql.sock
> unix 3 [ ] STREAM CONNECTED 9565495 24908/
> unix 2 [ ] DGRAM 9471559 9212/splogger
> unix 2 [ ] DGRAM 5907 3634/crond
> unix 2 [ ] DGRAM 5826 3598/spamd -d -c -a
> unix 2 [ ] DGRAM 3642 3382/courierlogger
> unix 2 [ ] DGRAM 3621 3371/courierlogger
> unix 2 [ ] DGRAM 3600 3361/courierlogger
> unix 2 [ ] DGRAM 3581 3350/courierlogger
> unix 2 [ ] DGRAM 3225 3273/
> unix 2 [ ] DGRAM 3018 3262/xinetd
> unix 2 [ ] DGRAM 2915 3221/
> unix 2 [ ] DGRAM 2847 3175/klogd
>
> On Thu, 24 Jun 2004 10:11:46 -0400, Neil Cherry <ncherry at comcast.net> wrote:
>
>>
>>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?
>>
>>Can you do a netstat -ap ?
>>
>>--
>>Linux Home Automation Neil Cherry ncherry at comcast.net
>>http://home.comcast.net/~ncherry/ (Text only)
>>http://linuxha.sourceforge.net/ (SourceForge)
>>http://hcs.sourceforge.net/ (HCS II)
>>
>>
>>_______________________________________________
>>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
>>
>
> _______________________________________________
> 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
>
--
Linux Home Automation Neil Cherry ncherry at comcast.net
http://home.comcast.net/~ncherry/ (Text only)
http://linuxha.sourceforge.net/ (SourceForge)
http://hcs.sourceforge.net/ (HCS II)
More information about the asterisk-users
mailing list