Bug Report: Unable to Enable Always On Feature on SQL Server 2022 (Linux)

Steven Lam 20 Reputation points
2024-10-25T08:23:12.9166667+00:00

Hi Msft team!

I hope this message finds you well. I am writing to report an issue with SQL Server 2022 on Linux where the Always On availability groups feature cannot be enabled. Despite following the official documentation, I am unable to successfully activate Always On, and this bug appears to be consistently reproducible in my environment.

Environment:


SELECT @@VERSION

Microsoft SQL Server 2022 (RTM-CU15-GDR) (KB5046059) - 16.0.4150.1 (X64)   

Sep 25 2024 17:34:41   

Copyright (C) 2022 Microsoft Corporation   

Enterprise Edition (64-bit) on Linux (CentOS Stream 9) <X64>

Linux Version:


[root@ssmssql110 ~]# cat /etc/redhat-release

CentOS Stream release 9

[root@ssmssql110 ~]# uname -a

Linux ssmssql110 5.14.0-516.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 8 13:25:38 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Issue Description:

The issue arises when attempting to enable the Always On availability groups feature. After following the official documentation to configure Always On (Enable and Disable Always On Availability Groups), I found that the SELECT SERVERPROPERTY('IsHadrEnabled'); statement consistently returns 0, indicating that the feature is not enabled.

QQ图片20241025155400

QQ截图20241025155439

QQ图片20241025155411

Steps to Reproduce:

  1. Configure Always On according to the official documentation, enabling hadr.hadrenabled using mssql-conf.
  2. Restart the SQL Server service.
  3. Verify the configuration with /opt/mssql/bin/mssql-conf get hadr.hadr, which shows hadrenabled = true.
  4. Execute SELECT SERVERPROPERTY('IsHadrEnabled');, which still returns 0.

Log Observations:

The error log includes the following informational messages:


Always On: The availability replica manager is starting.

Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections.

This suggests that Always On is in the startup process, but there are no explicit errors indicating why it is not fully enabled.

Additional Information:

It is unclear whether mssql-conf only reads the configuration file and whether the SQL Server core is actually enabling Always On. There may be a discrepancy between the configuration settings and the actual server state.

Full error log:


[root@ssmssql110 ~]# cat /var/opt/mssql/log/errorlog
2024-10-25 15:36:12.79 Server      Microsoft SQL Server 2022 (RTM-CU15-GDR) (KB5046059) - 16.0.4150.1 (X64) 
        Sep 25 2024 17:34:41 
        Copyright (C) 2022 Microsoft Corporation
        Enterprise Edition (64-bit) on Linux (CentOS Stream 9) <X64>
2024-10-25 15:36:12.79 Server      UTC adjustment: 8:00
2024-10-25 15:36:12.79 Server      (c) Microsoft Corporation.
2024-10-25 15:36:12.79 Server      All rights reserved.
2024-10-25 15:36:12.79 Server      Server process ID is 432.
2024-10-25 15:36:12.79 Server      Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2024-10-25 15:36:12.79 Server      Registry startup parameters: 
         -d /var/opt/mssql/data/master.mdf
         -l /var/opt/mssql/data/mastlog.ldf
         -e /var/opt/mssql/log/errorlog
         -T 1211
         -T 1222
         -T 1204
