Re: [asterisk-users] Using unix socket to connect with database

2010-05-22 Thread Deepesh D
Hello,

I tried removing the dbhost and dbport entries and restarting asterisk.

During startup the following warnings are shown and it gets stuck up
at this point for a few seconds.
WARNING[1819]: res_config_pgsql.c:1367 parse_config: PostgreSQL
RealTime: No database host found, using localhost via socket.
WARNING[1819]: res_config_pgsql.c:1383 parse_config: PostgreSQL
RealTime: No database port found, using 5432 as default.

But there is no connection being made to the database.


On Sat, May 22, 2010 at 3:25 AM, Kevin P. Fleming kpflem...@digium.com wrote:
 On 05/21/2010 02:48 AM, Deepesh D wrote:

 I am using asterisk realtime with a postgresql database on the same server.

 In res_pgsql.conf I have specified
 [general]
 dbhost=localhost
 dbport=5432
 dbname=asteriskdb
 dbuser=psql
 dbsock=/tmp/.s.PGSQL.5432

 Since both asterisk and db are on same server, I would like asterisk
 to connect to db using the local unix socket. However asterisk is not
 using the local unix socket to connect to database, it is making a tcp
 connection with the db. Is there anyway I can force asterisk to use
 the unix socket for db connection?

 You've specified *both* a socket to be used and a hostname/port number.
 The way the code is written, if both are supplied, the host/port
 combination is used and the socket path is ignored. If you don't want
 the host/port to be used, don't specify them.

 --
 Kevin P. Fleming
 Digium, Inc. | Director of Software Technologies
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 skype: kpfleming | jabber: kflem...@digium.com
 Check us out at www.digium.com  www.asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using unix socket to connect with database

2010-05-22 Thread Kevin P. Fleming
On 05/22/2010 02:07 AM, Deepesh D wrote:

 I tried removing the dbhost and dbport entries and restarting asterisk.
 
 During startup the following warnings are shown and it gets stuck up
 at this point for a few seconds.
 WARNING[1819]: res_config_pgsql.c:1367 parse_config: PostgreSQL
 RealTime: No database host found, using localhost via socket.
 WARNING[1819]: res_config_pgsql.c:1383 parse_config: PostgreSQL
 RealTime: No database port found, using 5432 as default.
 
 But there is no connection being made to the database.

What version of Asterisk are you using?

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kflem...@digium.com
Check us out at www.digium.com  www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using unix socket to connect with database

2010-05-22 Thread Deepesh D
I am using Asterisk 1.6.2.7

On Sat, May 22, 2010 at 7:20 PM, Kevin P. Fleming kpflem...@digium.com wrote:
 On 05/22/2010 02:07 AM, Deepesh D wrote:

 I tried removing the dbhost and dbport entries and restarting asterisk.

 During startup the following warnings are shown and it gets stuck up
 at this point for a few seconds.
 WARNING[1819]: res_config_pgsql.c:1367 parse_config: PostgreSQL
 RealTime: No database host found, using localhost via socket.
 WARNING[1819]: res_config_pgsql.c:1383 parse_config: PostgreSQL
 RealTime: No database port found, using 5432 as default.

 But there is no connection being made to the database.

 What version of Asterisk are you using?

 --
 Kevin P. Fleming
 Digium, Inc. | Director of Software Technologies
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 skype: kpfleming | jabber: kflem...@digium.com
 Check us out at www.digium.com  www.asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using unix socket to connect with database

2010-05-22 Thread Kevin P. Fleming
On 05/22/2010 09:22 AM, Deepesh D wrote:
 I am using Asterisk 1.6.2.7
 
 On Sat, May 22, 2010 at 7:20 PM, Kevin P. Fleming kpflem...@digium.com 
 wrote:
 On 05/22/2010 02:07 AM, Deepesh D wrote:

 I tried removing the dbhost and dbport entries and restarting asterisk.

 During startup the following warnings are shown and it gets stuck up
 at this point for a few seconds.
 WARNING[1819]: res_config_pgsql.c:1367 parse_config: PostgreSQL
 RealTime: No database host found, using localhost via socket.
 WARNING[1819]: res_config_pgsql.c:1383 parse_config: PostgreSQL
 RealTime: No database port found, using 5432 as default.

 But there is no connection being made to the database.

 What version of Asterisk are you using?

Well... after looking over the code, it seems that the support for
connecting directly via a socket is incomplete and/or broken. I would
suggest opening an issue on issues.asterisk.org to report that this does
not work. Please include a console log with 'core set debug 10' and
ensure that your console log channel includes the 'debug' level.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kflem...@digium.com
Check us out at www.digium.com  www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Using unix socket to connect with database

2010-05-21 Thread Deepesh D
Hello,

I am using asterisk realtime with a postgresql database on the same server.

In res_pgsql.conf I have specified
[general]
dbhost=localhost
dbport=5432
dbname=asteriskdb
dbuser=psql
dbsock=/tmp/.s.PGSQL.5432

Since both asterisk and db are on same server, I would like asterisk
to connect to db using the local unix socket. However asterisk is not
using the local unix socket to connect to database, it is making a tcp
connection with the db. Is there anyway I can force asterisk to use
the unix socket for db connection?

Thanks

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using unix socket to connect with database

2010-05-21 Thread Kevin P. Fleming
On 05/21/2010 02:48 AM, Deepesh D wrote:

 I am using asterisk realtime with a postgresql database on the same server.
 
 In res_pgsql.conf I have specified
 [general]
 dbhost=localhost
 dbport=5432
 dbname=asteriskdb
 dbuser=psql
 dbsock=/tmp/.s.PGSQL.5432
 
 Since both asterisk and db are on same server, I would like asterisk
 to connect to db using the local unix socket. However asterisk is not
 using the local unix socket to connect to database, it is making a tcp
 connection with the db. Is there anyway I can force asterisk to use
 the unix socket for db connection?

You've specified *both* a socket to be used and a hostname/port number.
The way the code is written, if both are supplied, the host/port
combination is used and the socket path is ignored. If you don't want
the host/port to be used, don't specify them.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kflem...@digium.com
Check us out at www.digium.com  www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users