How to fix Error 13156 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 13156 (Message Acknowledgement Failure)

Why This Error Happens

Error 13156 in SQL Server 2025 typically occurs within Service Broker when a message acknowledgement cannot be processed due to a conversation endpoint being stuck in a corrupted or inconsistent state. This often results from network interruptions between dialog endpoints, mismatched contract definitions, or a corrupted transmission queue following an unexpected service restart. Additionally, insufficient permissions on the SEND or RECEIVE operations for the Service Broker queue can prevent the acknowledgement handshake from completing.

Step-by-Step Resolution Guide

Step 1: Verify Service Broker Configuration and Status

  • Open SQL Server Management Studio (SSMS) and run SELECT is_broker_enabled FROM sys.databases WHERE name = 'YourDBName'; to confirm Broker is active.
  • If disabled, enable it using ALTER DATABASE YourDBName SET ENABLE_BROKER;
  • Check for orphaned conversations using SELECT * FROM sys.conversation_endpoints WHERE state = 'DI'; (Disconnected Inbound).

Step 2: Clear the Transmission Queue and Reset Endpoints

  • Navigate to the database engine and query sys.transmission_queue to identify stuck messages causing the 13156 block.
  • If messages are stalled, end the specific conversation using END CONVERSATION 'conversation_handle' WITH CLEANUP;
  • Restart the SQL Server Broker service via PowerShell: Restart-Service -Name MSSQLSERVER -Force (Note: This restarts the full instance; schedule during a maintenance window).

Step 3: Validate Windows Firewall and Port Permissions

  • On Windows Server 2025, check if the specific Broker port (default 4022) is blocked.
  • Run netsh advfirewall firewall show rule name="SQL Server Broker" to verify the rule exists.
  • If missing, add a new inbound rule: netsh advfirewall firewall add rule name="SQL Server Broker" dir=in action=allow protocol=TCP localport=4022

Step 4: Check Certificate and Permission Validity

  • Verify that the SERVICE and CONTRACT permissions are granted to the specific user account attempting the acknowledgement.
  • Run GRANT SEND ON SERVICE::[YourServiceName] TO [UserName]; to ensure the account has rights to send the acknowledgement packet.
  • Check certificate expiration dates if using encrypted dialogues via SELECT name, expiry_date FROM sys.certificates;

Alternative or Verification Steps

  • Verification: Monitor the sys.dm_broker_queue_monitors dynamic management view for 10-15 minutes to ensure the queue status returns to “INACTIVE” without new ON_ERROR triggers appearing in the SQL Server Error Log.
  • Alternative Fix: If the error persists after clearing the queue, disable and re-enable the Broker on the database using ALTER DATABASE YourDBName SET NEW_BROKER; (Warning: This action will reset the Service Broker GUID and terminate all existing conversations).