The following error appears on one of the K2 servers within the K2 server farm:
"Error","EventBus","7498","General","MSMQ.RecieveMessage","7498 An error has occurred: Item:0 - System.Messaging.MessageQueueException (0x80004005): The transaction operations sequence is invalid.
The error message occurs on only one of the servers and not on another. The full error message text is as follows:
"Error","EventBus","7498","General","MSMQ.RecieveMessage","7498 An error has occurred: Item:0 - System.Messaging.MessageQueueException (0x80004005): The transaction operations sequence is invalid. at System.Messaging.MessageQueue.ReceiveCurrent(TimeSpan timeout, Int32 action, CursorHandle cursor, MessagePropertyFilter filter, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType) at System.Messaging.MessageQueue.Receive(MessageQueueTransaction transaction)"
K2 service account has full control rights on Public and Errors EventBus queues.
The following can be checked in this scenario:
1. In K2HostServer.exe.config there is a "<sourcecode.eventbus>" section which includes different MSMQ paths, which in turn, includes the server name or farm name - make sure that they are correct. If the server farm specified is there then it is best to make sure that each server resolves the farm name into its own loop-back address (127.0.0.1) through an entry in the host file.
2. Check the MSMQ Journal messages. (Enable this functionality if necessary, when it is enabled you should see a Journal messages folder within each queue.) Here you can see some more descriptive error messages.
3. Make sure that the K2 service account has permissions on all queues granted directly - i.e. not through group membership.
4. Identify whether you only see this error occasionally or MSMQ processing does not work at all on the affected server. As a test, create a process with a single client event with task notifications enabled. Rrun it and see if the error gets logged every time you run it.
5. If MSMQ does not work at all, try to restart the K2 service and see if the MSMQ queue processing works after that.
6. There is a high probability that you may see some additional MSMQ errors logged by the MSMQ service in Windows Event viewer - try to search for these errors.
A specific example of when you could get this error is when the configuration file was copied from one node to another and therefore the MSMQ path was pointing to the wrong node name. In this case the issue can be resolved by adjusting the configuration file settings.