Ubuntu升级后Apache加载mod_jrun22.so失败:undefined symbol: ap_log_error
问题:Ubuntu 14.04升级后Apache无法启动(ColdFusion 6.1+Apache2.2环境)
环境背景
- 原运行环境:Ubuntu 12.04 + ColdFusion 6.1 + Apache2(2.2.3)+ JRun连接器
- 触发操作:升级至Ubuntu 14.04后,Apache服务器无法启动
启动报错信息
* Starting web server apache2 * * The apache2 configtest failed. Output of config test was: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/jrun.load: Cannot load /opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun22.so into server: /opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun22.so: undefined symbol: ap_log_error Action 'configtest' failed. The Apache error log may have more information.
Apache错误日志(升级前最后正常运行及停止记录)
1 [Sun Mar 17 06:38:34 2024] [notice] jrApache[init] JRun 4.0 (Build 108795) Apache 2.2 module - May 3 2012 09:17:00 2 [Sun Mar 17 06:38:34 2024] [notice] Apache/2.2.22 (Ubuntu) JRun/4.0 configured -- resuming normal operations 3 [Wed Mar 20 16:14:07 2024] [notice] caught SIGTERM, shutting down 4 [Wed Mar 20 16:19:32 2024] [notice] jrApache[init] JRun 4.0 (Build 108795) Apache 2.2 module - May 3 2012 09:17:00 5 [Wed Mar 20 16:19:32 2024] [notice] jrApache[init] JRun 4.0 (Build 108795) Apache 2.2 module - May 3 2012 09:17:00 6 [Wed Mar 20 16:19:32 2024] [notice] Apache/2.2.22 (Ubuntu) JRun/4.0 configured -- resuming normal operations 7 [Wed Mar 20 16:52:37 2024] [notice] caught SIGTERM, shutting down 8 [Wed Mar 20 16:52:38 2024] [notice] jrApache[init] JRun 4.0 (Build 108795) Apache 2.2 module - May 3 2012 09:17:00 9 [Wed Mar 20 16:52:38 2024] [notice] jrApache[init] JRun 4.0 (Build 108795) Apache 2.2 module - May 3 2012 09:17:00 10 [Wed Mar 20 16:52:38 2024] [notice] Apache/2.2.22 (Ubuntu) JRun/4.0 configured -- resuming normal operations 11 [Wed Mar 20 16:54:04 2024] [notice] caught SIGTERM, shutting down
升级操作步骤
- 停止ColdFusion服务
- 停止Apache2服务
- 执行
apt-get update、apt-get upgrade - 执行
do-release-upgrade - 升级过程中遇到smb配置修改弹窗,选择保留现有配置文件
排查方向
- 验证Apache版本兼容性:Ubuntu 14.04默认搭载Apache 2.4.x,原
mod_jrun22.so是为Apache 2.2编译的,2.4版本API存在变更,ap_log_error符号定义可能已修改或移除。先执行apache2 -v确认当前Apache版本。 - 重新编译JRun连接器:针对Apache 2.4重新编译JRun模块:
- 安装Apache开发包:
apt-get install apache2-dev - 进入wsconfig目录:
cd /opt/coldfusionmx/runtime/lib/wsconfig/1 - 备份原有模块:
mv mod_jrun22.so mod_jrun22.so.bak - 用apxs编译:
apxs -c -n jrun mod_jrun.c - 将编译生成的
mod_jrun.so重命名为mod_jrun22.so替换原文件
- 安装Apache开发包:
- 检查模块配置与权限:确认
/etc/apache2/mods-enabled/jrun.load中的文件路径正确;执行chown www-data:www-data /opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun22.so确保Apache进程用户有读取权限。 - 排查库依赖问题:执行
ldd /opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun22.so,检查模块依赖的系统库是否缺失或版本不匹配。 - 临时禁用JRun模块测试:注释
/etc/apache2/apache2.conf第140行的JRun模块加载配置,执行apache2ctl configtest,若Apache能正常启动,可确认问题源于JRun连接器与新版本Apache的兼容性。
内容的提问来源于stack exchange,提问作者Aditya vakharia
相关产品推荐
相关产品推荐

