跟踪系统重启
我编写了一个 Windows 服务,它是软件的一部分,我在 Windows Server 2003 和 2008 上部署了该服务,客户联系我抱怨说,当他们重新启动服务器时,他们不断重新启动,这种情况发生在具有两个不同客户端的两台计算机上,使用上次正确的配置重新启动服务器有效,并且服务器已启动,我连接到其中一台服务器并运行进程监视器,我启用了启动日志记录,然后再次安装了我的服务,问题再次出现,使用上次正确的配置启动系统工作正常,查看启动日志显示服务工作正常,没有什么奇怪的,我决定安装虚拟机并尝试重复该操作,当我这样做时,我发现虚拟机到达登录管理器,然后经过几次秒它重新启动,它一直这样做,直到我以最后一次良好的配置启动机器,没有机会登录并运行进程监视器,有什么建议如何跟踪这个问题吗?任何 sysinternals 工具可以提供帮助吗?
提前致谢,
I've written a windows service thats part of software, I deployed the service on both windows server 2003 and 2008, the client contacted me complaining that when they restarted their servers they kept restarting and this happened on the two machines with two different clients,restarting the servers with last good configuration worked, and the servers are up, I connected to one of the server and ran process monitor, I enabled boot logging then installed my service again , the problem appeared again, booting the system with last good configuration worked, looking at the boot log showed the service works properly and nothing is strange, I decided to install a virtual machine and try to repeat the action, when I did so I found that the virtual machine, reaches the login manager then after a few seconds it restarts, it keeps doing so until I boot the machine in last good configuration, there is no chance to login and run process monitor, any suggestion how to track this problem? any of the sysinternals tools could help?
Thanks in advance,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
其他人可能会建议一些好的工具,但如果全部失败,您可以做的是在服务中编写一个函数,将字符串参数附加到某个文本文件,然后在每行(或每 n 个)行后使用递增的数字调用该函数tge 服务启动代码。然后重复您的测试。重新启动后,检查该文件,它会准确地告诉您哪一行导致计算机重新启动。您可以检查代码以查找原因或在此处发布有问题的代码,人们也许能够更好地帮助您。
Others might be able to suggest some good tools but if all fails what you can do is write a function within your service that appends a string parameter to some text file and then call that function with an incrementing number after every (or every nth) line of tge service startup code. Then repeat your tests. After the reboot, check the file and it will precisely tell you what line caused the computer to restart. You can check the code to find the reason or post the offending code here and people may be able to help you better.