Error using MySQL with opensips

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

Error using MySQL with opensips

Anurag Guru

Hi,

 

I’m new to OpenSIPs. I want to use OpenSIPs as Presence server.

 

I’ve compiled OpenSIPs (1.5.1) for presence server and installed it

on Linux. Also, I’ve enabled presence parameters in config file with

mysql database.

 

My DB details are: User-> opensips

                                      Passwd->opensipsrw

                                      DBname->test

 

While initializing opensips in this config I’m getting following error:

 

Jul  2 03:00:43 [16521] DBG:db_mysql:db_mysql_new_connection: server version is 5.0.46-enterprise-log

Jul  2 03:00:43 [16521] ERROR:db_mysql:db_mysql_submit_query: driver error on query: Table 'test.version' doesn't exist

Jul  2 03:00:43 [16521] ERROR:core:db_do_query: error while submitting query

Jul  2 03:00:43 [16521] ERROR:core:db_table_version: error in db_query

Jul  2 03:00:43 [16521] ERROR:core:db_check_table_version: querying version for table presentity

Jul  2 03:00:43 [16521] ERROR:presence:mod_init: error during table version check

Jul  2 03:00:43 [16521] ERROR:core:init_mod: failed to initialize module presence

Jul  2 03:00:43 [16521] ERROR:core:main: error while initializing modules

Jul  2 03:00:43 [16521] DBG:presence_xml:destroy: start

 

Here is my config (from opensips.cfg):

 

# ----- presence params -----

/* uncomment the following lines if you want to enable presence */

#modparam("presence|presence_xml", "db_url", "mysql://opensips:opensipsrw@192.168.8.76/opensips")

modparam("presence|presence_xml", "db_url", "mysql://opensips:opensipsrw@192.168.8.76/test")

modparam("presence_xml", "force_active", 1)

modparam("presence", "server_address", "sip:192.168.8.83:6060")

 

Pls help!

 

Thanx in advance,

Anurag

 


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

Re: Error using MySQL with opensips

Uwe Kastens
Hi,

Maybe you have forgotten to create the tables for opensips?
 opensipsdbctl create <db name or db_path, optional> .....(creates a new
database)

opensips is missing the version table
BR

Uwe


anurag schrieb:

>
>
> Hi,
>
>  
>
> I’m new to OpenSIPs. I want to use OpenSIPs as Presence server.
>
>  
>
> I’ve compiled OpenSIPs (1.5.1) for presence server and installed it
>
> on Linux. Also, I’ve enabled presence parameters in config file with
>
> mysql database.
>
>  
>
> My DB details are: User-> opensips
>
>                                       Passwd->opensipsrw
>
>                                       DBname->test
>
>  
>
> While initializing opensips in this config I’m getting following error:
>
>  
>
> Jul  2 03:00:43 [16521] DBG:db_mysql:db_mysql_new_connection: server
> version is 5.0.46-enterprise-log
>
> Jul  2 03:00:43 [16521] ERROR:db_mysql:db_mysql_submit_query: driver
> error on query: Table 'test.version' doesn't exist
>
> Jul  2 03:00:43 [16521] ERROR:core:db_do_query: error while submitting
> query
>
> Jul  2 03:00:43 [16521] ERROR:core:db_table_version: error in db_query
>
> Jul  2 03:00:43 [16521] ERROR:core:db_check_table_version: querying
> version for table presentity
>
> Jul  2 03:00:43 [16521] ERROR:presence:mod_init: error during table
> version check
>
> Jul  2 03:00:43 [16521] ERROR:core:init_mod: failed to initialize module
> presence
>
> Jul  2 03:00:43 [16521] ERROR:core:main: error while initializing modules
>
> Jul  2 03:00:43 [16521] DBG:presence_xml:destroy: start
>
>  
>
> Here is my config (from opensips.cfg):
>
>  
>
> # ----- presence params -----
>
> /* uncomment the following lines if you want to enable presence */
>
> #modparam("presence|presence_xml", "db_url",
> "mysql://opensips:opensipsrw@192.168.8.76/opensips")
>
> modparam("presence|presence_xml", "db_url",
> "mysql://opensips:opensipsrw@192.168.8.76/test")
>
> modparam("presence_xml", "force_active", 1)
>
> modparam("presence", "server_address", "sip:192.168.8.83:6060")
>
>  
>
> Pls help!
>
>  
>
> Thanx in advance,
>
> Anurag
>
>  
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--

kiste lat: 54.322684, lon: 10.13586

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

Re: Error using MySQL with opensips

Anurag Guru
In reply to this post by Anurag Guru

Thanx BR.

Could you pls tell me from where I can find info on usage for
opensipsdbctl? or some related documentation.

Thanx,
Anurag

