OpenSIPS / opensips-cli

OpenSIPS CLI tool - an interactive command line tool that can be used to control and monitor OpenSIPS servers.
GNU General Public License v3.0
85 stars 48 forks source link

ERROR:xcap:mod_init: error during table version check. #54

Closed lesvere closed 4 years ago

lesvere commented 4 years ago

Apr 25 16:41:35 opensips systemd[1]: opensips.service: Service RestartSec=100ms expired, scheduling restart. Apr 25 16:41:35 opensips systemd[1]: opensips.service: Scheduled restart job, restart counter is at 4. Apr 25 16:41:35 opensips systemd[1]: Stopped OpenSIPS is a very fast and flexible SIP (RFC3261) server. Apr 25 16:41:35 opensips systemd[1]: Starting OpenSIPS is a very fast and flexible SIP (RFC3261) server... Apr 25 16:41:35 opensips opensips: INFO:tls_mgm:mod_load: openssl version: OpenSSL 1.1.1d 10 Sep 2019 Apr 25 16:41:35 opensips opensips: INFO:core:fix_poll_method: using epoll as the IO watch method (auto detected) Apr 25 16:41:35 opensips opensips[28933]: Listening on Apr 25 16:41:35 opensips opensips[28933]: udp: 192.168.7.243 [192.168.7.243]:5060 Apr 25 16:41:35 opensips opensips[28933]: tcp: 192.168.7.243 [192.168.7.243]:5060 Apr 25 16:41:35 opensips opensips[28933]: tls: 192.168.7.243 [192.168.7.243]:5061 Apr 25 16:41:35 opensips opensips[28933]: Aliases: Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: NOTICE:core:main: version: opensips 3.1.0-dev (x86_64/linux) Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:main: using 512 Mb of shared memory Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:main: using 32 Mb of private process memory Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: WARNING:core:init_reactor_size: shrinking reactor size from 262144 (autodetected via rlimit) to 83886 (limited by memory of 10% from 32Mb) Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: WARNING:core:init_reactor_size: use 'open_files_limit' to enforce other limit or increase pkg memory Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:init_reactor_size: reactor size 83886 (using up to 3.20Mb of memory per process) Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_CORE_THRESHOLD(0)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_CORE_SHM_THRESHOLD(1)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_CORE_PKG_THRESHOLD(2)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_CORE_PROC_AUTO_SCALE(3)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:tm:mod_init: TM - initializing... Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:sl:mod_init: Initializing StateLess engine Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: NOTICE:signaling:mod_init: initializing module ... Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:rr:mod_init: rr - initializing Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:maxfwd:mod_init: initializing... Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:sipmsgops:mod_init: initializing... Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_MYSQL_CONNECTION(4)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: WARNING:usrloc:check_runtime_config: 'db_mode' is now deprecated, use 'working_mode_preset'! Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:usrloc:ul_init_locks: locks array size 512 Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_UL_AOR_INSERT(5)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_UL_AOR_DELETE(6)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_UL_CONTACT_INSERT(7)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_UL_CONTACT_DELETE(8)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_UL_CONTACT_UPDATE(9)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_UL_LATENCY_UPDATE(10)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:registrar:mod_init: initializing... Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:dialog:mod_init: Dialog module - initializing Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_DLG_STATE_CHANGED(11)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:acc:mod_init: initializing... Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_ACC_EVENT(12)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_ACC_CDR(13)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:evi_publish_event: Registered event <E_ACC_MISSED_EVENT(14)> Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:auth:mod_init: initializing... Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:auth_db:mod_init: initializing... Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:alias_db:mod_init: initializing... Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: ERROR:core:db_check_table_version: invalid version 1 for table xcap found, expected 4 Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: ERROR:xcap:mod_init: error during table version check. Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: ERROR:core:init_mod: failed to initialize module xcap Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: ERROR:core:main: error while initializing modules Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: INFO:core:cleanup: cleanup Apr 25 16:41:35 opensips /usr/local/opensips/sbin/opensips[28935]: NOTICE:core:main: Exiting....

lesvere commented 4 years ago

That my db table info:

MariaDB [(none)]> use opensips; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A

Database changed MariaDB [opensips]> show tables; +--------------------+ | Tables_in_opensips | +--------------------+ | acc | | address | | clusterer | | dbaliases | | dialog | | dialplan | | dispatcher | | domain | | dr_carriers | | dr_gateways | | dr_groups | | dr_partitions | | dr_rules | | grp | | load_balancer | | location | | missed_calls | | re_grp | | rtpengine | | rtpproxy_sockets | | silo | | speed_dial | | subscriber | | tls_mgm | | uri | | usr_preferences | | version | +--------------------+ 27 rows in set (0.000 sec)

MariaDB [opensips]> select * from version; +------------------+---------------+ | table_name | table_version | +------------------+---------------+ | acc | 7 | | address | 5 | | clusterer | 4 | | dbaliases | 2 | | dialog | 10 | | dialplan | 5 | | dispatcher | 8 | | domain | 3 | | dr_carriers | 3 | | dr_gateways | 6 | | dr_groups | 2 | | dr_partitions | 1 | | dr_rules | 4 | | grp | 3 | | load_balancer | 3 | | location | 1013 | | missed_calls | 5 | | re_grp | 2 | | rtpengine | 1 | | rtpproxy_sockets | 0 | | silo | 6 | | speed_dial | 3 | | subscriber | 7 | | tls_mgm | 3 | | uri | 2 | | usr_preferences | 3 | +------------------+---------------+ 26 rows in set (0.000 sec)

lesvere commented 4 years ago

And I gues, only gues! I'm poor in cplusplus language.

I have try to insert into version table like this:

MariaDB [opensips]> insert into version (table_name, table_version) value ('xcap', 1); Query OK, 1 row affected (0.001 sec)

But error still occurage when I exec systemctl start opensips.service!

liviuchircu commented 4 years ago

According to the error logs, the required version is 4, so the correct query would be:

INSERT INTO version (table_name, table_version) VALUE ('xcap', 4);

But why do you have to run it manually? All presence tables (including version) are correctly created on either:

liviuchircu commented 4 years ago

Nothing more to be done here, closing.