重新启动后 MSMQ 状态不一致
我看到一个非常奇怪的错误,我遇到了困难 追踪。我认为这与我的 Rhino ESB 配置有关,尽管我不确定 如果 RSB 确实造成了这种情况,所以我想我应该问一下,看看是否 其他人在 MSMQ 的任何其他用法中都遇到过这种情况。
我使用 RSB 作为 Web 应用程序中的客户端(ASP.NET,客户端在后台运行)。客户端通过 RSB 的 MSMQ 绑定与 Windows 服务进行通信。重新启动服务似乎永远不会对 MSMQ 产生影响,手动重新启动 IIS 也不会产生影响。然而,每当我实际重新启动计算机本身时,MSMQ 总是拒绝启动备份,声称“队列处于不一致状态”。尝试手动启动 MSMQ 会导致相同的错误,从而导致 MSMQ 安装完全无用。解决此问题的唯一方法是实际删除然后重新安装 MSMQ。
我通过万能的 Google 找到的唯一信息是对 MSMQ 2.0 中问题的引用(此问题发生在 MSMQ 4.0 中)。我已经验证在服务和网站关闭时在总线上调用了 Dispose。
有谁知道为什么会发生这种情况?谢谢!
I'm seeing a really strange error that I'm having a difficult time
tracking down. I think its related to my configuration of Rhino ESB, though I'm not sure
if RSB is actually causing it, so I figured I'd ask and see if
anyone else has come across this in any other usages of MSMQ.
I'm using RSB as a client in a web app (ASP.NET, the client runs in the background). The client talks to a windows service via the MSMQ binding for RSB. Restarting the service never appears to have an effect on MSMQ, neither does restarting IIS by hand. However, whenever I actually restart the computer itself, MSMQ always refuses to start back up, claiming that a "queue is in an inconsistent state". Attempting to start MSMQ manually results in the same error, effectively rendering the MSMQ install completely useless. The only way to solve it is to actually remove then reinstall MSMQ.
The only information I've found via the almighty Google are references to a problem in MSMQ 2.0 (this problem is occurring in MSMQ 4.0). I've verified that Dispose is being called on on the bus at shutdown, in both the service and the web site.
Does anyone have any idea why this could be occurring? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我在 Window 2008 Server(虚拟机)上遇到了同样的问题。虽然环境与犀牛工具无关。
事件日志中的错误:
“消息队列服务无法启动,因为队列处于不一致状态。有关详细信息,请参阅 support.microsoft.com 上的 Microsoft 知识库文章 827493。”
正如罗伊指出的那样,这种情况每 2-3 天就会发生一次。每次我们都会按照以下步骤进行恢复 - 而不是重新安装 MSMQ。
1) 停止所有使用 MSMQ 的应用程序和服务。
2) 从任务管理器中杀死 mqsvc.exe
3) 转到 C:\Windows\System32\msmq\storage 并删除所有 .mq 文件
4) 启动MSMQ服务
4) 启动您的应用程序
I faced the same issue on Window 2008 Server (Virtual Machine). Although the environment was not related to rhino tools.
The error in the event log:
"The Message Queuing service cannot start because a queue is in an inconsistent state. For more information, see Microsoft Knowledge Base article 827493 at support.microsoft.com."
As Roy pointed out, this is happening every 2-3 days. Every time we would follow the steps below to recover - instead re-installing the MSMQ.
1) Stop all applications and services that uses MSMQ.
2) Kill the mqsvc.exe from the Task Manager
3) Go to C:\Windows\System32\msmq\storage and delete any .mq files
4) Start the MSMQ Service
4) Start your application
在我的场景中,我已经能够在 MSMQ 服务重新启动后修复“队列处于不一致状态”错误。
结果发现计算机名称太长,因此将计算机名称更改为少于 15 个字符的名称解决了该问题。
In my scenario I've been able to fix "queue is in an inconsistent state" error after MSMQ service restart.
Turns out the computer name was too long, so changing computer name to a name with less than 15 characters fixed the issue.
我的团队遇到了类似的问题,MSMQ 被 NSB 2.5 调用。最近,在基础设施将我们的虚拟机迁移到另一台物理服务器并由于某种原因降低了可用 RAM 后,这个问题就出现了。我们认为这个问题可能与内存有关。
编辑
经过一周没有再出现此问题后,我可以自信地说,提高服务器上的 RAM 解决了我们的 MSMQ 的“状态不一致”问题。请注意,我们确实必须先重新安装 MSMQ - 但问题再也没有出现,并且在 RAM 更新之前,该问题每 2 天就会弹出一次。
My team is experiencing a similar issue, with MSMQ getting called by NSB 2.5. The issue came up recently after Infrastructure moved our VM to another physical server and for some reason lowered available RAM. We think the issue may be memory-related.
EDIT
After a week of no more issues with this, I can confidently say that raising RAM on the server solved our MSMQ's "Inconsistent state" issue. Mind you, we did have to re-install MSMQ first -- but the issue never came back, and before the RAM update the issue popped up every 2 days.
通常,在 Windows 2008RC2 上,MSMQ 在重新启动后无法启动。
对我来说,两个常见问题是:
“消息队列服务无法启动,因为队列处于不一致状态”
和
“依赖服务不存在或已标记为删除”
有时,以下内容会有所帮助(尽管我们正在寻求更可靠的答案)
这种情况今年已经发生了 5 次,每次都会出现上述各种情况,并伴有大量重启。
有时,我们会恢复删除功能/添加功能,但是您可能会陷入循环。当它启动时,Windows更新服务中会发生回滚,因此该功能永远不会被卸载,并且问题永远不会被修复。
遵循上述步骤可以帮助解决这个问题。
Regularly on Windows 2008RC2, MSMQ cannot start after reboot.
The two regular issues for me are:
"The Message Queuing service cannot start because a queue is in an inconsistent state"
and
"The dependency service does not exist or has been marked for deletion"
Sometimes, the following has helped (although we are seeking a more solid answer)
This has occurred 5 times this year, and each time, a variety of the above with plenty of reboots.
Sometimes, we revert to Remove Feature / Add Feature, however you may get yourself in a loop. As it boots up, a rollback occurs in the windows update service, so the Feature is never uninstalled, and the problem is never repaired.
Following the steps above can help with that.