sipcapture / homer-api

HOMER 5: Back-End (API) DEPRICATED - use sipcapture/homer-app
http://sipcapture.org
27 stars 67 forks source link

Kamailio config file cause 'table doesn't exist' errors #32

Closed 00Asgaroth00 closed 9 years ago

00Asgaroth00 commented 9 years ago

Hi,

I have been following the homer 5 installation guide, and copied the kamailio config file to a kamailio 4.3.1 (rpm distribution) installation.

When I start sending traffic over to the homer kamailio capture agent I am getting the following errors in the log of the capture node:

ERROR: db_mysql [km_dbase.c:121]: db_mysql_submit_query(): driver error on query: Table 'homer_data.sip_capture_rest_%Y%m%d' doesn't exist
ERROR: <core> [db_query.c:235]: db_do_insert_cmd(): error while submitting query
ERROR: db_mysql [km_dbase.c:121]: db_mysql_submit_query(): driver error on query: Table 'homer_data.sip_capture_registration_%Y%m%d' doesn't exist
ERROR: <core> [db_query.c:235]: db_do_insert_cmd(): error while submitting query

I have not pushed a call through it yet, so I presume the same error will come up when attempting to insert to the sip_capturecall%Y_%m%d tables.

I have checked the mysql homer_data database and the tables do exist:

mysql> show tables;
+-----------------------------------+
| Tables_in_homer_data              |
+-----------------------------------+
| logs_capture                      |
| report_capture                    |
| rtcp_capture                      |
| sip_capture_call_20150407         |
| sip_capture_call_20150805         |
| sip_capture_call_20150806         |
| sip_capture_call_20150807         |
| sip_capture_registration_20150407 |
| sip_capture_registration_20150805 |
| sip_capture_registration_20150806 |
| sip_capture_registration_20150807 |
| sip_capture_rest_20150407         |
| sip_capture_rest_20150805         |
| sip_capture_rest_20150806         |
| sip_capture_rest_20150807         |
+-----------------------------------+
15 rows in set (0.00 sec)

Kamailio version is 4.3.1 MySQL version is 5.6.26 MySQL config taken from 'MySQL Tables' section in following url: https://github.com/sipcapture/homer/wiki/HOMER-3.6 Homer 5 version is git release as of 5 Aug 2015.

I have double checked the mysql username/password in the kamailio config and the listen ip address, these all appear correct.

Please let me know if you need any further info from me to troubleshoot further.

adubovikov commented 9 years ago

please check if your kamailio config is actual.

https://github.com/sipcapture/homer-api/blob/master/examples/sipcapture/kamailio.cfg

00Asgaroth00 commented 9 years ago

I just downloaded that config and performed a diff against it and the only differences are the db username/password and listen address, I've masked out the password in the below snip:

# diff -u kamailio.cfg.new kamailio.cfg
--- kamailio.cfg.new    2015-08-05 13:08:25.830701282 +0100
+++ kamailio.cfg        2015-08-05 13:09:34.581138992 +0100
@@ -8,10 +8,10 @@
 # Please, make all your configuration changes here
 #

-#!substdef "!HOMER_DB_USER!homer_user!g"
-#!substdef "!HOMER_DB_PASSWORD!homer_password!g"
+#!substdef "!HOMER_DB_USER!homer!g"
+#!substdef "!HOMER_DB_PASSWORD!password!g"
 #!substdef "!HOMER_LISTEN_PROTO!udp!g"
-#!substdef "!HOMER_LISTEN_IF!0.0.0.0!g"
+#!substdef "!HOMER_LISTEN_IF!10.7.0.53!g"
 #!substdef "!HOMER_LISTEN_PORT!9060!g"

 ####### Global Parameters #########
adubovikov commented 9 years ago

check this https://github.com/sipcapture/homer-api/commit/8eca1aa7c03d9cec02c8ac16742c3d05d4c723c9

00Asgaroth00 commented 9 years ago

Hi, that patch corrected the issue, thank you!