Hi,

Maybe you have forgotten to create the tables for opensips?
 opensipsdbctl create <db name or db_path, optional> .....(creates a new
database)

opensips is missing the version table
BR
Reply | Threaded
Open this post in threaded view
|

Re: Error using MySQL with opensips

Uwe Kastens
Hi,

opensipsdbctl create

Therefore you will need configure the   opensipsctlrc file.

BR

Uwe

Anurag Guru schrieb:

>
> Thanx BR.
>
> Could you pls tell me from where I can find info on usage for
> opensipsdbctl? or some related documentation.
>
> Thanx,
> Anurag
>
> Hi,
>
> Maybe you have forgotten to create the tables for opensips?
>  opensipsdbctl create <db name or db_path, optional> .....(creates a new
> database)
>
> opensips is missing the version table
> BR
>


--

kiste lat: 54.322684, lon: 10.13586

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

Re: Error using MySQL with opensips

Anurag Guru
Thanx Uwe,

I've modified opensipsctlrc for DB details as following:

=======================
DBENGINE=MYSQL

## database host
DBHOST=192.168.8.83

## database name (for ORACLE this is TNS name)
DBNAME=opensips

# database path used by dbtext or db_berkeley
# DB_PATH="/usr/local/etc/opensips/dbtext"

## database read/write user
DBRWUSER=opensips

## password for database read/write user
DBRWPW="opensipsrw"
=======================

However, now when I'm running "opensipsdbctl create" it is giving
access denied error:

