Known Issue: MSMQ errors in the K2 Five (5.x) Server Log
KB003218
PRODUCT
If you upgrade from K2 4.7 and MSMQ is removed from the server, you will see an MSMQ-related error in the K2 server log ouput with the error text System.InvalidOperationException: Message Queuing has not been installed on this computer. The error does not affect operation of the K2 service or applications, and this article explains why the error occurs, and how to prevent it.
Cause
K2 implemented a new message queuing mechanism in K2 Five that replaces MSMQ. The new mechanism includes a clean-up method that checks MSMQ for messages and processes them to empty the queue before switching to the new method. This clean-up relies on settings in the K2HostServer.exe.config file.When the new mechanism clears the legacy messages from the queue, and MSMQ is no longer in the system but the settings remain in the K2HostServer.exe.config file, the new message queuing mechanism tries to perform the clean-up check. This causes the MSMQ error in the K2 server log.
Solution
The K2 Five server processes legacy messages in the queue when it starts up after you upgrade from K2 4.7. You can check that the message queue is empty by opening Computer Management and browsing to the Queue messages item as shown below:
Once the new mechanism clears the message queue and the MSMQ queue is empty and deleted, you can delete the MSMQ settings in the K2HostServer.exe.config file as described below:
- Stop the K2 service.
- Make a backup of the K2HostServer.exe.config file. The default path to the file after an upgrade is [Program Files]K2Host ServerBinK2HostServer.exe.config.
- Open the K2HostServer.exe.config file in a text editor.
- Locate and delete the following attributes and their values:
- msmqpath
- msmqemptyqueueassembly
- memqemptyqueuetype
- msmqemptymethodsignature
The screenshot below is an example of the values to be deleted - everything surrounded by a red box can be deleted. Your values may be different.
- Start the K2 service.
- If you are running an environment with multiple physical K2 servers, repeat steps 1-5 on each physical server in your K2 environment.