Service Broker: are my messages sent from Initiator? if so, nothing comes to the target...

Hi,

I am following this tutorial https://technet.microsoft.com/en-us/library/bb839496(v=sql.105).aspx . I create DB instances of initiator and target on two different servers (one is my local machine). I start the conversation. At first I thought the target was never getting the messages for unknown reasons. But now I starting to think maybe the messages are never sent...

In Initiator DB, 

select * from sys.transmission_queue

returns a couple of rows of the messages I sent to the target. My first question is: if the message are in the transmission_queue, does it actually mean they are waiting to be sent? The column transmission status is all blank.

I opened SQL Profiler for Initiator DB and selected every possible Service Broker event. When running the code of lesson 4 (which starts the conversation and send a message to the target), I have the following events recorded:

  • Broker: Conversation Group -> 1 - Create. 
  • Broker: Conversation -> 11 - Begin dialog
  • Broker: Conversation -> 1- Send message
  • Broker: Message Classify -> 2 - Remote

I am also trying to use ssbdiagnose but I am not sure how.

On the target side, transmission queue is empty. Getting the latest message returns null. Sql Profiler set up with service broker events is totally blank. I am assuming that there is nothing coming to it, therefore nothing is leaving the initiator.

What is the next step to debug this situation please?

 
  • Edited by GregCSharp 16 hours 29 minutes ago better display
March 27th, 2015 10:37am

Hi

if the message are in the transmission_queue, does it actually mean they are waiting to be sent?

If a message is still in the transmission_queue it means that it has yet to be acknowledged by the target. So it could have been sent, just not acknowledged. 

On the assumption that you haven't moved onto the next lesson it would be expected that the message would still be in the queue, as the acknowledgement hasn't been sent back.

Have you checked the target queue?

SELECT TOP 50 *, casted_message_body = 
CASE message_type_name WHEN 'X' 
  THEN CAST(message_body AS NVARCHAR(MAX)) 
  ELSE message_body 
END 
FROM [InstTargetDB].[dbo].[InstTargetQueue] WITH(NOLOCK)


  • Edited by jmcmullen 14 hours 40 minutes ago
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 12:29pm

I moved back and forth between lessons. But then I created again everything from the beginning and stop at lesson 4.

The query you gave returned an empty table. 

I tried again the SQL profiler on the target DB with the logs of Audit / Broker login and i get the following answer:

Connection handshake failed. An OS call failed: (8009030c) 0x8009030c(The logon attempt failed). State 67.


March 27th, 2015 1:11pm

Looks like this

https://support.microsoft.com/en-us/kb/912412?wa=wsignin1.0

Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 1:29pm

your article points to

https://support.microsoft.com/en-us/kb/278381 where it speaks about permissions for the MachineKeys folders.

However, I do not know where I should start. Should I change permissions on the target server?

When I go in security tab and click advanced on the MachineKeys folder, I can change permissions for "Everyone" or "administrators". If I click "change permissions", I do not see the " Reset Permissions on all Child objects and enable propagation of inheritable permissions check box" mentioned in the thread 278381.

Could you please make it clearer for me?

Thank you

March 27th, 2015 2:24pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics