OpenSIPS 1.5.1 with Postgres

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenSIPS 1.5.1 with Postgres

Gordon Ross
I'm trying to get OpenSIPS 1.5.1 running with Postgres (8.1) on SLES10 SP2

I've created the database OK. When I try and start the main OpenSIPS daemon,
I get the following error in /var/log/messages:

Jun 29 11:22:51 a301-sls1-vm3 /usr/local/sbin/opensips[21062]:
ERROR:core:db_check_api: module db_pgsql does not export db_use_table
function
Jun 29 11:22:51 a301-sls1-vm3 /usr/local/sbin/opensips[21062]:
ERROR:auth_db:mod_init: unable to bind to a database driver
Jun 29 11:22:51 a301-sls1-vm3 /usr/local/sbin/opensips[21062]:
ERROR:core:init_mod: failed to initialize module auth_db
Jun 29 11:22:51 a301-sls1-vm3 /usr/local/sbin/opensips[21062]:
ERROR:core:main: error while initializing modules


The error message mentions "db_pgsql", yet the module name & the source code
all refer to "db_postgres". Is this a bug in the code, or something stupid
I've done ?

Thanks,

GTG


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

SOLVED: Re: OpenSIPS 1.5.1 with Postgres

Gordon Ross
On 29/06/2009 15:18, "Gordon Ross" <[hidden email]> wrote:

> I'm trying to get OpenSIPS 1.5.1 running with Postgres (8.1) on SLES10 SP2
>
> I've created the database OK. When I try and start the main OpenSIPS daemon,
> I get the following error in /var/log/messages:
>
> Jun 29 11:22:51 a301-sls1-vm3 /usr/local/sbin/opensips[21062]:
> ERROR:core:db_check_api: module db_pgsql does not export db_use_table
> function
> Jun 29 11:22:51 a301-sls1-vm3 /usr/local/sbin/opensips[21062]:
> ERROR:auth_db:mod_init: unable to bind to a database driver
[snip]

The postgres support is broken in OpenSIP. The module names are incorrect.
I've posted a bug, containing the fix in the bug tracker, bug ID 2814081.

GTG


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOLVED: Re: OpenSIPS 1.5.1 with Postgres

Bogdan-Andrei Iancu
Hi Gordon,

But a postgres URL should look like:

   "postgres://opensips:opensipsrw@localhost/opensips"

This is the intended way of using the postgres DB.

Regards,
Bogdan

Gordon Ross wrote:

> On 29/06/2009 15:18, "Gordon Ross" <[hidden email]> wrote:
>
>  
>> I'm trying to get OpenSIPS 1.5.1 running with Postgres (8.1) on SLES10 SP2
>>
>> I've created the database OK. When I try and start the main OpenSIPS daemon,
>> I get the following error in /var/log/messages:
>>
>> Jun 29 11:22:51 a301-sls1-vm3 /usr/local/sbin/opensips[21062]:
>> ERROR:core:db_check_api: module db_pgsql does not export db_use_table
>> function
>> Jun 29 11:22:51 a301-sls1-vm3 /usr/local/sbin/opensips[21062]:
>> ERROR:auth_db:mod_init: unable to bind to a database driver
>>    
> [snip]
>
> The postgres support is broken in OpenSIP. The module names are incorrect.
> I've posted a bug, containing the fix in the bug tracker, bug ID 2814081.
>
> GTG
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOLVED: Re: OpenSIPS 1.5.1 with Postgres

Gordon Ross
On 29/06/2009 17:19, "Bogdan-Andrei Iancu" <[hidden email]> wrote:
> But a postgres URL should look like:
>
>    "postgres://opensips:opensipsrw@localhost/opensips"
>
> This is the intended way of using the postgres DB.

I'm not sure where we want to have this discussion (on this list, on another
list or in the bug tracker) I've posted a comment on the tracker basically
saying my hack makes the postgres configuration more consistent across
OpenSIPS. The problem (as I see it) is that Postgres naming in OpenSIP is
*NOT* consistent. In the scripts, it's referred to as PGSQL, yet in the C
code, it's postgres.

GTG


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOLVED: Re: OpenSIPS 1.5.1 with Postgres

Bogdan-Andrei Iancu
Hi Gordan,

Gordon Ross wrote:

> On 29/06/2009 17:19, "Bogdan-Andrei Iancu" <[hidden email]> wrote:
>  
>> But a postgres URL should look like:
>>
>>    "postgres://opensips:opensipsrw@localhost/opensips"
>>
>> This is the intended way of using the postgres DB.
>>    
>
> I'm not sure where we want to have this discussion (on this list, on another
> list or in the bug tracker)
Let's continue here :)
> I've posted a comment on the tracker basically
> saying my hack makes the postgres configuration more consistent across
> OpenSIPS. The problem (as I see it) is that Postgres naming in OpenSIP is
> *NOT* consistent. In the scripts, it's referred to as PGSQL, yet in the C
> code, it's postgres.
>  
I see your point - and I agree with you ; I would rather change the
scripts (from PGSQL to POSTGRES) and the C code is number one and I
prefer to do the changes in the satellite tools (much easier to cope for
the users).


Regards,
Bogdan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOLVED: Re: OpenSIPS 1.5.1 with Postgres

Gordon Ross
BTW, why the desire to use "POSTGRES" rather than "PGSQL" ?

GTG
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOLVED: Re: OpenSIPS 1.5.1 with Postgres

Bogdan-Andrei Iancu
Hi Gordon,

historical reasons - the module was named "postgres" and changing the
names of the module is not desirable. And the convention is to build the
DB URLs with the name of the module (to specify the DB type to use)....

So, more or less we are stuck with POSTGRES :)

Regards,
Bogdan

Gordon Ross wrote:
> BTW, why the desire to use "POSTGRES" rather than "PGSQL" ?
>
> GTG
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users