0
votes

Recently, I have installed and configured a Cent-OS 7 Linux cluster using pacemaker for making SQL Server 2019 high available. I have changed SQL Server default TCP Port 1433 to something else, and then realized that Pacemaker daemon couldn't bring cluster resources online, because it can't connect to SQL Service on default TCP port 1433.

Below is error messages which I got after force starting cluster resources:

pcs resource debug-start SQLAG Operation start for SQLAG:0 (ocf:mssql:ag) returned: 'unknown error' (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

Now, I need to know how can I change pacemaker default port for connection to SQL Service? I don't want to use port forwarding.

1

1 Answers

0
votes

I think I find the answer

there is a config file related to mssql-server-ha package which as a portion for TCP Port for connecting to SQL Server. The config file is located at "/usr/lib/ocf/resource.d/mssql/" address named "ag".

Here she is :

mssql-server-ha config file