2016-10-24 02:37:33.733197 [INFO] mod_dialplan_xml.c:637 Processing 1985922714 <1985922714>->4595609013 in context default
2016-10-24 02:37:33.753200 [ERR] switch_odbc.c:368 STATE: 01000 CODE 0 ERROR: [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : file not found

2016-10-24 02:37:33.753200 [CRIT] switch_core_sqldb.c:508 Failure to connect to ODBC ASTPP!
2016-10-24 02:37:33.753200 [ERR] freeswitch_lua.cpp:367 Connection failed.  DBH NOT Connected.
2016-10-24 02:37:33.753200 [ERR] freeswitch_lua.cpp:460 DBH NOT Connected.
2016-10-24 02:37:33.753200 [ERR] mod_lua.cpp:203 /usr/local/freeswitch/scripts/astpp/lib/astpp.functions.lua:32: assertion failed!
stack traceback:
        [C]: in function 'assert'
        /usr/local/freeswitch/scripts/astpp/lib/astpp.functions.lua:32: in function 'load_conf'
        /usr/local/freeswitch/scripts/astpp/astpp.lua:49: in main chunk
2016-10-24 02:37:33.753200 [ERR] mod_lua.cpp:270 LUA script parse/execute error!
2016-10-24 02:37:33.753200 [CRIT] mod_dptools.c:1713 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
2016-10-24 02:37:33.753200 [CRIT] mod_dptools.c:1713 Open /usr/local/freeswitch/conf/vars.xml and change the default_password.
2016-10-24 02:37:33.753200 [CRIT] mod_dptools.c:1713 Once changed type 'reloadxml' at the console.

最佳答案

这是我的解决方法:

跑:

[root@astpp-v3 ~]# cat /etc/odbc.ini
[ASTPP]
Driver = /usr/lib64/libmyodbc5.so
SERVER = localhost
PORT = 3306
DATABASE = astpp
USERNAME = root
PASSWORD = lozycv
OPTION = 67108864
**Socket = /var/run/mysql/mysql.sock**


然后运行:

[root@astpp-v3 ~]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
**socket=/var/lib/mysql/mysql.sock**
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d


并记下mysql.sock的正确路径并使用它更新odbc.ini文件。

关于linux - Freeswitch安装过程中如何解决“LUA脚本解析/执行错误”?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40212775/

10-16 11:52