sql-server - SQL Server Always-on 的 Pacemaker 配置

标签 sql-server centos alwayson pacemaker

最近,我使用起搏器安装并配置了一个 Cent-OS 7 Linux 集群,以使 SQL Server 2019 高可用。我已将 SQL Server 默认 TCP 端口 1433 更改为其他内容,然后意识到 Pacemaker 守护程序无法使集群资源联机,因为它无法连接到默认 TCP 端口 1433 上的 SQL 服务。
以下是我在强制启动集群资源后收到的错误消息:
pcs 资源调试启动 SQLAG
SQLAG:0 (ocf:mssql:ag) 的操作开始返回:“未知错误”(1)

stdout: 19558 19556 stderr: Dec 21 15:57:57 INFO: mssql_validate stderr: Dec 21 15:57:57 INFO: Resource agent invoked with: start stderr: Dec 21 15:57:57 INFO: mssql_start stderr: Dec 21 15:57:57 INFO: start: 2020/12/21 15:57:57 ag-helper invoked with hostname [localhost]; port [1433]; ag-name [AG_00]; credentials-file [/var/opt/mssql/secrets/passwd]; application-name [monitor-SQLAG-start]; connection-timeout [30]; health-threshold [3]; action [start] stderr: Dec 21 15:57:57 INFO: start: 2020/12/21 15:57:57 ag-helper invoked with sequence-numbers [...]; required-synchronized-secondaries-to-commit [-1]; current-master []; disable-primary-on-quorum-timeout-after [60]; primary-write-lease-duration [70] stderr: Dec 21 15:57:57 INFO: start: 2020/12/21 15:57:57 From RetryExecute - Attempt 1 to connect to the instance at localhost:1433 stderr: Dec 21 15:57:57 INFO: start: 2020/12/21 15:57:57 Attempt 1 returned error: Unresponsive or down Unable to open tcp connection with host 'localhost:1433': dial tcp 127.0.0.1:1433: getsockopt: connection refused stderr: Dec 21 15:57:58 INFO: start: 2020/12/21 15:57:58 From RetryExecute - Attempt 2 to connect to the instance at localhost:1433 stderr: Dec 21 15:57:58 INFO: start: 2020/12/21 15:57:58 Attempt 2 returned error: Unresponsive or down Unable to open tcp connection with host 'localhost:1433': dial tcp 127.0.0.1:1433: getsockopt: connection refused stderr: Dec 21 15:57:59 INFO: start: 2020/12/21 15:57:59 From RetryExecute - Attempt 3 to connect to the instance at localhost:1433 stderr: Dec 21 15:57:59 INFO: start: 2020/12/21 15:57:59 Attempt 3 returned error: Unresponsive or down Unable to open tcp connection with host 'localhost:1433': dial tcp 127.0.0.1:1433: getsockopt: connection refused stderr: Dec 21 15:58:00 INFO: start: 2020/12/21 15:58:00 From RetryExecute - Attempt 4 to connect to the instance at localhost:1433 stderr: Dec 21 15:58:00 INFO: start: 2020/12/21 15:58:00 Attempt 4 returned error: Unresponsive or down Unable to open tcp connection with host 'localhost:1433': dial tcp 127.0.0.1:1433: getsockopt: connection refused stderr: Dec 21 15:58:01 INFO: start: 2020/12/21 15:58:01 From RetryExecute - Attempt 5 to connect to the instance at localhost:1433 stderr: Dec 21 15:58:01 INFO: start: 2020/12/21 15:58:01 Attempt 5 returned error: Unresponsive or down Unable to open tcp connection with host 'localhost:1433': dial tcp 127.0.0.1:1433: getsockopt: connection refused


现在,我需要知道如何更改起搏器默认端口以连接到 SQL 服务?我不想使用端口转发。

最佳答案

我想我找到了答案
有一个与 mssql-server-ha 包相关的配置文件,它作为 TCP 端口的一部分,用于连接到 SQL Server。配置文件位于名为“ag”的“/usr/lib/ocf/resource.d/mssql/”地址。
她在这 :
mssql-server-ha config file

关于sql-server - SQL Server Always-on 的 Pacemaker 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65400106/

相关文章:

php - sql和php中的日期差异

sql-server - 更新语句中的自动增量导致大表上出现重复值

c# - 将 Eval ("bitValue") 转换为 Bool

java - 是否可以有一个带装饰的透明 JavaFX 窗口(最小化、最大化、关闭)

api - 是否可以通过管理/资源管理 API 为 Azure 网站启用 Always On?

sql - 如何使用 XML 数据更新 SQL 表列

python - 在 linux 上将 web.py 作为服务运行

django - 在 centos 中使用 postgresql 迁移 Kiwi 时出错

sql - SQL Server AlwaysOn 中的脏读