【问题标题】:MSMQ: Message Queue service is not available. Error messageMSMQ:消息队列服务不可用。错误信息
【发布时间】:2012-12-24 21:41:22
【问题描述】:

过去几个月 MSMQ 一直在工作,但我突然收到以下错误消息:

Message Queue service is not available.

这是当我在本地测试它时,当我在现场测试它时,我收到以下消息:

 Unable to validate data.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Unable to validate data.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Unable to validate data.]
   System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData) +4961431
   System.Web.Security.MachineKey.Decode(String encodedData, MachineKeyProtection protectionOption) +194
   System.Web.Helpers.AntiForgeryDataSerializer.Deserialize(String serializedToken) +120

[HttpAntiForgeryException (0x80004005): A required anti-forgery token was not supplied or was invalid.]
   System.Web.Helpers.AntiForgeryDataSerializer.Deserialize(String serializedToken) +754
   System.Web.Helpers.AntiForgeryWorker.Validate(HttpContextBase context, String salt) +199
   System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor) +156
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +825488
   System.Web.Mvc.Controller.ExecuteCore() +159
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +54
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375

有没有人遇到过这个问题,它一直在工作然后停止并对此进行任何修复?

编辑:我在设置 msmq 时遇到了一些问题,请参阅: MSMQ creating errors: A workgroup installation computer does not support the operation / User's internal Message Queuing certificate does not exist

我的设置我们有 6 台服务器,它们是负载平衡的,并且都设置了 msmq,域设置为网络服务,还涉及另外两台服务器 - 接收消息的域控制器和 serach 服务器它接收消息 - 我不知道是否在所有或只有一个特定服务器上存在问题。我试图通过使用主机文件(C:\Windows\System32\drivers\etc\Host)并一次指向每台服务器来缩小范围,但它们似乎仍然是零星的,无论它们是否工作。我们确实使用缓存,所以我不确定这是否会影响任何事情......

谢谢

【问题讨论】:

  • 您是否检查了 MSMQ 和 DTC 服务是否在所有参与的计算机上运行?您是否在远程机器上使用队列 - 远程工作时并非所有功能都可用。队列和用户的访问(读/写)权限如何?
  • 我不是 100% 认为这两个错误是相关的 - 第二个错误与 ASP.NET MVC 的 AntiForgeryToken 相关,而不是 MSMQ?
  • Axtually 我刚刚进入 services.msc 并检查服务是否正常运行 消息队列是但消息队列触发器已停止,所以我启动它并再次工作唷!恐慌结束!!感谢您的回答
  • 啊不,它没有 - 它工作过一次然后失败,工作组安装计算机不支持该操作。 ...
  • 对,我认为解决方案实际上可能与 msmq 的设置无关 - 正如我在之前的帖子中检查 MSMQ 创建错误:工作组安装计算机不支持操作 /用户的内部消息队列证书不存在看起来实际发生的情况是我的一台服务器内存不足,因此影响了 msmq 服务。同样在两台服务器上,MSMQ 没有正确设置 - 它们只有私有队列 - 所以我必须卸载然后重新安装检查正确的框(参见其他帖子)

标签: networking msmq


【解决方案1】:

要解决此问题,请按以下步骤操作: 以管理员身份登录您的计算机。 单击开始,然后单击 运行。

出现运行对话框。 在打开框中,键入 Services.msc,然后单击确定。

出现“服务”窗口。 找到消息队列。右键点击 消息队列,然后单击 属性。

出现消息队列属性(本地计算机)对话框。 在登录选项卡上,单击本地系统帐户。 单击应用,然后单击 好的。 停止消息队列服务,然后启动消息队列服务。

【讨论】:

  • 为什么使用系统帐户更好?我的 MSMQ 服务有时会造成一些麻烦,我正试图找出原因。但该服务使用网络服务帐户运行。这是一件坏事吗?
  • 你只是从一篇随机的 Microsoft 文章中复制的,不是吗?
【解决方案2】:

我知道这可能听起来像是一个虚拟的解决方案,但它肯定对我有用。

您需要删除 MSMQ 并重新安装,但为了让其他服务真正看到它,您需要在每一步之间重新启动...所以您需要执行以下操作:

  • 删除 MSMQ
  • 重启服务器
  • 安装 MSMQ
  • 重新启动服务器:注意有时不需要此步骤,这取决于其他服务是否能够在此级别看到 MSMQ。

祝你好运

【讨论】:

    猜你喜欢
    • 2012-12-28
    • 1970-01-01
    • 2012-09-23
    • 2011-12-21
    • 2013-10-01
    • 2017-06-29
    • 2011-09-09
    • 2011-06-02
    • 2013-12-31
    相关资源
    最近更新 更多