2024-10-25 15:36:12.80 Server      SQL Server detected 2 sockets with 2 cores per socket and 2 logical processors per socket, 4 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2024-10-25 15:36:12.80 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2024-10-25 15:36:12.80 Server      Detected 3000 MB of RAM, 2474 MB of available memory, 2474 MB of available page file. This is an informational message; no user action is required.
2024-10-25 15:36:12.80 Server      Using conventional memory in the memory manager.
2024-10-25 15:36:12.80 Server      Detected pause instruction latency: 77 cycles.
2024-10-25 15:36:12.80 Server      SQL Server detected the following NUMA node configuration (NUMA Node number 0, Processor Group number 0, CPU Mask 0x000000000000000f).
2024-10-25 15:36:12.80 Server      Page exclusion bitmap is enabled.
2024-10-25 15:36:12.83 Server      Buffer pool extension is not supported on Linux platform.
2024-10-25 15:36:12.83 Server      Buffer Pool: Allocating 4194304 bytes for 387483 hashPages.
2024-10-25 15:36:12.91 Server      Buffer pool extension is already disabled. No action is necessary.
2024-10-25 15:36:13.18 Server      Installing Client TLS certificates to the store.
2024-10-25 15:36:13.18 Server      CPU vectorization level(s) detected:  SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX AVX2 POPCNT BMI1 BMI2
2024-10-25 15:36:13.22 Server      Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2024-10-25 15:36:13.24 Server      Query Store settings initialized with enabled = 1, 
2024-10-25 15:36:13.25 Server      The maximum number of dedicated administrator connections for this instance is '1'
2024-10-25 15:36:13.25 Server      Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2024-10-25 15:36:13.26 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2024-10-25 15:36:13.28 Server      In-Memory OLTP initialized on lowend machine.
2024-10-25 15:36:13.31 Server      [INFO] Created Extended Events session 'hkenginexesession'
2024-10-25 15:36:13.31 Server      Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
2024-10-25 15:36:13.32 Server      Total Log Writer threads: 2. This is an informational message; no user action is required.
2024-10-25 15:36:13.33 Server      clwb is selected for pmem flush operation.
2024-10-25 15:36:13.34 Server      Software Usage Metrics is disabled.
2024-10-25 15:36:13.36 spid18s     [1]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1. ConcurrentGAMUpdate: 1. ConcurrentSGAMUpdate: 1, CleanupUnderUserTransaction: 0. TranLevelPVS: 0
2024-10-25 15:36:13.37 spid18s     Starting up database 'master'.
2024-10-25 15:36:13.39 Server      CLR version v4.0.30319 loaded.
2024-10-25 15:36:13.52 spid18s     [32762]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1. ConcurrentGAMUpdate: 1. ConcurrentSGAMUpdate: 1, CleanupUnderUserTransaction: 0. TranLevelPVS: 0
2024-10-25 15:36:13.53 spid18s     Starting up database 'model_replicatedmaster'.
2024-10-25 15:36:13.53 spid21s     [32767]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1. ConcurrentGAMUpdate: 1. ConcurrentSGAMUpdate: 1, CleanupUnderUserTransaction: 0. TranLevelPVS: 0
2024-10-25 15:36:13.54 spid21s     Starting up database 'mssqlsystemresource'.
2024-10-25 15:36:13.54 spid21s     The resource database build version is 16.00.4150. This is an informational message only. No user action is required.
2024-10-25 15:36:13.61 spid21s     [3]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1. ConcurrentGAMUpdate: 1. ConcurrentSGAMUpdate: 1, CleanupUnderUserTransaction: 0. TranLevelPVS: 0
2024-10-25 15:36:13.61 spid21s     Starting up database 'model'.
2024-10-25 15:36:13.62 spid18s     Converting database 'model_replicatedmaster' from version 927 to the current version 957.
2024-10-25 15:36:13.63 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 927 to version 928.
2024-10-25 15:36:13.63 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 928 to version 929.
2024-10-25 15:36:13.68 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 929 to version 930.
2024-10-25 15:36:13.69 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 930 to version 931.
2024-10-25 15:36:13.69 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 931 to version 932.
2024-10-25 15:36:13.69 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 932 to version 933.
2024-10-25 15:36:13.70 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 933 to version 934.
2024-10-25 15:36:13.71 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 934 to version 935.
2024-10-25 15:36:13.71 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 935 to version 936.
2024-10-25 15:36:13.71 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 936 to version 937.
2024-10-25 15:36:13.72 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 937 to version 938.
2024-10-25 15:36:13.72 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 938 to version 939.
2024-10-25 15:36:13.72 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 939 to version 940.
2024-10-25 15:36:13.73 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 940 to version 941.
2024-10-25 15:36:13.73 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 941 to version 942.
2024-10-25 15:36:13.73 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 942 to version 943.
2024-10-25 15:36:13.75 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 943 to version 944.
2024-10-25 15:36:13.76 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 944 to version 945.
2024-10-25 15:36:13.76 Server      Common language runtime (CLR) functionality initialized.
2024-10-25 15:36:13.76 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 945 to version 946.
2024-10-25 15:36:13.77 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 946 to version 947.
2024-10-25 15:36:13.77 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 947 to version 948.
2024-10-25 15:36:13.77 Server      External governance manager initialized
2024-10-25 15:36:13.77 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 948 to version 949.
2024-10-25 15:36:13.78 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 949 to version 950.
2024-10-25 15:36:13.78 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 950 to version 951.
2024-10-25 15:36:13.79 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 951 to version 952.
2024-10-25 15:36:13.79 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 952 to version 953.
2024-10-25 15:36:13.79 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 953 to version 954.
2024-10-25 15:36:13.80 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 954 to version 955.
2024-10-25 15:36:13.80 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 955 to version 956.
2024-10-25 15:36:13.81 spid18s     Database 'model_replicatedmaster' running the upgrade step from version 956 to version 957.
2024-10-25 15:36:13.83 spid18s     [32761]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1. ConcurrentGAMUpdate: 1. ConcurrentSGAMUpdate: 1, CleanupUnderUserTransaction: 0. TranLevelPVS: 0
2024-10-25 15:36:13.83 spid18s     Starting up database 'model_msdb'.
2024-10-25 15:36:13.89 spid18s     Converting database 'model_msdb' from version 927 to the current version 957.
2024-10-25 15:36:13.89 spid18s     Database 'model_msdb' running the upgrade step from version 927 to version 928.
2024-10-25 15:36:13.90 spid18s     Database 'model_msdb' running the upgrade step from version 928 to version 929.
2024-10-25 15:36:13.92 spid18s     Database 'model_msdb' running the upgrade step from version 929 to version 930.
2024-10-25 15:36:13.93 spid18s     Database 'model_msdb' running the upgrade step from version 930 to version 931.
2024-10-25 15:36:13.93 spid18s     Database 'model_msdb' running the upgrade step from version 931 to version 932.
2024-10-25 15:36:13.93 spid18s     Database 'model_msdb' running the upgrade step from version 932 to version 933.
2024-10-25 15:36:13.94 spid18s     Database 'model_msdb' running the upgrade step from version 933 to version 934.
2024-10-25 15:36:13.94 spid18s     Database 'model_msdb' running the upgrade step from version 934 to version 935.
2024-10-25 15:36:13.94 spid18s     Database 'model_msdb' running the upgrade step from version 935 to version 936.
2024-10-25 15:36:13.94 spid18s     Database 'model_msdb' running the upgrade step from version 936 to version 937.
2024-10-25 15:36:13.95 spid18s     Database 'model_msdb' running the upgrade step from version 937 to version 938.
2024-10-25 15:36:13.95 spid18s     Database 'model_msdb' running the upgrade step from version 938 to version 939.
2024-10-25 15:36:13.95 spid18s     Database 'model_msdb' running the upgrade step from version 939 to version 940.
2024-10-25 15:36:13.95 spid18s     Database 'model_msdb' running the upgrade step from version 940 to version 941.
2024-10-25 15:36:13.96 spid18s     Database 'model_msdb' running the upgrade step from version 941 to version 942.
2024-10-25 15:36:13.96 spid18s     Database 'model_msdb' running the upgrade step from version 942 to version 943.
2024-10-25 15:36:13.98 spid18s     Database 'model_msdb' running the upgrade step from version 943 to version 944.
2024-10-25 15:36:13.98 spid18s     Database 'model_msdb' running the upgrade step from version 944 to version 945.
2024-10-25 15:36:13.99 spid18s     Database 'model_msdb' running the upgrade step from version 945 to version 946.
2024-10-25 15:36:13.99 spid18s     Database 'model_msdb' running the upgrade step from version 946 to version 947.
2024-10-25 15:36:13.99 spid18s     Database 'model_msdb' running the upgrade step from version 947 to version 948.
2024-10-25 15:36:14.00 spid18s     Database 'model_msdb' running the upgrade step from version 948 to version 949.
2024-10-25 15:36:14.00 spid18s     Database 'model_msdb' running the upgrade step from version 949 to version 950.
2024-10-25 15:36:14.01 spid18s     Database 'model_msdb' running the upgrade step from version 950 to version 951.
2024-10-25 15:36:14.02 spid18s     Database 'model_msdb' running the upgrade step from version 951 to version 952.
2024-10-25 15:36:14.02 spid18s     Database 'model_msdb' running the upgrade step from version 952 to version 953.
2024-10-25 15:36:14.02 spid18s     Database 'model_msdb' running the upgrade step from version 953 to version 954.
2024-10-25 15:36:14.03 spid18s     Database 'model_msdb' running the upgrade step from version 954 to version 955.
2024-10-25 15:36:14.03 spid18s     Database 'model_msdb' running the upgrade step from version 955 to version 956.
2024-10-25 15:36:14.03 spid27s     A self-generated certificate was successfully loaded for encryption.
2024-10-25 15:36:14.04 spid27s     Server is listening on [ 'any' <ipv6> 1433] accept sockets 1.
2024-10-25 15:36:14.04 spid27s     Server is listening on [ 'any' <ipv4> 1433] accept sockets 1.
2024-10-25 15:36:14.04 spid18s     Database 'model_msdb' running the upgrade step from version 956 to version 957.
2024-10-25 15:36:14.04 Server      Server is listening on [ ::1 <ipv6> 1434] accept sockets 1.
2024-10-25 15:36:14.04 Server      Server is listening on [ 127.0.0.1 <ipv4> 1434] accept sockets 1.
2024-10-25 15:36:14.05 Server      Dedicated admin connection support was established for listening locally on port 1434.
2024-10-25 15:36:14.05 spid27s     Server is listening on [ ::1 <ipv6> 1431] accept sockets 1.
2024-10-25 15:36:14.05 spid27s     Server is listening on [ 127.0.0.1 <ipv4> 1431] accept sockets 1.
2024-10-25 15:36:14.05 spid27s     SQL Server is now ready for client connections. This is an informational message; no user action is required.
2024-10-25 15:36:14.07 spid18s     Resource governor reconfiguration succeeded.
2024-10-25 15:36:14.07 spid33s     Attribute synchronization initialized
2024-10-25 15:36:14.07 spid33s     Attribute synchronization manager initialized
2024-10-25 15:36:14.07 spid18s     SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2024-10-25 15:36:14.07 spid18s     SQL Server Audit has started the audits. This is an informational message. No user action is required.
2024-10-25 15:36:14.11 spid18s     SQL Trace ID 1 was started by login "sa".
2024-10-25 15:36:14.12 spid18s     Server name is 'ssmssql110'. This is an informational message only. No user action is required.
2024-10-25 15:36:14.13 spid21s     Clearing tempdb database.
2024-10-25 15:36:14.13 spid36s     Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2024-10-25 15:36:14.14 spid36s     Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2024-10-25 15:36:14.14 spid38s     [4]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1. ConcurrentGAMUpdate: 1. ConcurrentSGAMUpdate: 1, CleanupUnderUserTransaction: 0. TranLevelPVS: 0
2024-10-25 15:36:14.14 spid38s     Starting up database 'msdb'.
2024-10-25 15:36:14.23 spid18s     Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
2024-10-25 15:36:14.23 spid21s     [2]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1. ConcurrentGAMUpdate: 1. ConcurrentSGAMUpdate: 1, CleanupUnderUserTransaction: 0. TranLevelPVS: 0
2024-10-25 15:36:14.24 spid21s     Starting up database 'tempdb'.
2024-10-25 15:36:14.41 spid21s     The tempdb database has 4 data file(s).
2024-10-25 15:36:14.41 spid36s     The Service Broker endpoint is in disabled or stopped state.
2024-10-25 15:36:14.42 spid36s     The Database Mirroring endpoint is in disabled or stopped state.
2024-10-25 15:36:14.42 spid36s     Service Broker manager has started.
2024-10-25 15:36:14.42 spid18s     Recovery is complete. This is an informational message only. No user action is required.
2024-10-25 15:36:15.21 spid51      Attempting to load library 'xpsqlbot.dll' into memory. This is an informational message only. No user action is required.
2024-10-25 15:36:15.21 spid51      Using 'xpsqlbot.dll' version '2022.160.4150' to execute extended stored procedure 'xp_qv'. This is an informational message only; no user action is required.
2024-10-25 15:36:15.25 spid51      Attempting to load library 'xpstar.dll' into memory. This is an informational message only. No user action is required.
2024-10-25 15:36:15.26 spid51      Using 'xpstar.dll' version '2022.160.4150' to execute extended stored procedure 'xp_sqlagent_notify'. This is an informational message only; no

Request for Assistance:

Could the SQL Server team look into this issue and provide a fix or workaround? This bug affects the ability to use Always On availability groups on Linux, potentially impacting users who rely on high availability setups in their production environments.

Thank you for your attention to this matter. I look forward to any guidance or updates you can provide.

SQL Server | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 41,491 Reputation points
    2024-10-25T09:28:46.48+00:00

    Hi @Steven Lam,

    If the issue is affecting your production environments, I'd like to suggest that you may raise a support ticket to Microsoft support so that you may get directly help to confirm if it is a known issue and solve it from PG side.

    Services Hub (microsoft.com)

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.