=========================
[root@bplinux90 sbin]# ./opensipsdbctl create
MySQL password for root:
INFO: test server charset
ERROR 1045 (28000): Access denied for user 'root'@'bplinux90' (using
password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'bplinux90' (using
password: YES)
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
/root/opensips/install/lib/opensips/opensipsctl/opensipsdbctl.mysql: line
114: [: =: unary operator expected
INFO: creating database opensips ...
ERROR 1045 (28000): Access denied for user 'root'@'bplinux90' (using
password: YES)
ERROR: Creating core database and grant privileges failed!
[root@bplinux90 sbin]#
=========================

Though, I'm able to login as root user MySQL database by supplying
configured password (mysql).

Pls tell if there is any other setting that I need to do to resolve this
issue.

Thanx in advance,
Anurag

-----Original Message-----
From: Uwe Kastens [mailto:[hidden email]]
Sent: Friday, July 03, 2009 1:39 PM
To: Anurag Guru
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] Error using MySQL with opensips

Hi,

opensipsdbctl create

Therefore you will need configure the   opensipsctlrc file.

BR

Uwe

Anurag Guru schrieb:

>
> Thanx BR.
>
> Could you pls tell me from where I can find info on usage for
> opensipsdbctl? or some related documentation.
>
> Thanx,
> Anurag
>
> Hi,
>
> Maybe you have forgotten to create the tables for opensips?
>  opensipsdbctl create <db name or db_path, optional> .....(creates a new
> database)
>
> opensips is missing the version table
> BR
>


--

kiste lat: 54.322684, lon: 10.13586


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

Re: Error using MySQL with opensips

Uwe Kastens
Hi,

So you can connect via cli:
mysql -u root -p -h 192.168.8.83

and you can create/drop a database?
mysqladmin create opensips -p -u root -h 192.168.8.83

The error looks like a mysql access right problem

BR

Uwe


anurag schrieb:

> Thanx Uwe,
>
> I've modified opensipsctlrc for DB details as following:
>
> =======================
> DBENGINE=MYSQL
>
> ## database host
> DBHOST=192.168.8.83
>
> ## database name (for ORACLE this is TNS name)
> DBNAME=opensips
>
> # database path used by dbtext or db_berkeley
> # DB_PATH="/usr/local/etc/opensips/dbtext"
>
> ## database read/write user
> DBRWUSER=opensips
>
> ## password for database read/write user
> DBRWPW="opensipsrw"
> =======================
>
> However, now when I'm running "opensipsdbctl create" it is giving
> access denied error:
>
> =========================
> [root@bplinux90 sbin]# ./opensipsdbctl create
> MySQL password for root:
> INFO: test server charset
> ERROR 1045 (28000): Access denied for user 'root'@'bplinux90' (using
> password: YES)
> ERROR 1045 (28000): Access denied for user 'root'@'bplinux90' (using
> password: YES)
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try `grep --help' for more information.
> /root/opensips/install/lib/opensips/opensipsctl/opensipsdbctl.mysql: line
> 114: [: =: unary operator expected
> INFO: creating database opensips ...
> ERROR 1045 (28000): Access denied for user 'root'@'bplinux90' (using
> password: YES)
> ERROR: Creating core database and grant privileges failed!
> [root@bplinux90 sbin]#
> =========================
>
> Though, I'm able to login as root user MySQL database by supplying
> configured password (mysql).
>
> Pls tell if there is any other setting that I need to do to resolve this
> issue.
>
> Thanx in advance,
> Anurag
>
> -----Original Message-----
> From: Uwe Kastens [mailto:[hidden email]]
> Sent: Friday, July 03, 2009 1:39 PM
> To: Anurag Guru
> Cc: [hidden email]
> Subject: Re: [OpenSIPS-Users] Error using MySQL with opensips
>
> Hi,
>
> opensipsdbctl create
>
> Therefore you will need configure the   opensipsctlrc file.
>
> BR
>
> Uwe
>
> Anurag Guru schrieb:
>> Thanx BR.
>>
>> Could you pls tell me from where I can find info on usage for
>> opensipsdbctl? or some related documentation.
>>
>> Thanx,
>> Anurag
>>
>> Hi,
>>
>> Maybe you have forgotten to create the tables for opensips?
>>  opensipsdbctl create <db name or db_path, optional> .....(creates a new
>> database)
>>
>> opensips is missing the version table
>> BR
>>
>
>


--

kiste lat: 54.322684, lon: 10.13586

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

Re: Error using MySQL with opensips

Anurag Guru
Thanx a lot Uwe!

Actually with " mysql -u root -p -h 192.168.8.83" it was giving
access problem therefore I changed it to " mysql -u root -p -h localhost"
and it worked fine. (Don't know difference it did make to mysql?)

Thereafter, I updated " opensipsctlrc" with "localhost" and was able
to create and populate DB using "./opensipsdbctl create" command.

Now opensips is coming up without any issues.

Thanx,
Anurag

-----Original Message-----
From: Uwe Kastens [mailto:[hidden email]]
Sent: Friday, July 03, 2009 2:46 PM
To: anurag
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] Error using MySQL with opensips

Hi,

So you can connect via cli:
mysql -u root -p -h 192.168.8.83

and you can create/drop a database?
mysqladmin create opensips -p -u root -h 192.168.8.83

The error looks like a mysql access right problem

BR

Uwe


anurag schrieb:

> Thanx Uwe,
>
> I've modified opensipsctlrc for DB details as following:
>
> =======================
> DBENGINE=MYSQL
>
> ## database host
> DBHOST=192.168.8.83
>
> ## database name (for ORACLE this is TNS name)
> DBNAME=opensips
>
> # database path used by dbtext or db_berkeley
> # DB_PATH="/usr/local/etc/opensips/dbtext"
>
> ## database read/write user
> DBRWUSER=opensips
>
> ## password for database read/write user
> DBRWPW="opensipsrw"
> =======================
>
> However, now when I'm running "opensipsdbctl create" it is giving
> access denied error:
>
> =========================
> [root@bplinux90 sbin]# ./opensipsdbctl create
> MySQL password for root:
> INFO: test server charset
> ERROR 1045 (28000): Access denied for user 'root'@'bplinux90' (using
> password: YES)
> ERROR 1045 (28000): Access denied for user 'root'@'bplinux90' (using
> password: YES)
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try `grep --help' for more information.
> /root/opensips/install/lib/opensips/opensipsctl/opensipsdbctl.mysql: line
> 114: [: =: unary operator expected
> INFO: creating database opensips ...
> ERROR 1045 (28000): Access denied for user 'root'@'bplinux90' (using
> password: YES)
> ERROR: Creating core database and grant privileges failed!
> [root@bplinux90 sbin]#
> =========================
>
> Though, I'm able to login as root user MySQL database by supplying
> configured password (mysql).
>
> Pls tell if there is any other setting that I need to do to resolve this
> issue.
>
> Thanx in advance,
> Anurag
>
> -----Original Message-----
> From: Uwe Kastens [mailto:[hidden email]]
> Sent: Friday, July 03, 2009 1:39 PM
> To: Anurag Guru
> Cc: [hidden email]
> Subject: Re: [OpenSIPS-Users] Error using MySQL with opensips
>
> Hi,
>
> opensipsdbctl create
>
> Therefore you will need configure the   opensipsctlrc file.
>
> BR
>
> Uwe
>
> Anurag Guru schrieb:
>> Thanx BR.
>>
>> Could you pls tell me from where I can find info on usage for
>> opensipsdbctl? or some related documentation.
>>
>> Thanx,
>> Anurag
>>
>> Hi,
>>
>> Maybe you have forgotten to create the tables for opensips?
>>  opensipsdbctl create <db name or db_path, optional> .....(creates a new
>> database)
>>
>> opensips is missing the version table
>> BR
>>
>
>


--

kiste lat: 54.322684, lon: 10.13586


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