You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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配置修改弹窗,选择保留现有配置文件

排查方向

  1. 验证Apache版本兼容性:Ubuntu 14.04默认搭载Apache 2.4.x,原mod_jrun22.so是为Apache 2.2编译的,2.4版本API存在变更,ap_log_error符号定义可能已修改或移除。先执行apache2 -v确认当前Apache版本。
  2. 重新编译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替换原文件
  3. 检查模块配置与权限:确认/etc/apache2/mods-enabled/jrun.load中的文件路径正确;执行chown www-data:www-data /opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun22.so确保Apache进程用户有读取权限。
  4. 排查库依赖问题:执行ldd /opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun22.so,检查模块依赖的系统库是否缺失或版本不匹配。
  5. 临时禁用JRun模块测试:注释/etc/apache2/apache2.conf第140行的JRun模块加载配置,执行apache2ctl configtest,若Apache能正常启动,可确认问题源于JRun连接器与新版本Apache的兼容性。

内容的提问来源于stack exchange,提问作者Aditya vakharia

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.27 17:56:38