首批通过分布式安全可靠测评,为关键业务系统打造
ODC 健康检测告警 NewConnectionError
更新时间:2026-07-08 08:01
问题现象
ODC 部署完成后,健康检查时出现下述告警:
HTTPConnectionPool(host='xxx.xxx.xxx.xxx', port=8989): Max retries exceeded with url: /api/v1/heartbeat/isHealthy (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa07e3690f0>: Failed to establish a new connection: [Errno 111] Connection refused',))
进入 Docker 容器,排查问题
docker exec -it odc bash
tail -f /opt/odc/odc.log
出现下述报错:
while parameter _ob_enable_prepared_statement is disabled,prepared statement not supported
问题原因
ODC 的部分功能依赖于 prepare statement 功能,如不开启,将影响 ODC 的正常使用。
受影响的功能:
PL 相关对象的使用,存储过程、函数、程序包、类型、触发器等。
session 级别的超时。
影响的版本
ODC 所有版本。
解决方法
需要开启隐藏参数 _ob_enable_prepared_statement,操作步骤如下:
连接到 root@sys 租户。
执行下述语句:
ALTER SYSTEM SET _OB_ENABLE_PREPARED_STATEMENT=true;相关参数说明:
参数 默认值 范围 生效方式 说明 _ob_enable_prepared_statement TRUE 集群 动态 表示是否可以使用 server 端的 Prepared 语句。