Difference between revisions of "Shooting MSMQ troubles"

From Catglobe Wiki
Jump to: navigation, search
Line 15: Line 15:
 
'''TODO''': Change code so that appropriate access is automatically granted to those queues for relevant users.  
 
'''TODO''': Change code so that appropriate access is automatically granted to those queues for relevant users.  
  
== MSMQ ==
+
== MSMQ ==
  
Error:
+
Error:  
  
The transaction has aborted.
+
The transaction has aborted.  
  
Communication with the underlying transaction manager has failed.<br>Solution: Check if MSDTC (Distributed Transaction Coordinator)&nbsp;is running. If not, start it.
+
Communication with the underlying transaction manager has failed.<br>Solution: Check if MSDTC (Distributed Transaction Coordinator)&nbsp;is running. If not, start it.  
 +
 
 +
== Security ==
 +
 
 +
=== Access to the registry key 'Global' is denied.  ===
 +
 
 +
Error message: Access to the registry key 'Global' is denied
 +
 
 +
Remark: When&nbsp;CatTask runs, it needs&nbsp;access to the&nbsp;registry to get information about&nbsp;processors of the server.&nbsp;This error happens because the user account which your web application uses to run (it is the user which is specified in impersonation section in webconfig) doesn't have that permission.
 +
 
 +
Solution: Open Computer Management console&nbsp;(right click on My Computer -&gt;&nbsp;Manage) -&gt;&nbsp;Local Users and Groups -&gt; Groups -&gt; Add impersonated account to the group

Revision as of 05:34, 11 August 2010

Permission

- One Cattask needs 5 queues in total to work properly:

  • cattask_queue (main queue)
  • cattask_queue#discarded (discarded messages come here)
  • cattask_queue#errors (error messages come here)
  • cattask_queue#subscriptions (subscriptions messages come here)
  • cattask_queue#timeout (timeout messages come here)

TODO: explain those queues in more details.

Those queues, if not exists, are created by the bus itself. The point is that in order to access the queues, Rhino Service Bus needs to have enough permission to the queues. So, what specifies the access rights which RSB has to the queues? A bus creates some threads to process messages, and those threads don't use impersonation at all. In other words, it uses the default Identity of the hosting process; for example ASPNET in Windows XP or NETWORK SERVICE in Windows Server 2003. By default, RSB just grants full access for the Administrator group. To overcome this security issue, right now, I change RSB code to grant access for the Everyone user. Although granting for Everyone is not a good idea, it is working now.

TODO: Change code so that appropriate access is automatically granted to those queues for relevant users.

MSMQ

Error:

The transaction has aborted.

Communication with the underlying transaction manager has failed.
Solution: Check if MSDTC (Distributed Transaction Coordinator) is running. If not, start it.

Security

Access to the registry key 'Global' is denied.

Error message: Access to the registry key 'Global' is denied

Remark: When CatTask runs, it needs access to the registry to get information about processors of the server. This error happens because the user account which your web application uses to run (it is the user which is specified in impersonation section in webconfig) doesn't have that permission.

Solution: Open Computer Management console (right click on My Computer -> Manage) -> Local Users and Groups -> Groups -> Add impersonated account to the group