突然出现“无法向会话状态服务器发出会话状态请求”

发布于 2024-10-01 21:21:24 字数 1382 浏览 14 评论 0原文

设置:2 个 Web 服务器和一个单独的状态服务器

我有两个采用负载平衡配置的生产 Web 服务器。他们托管的 ASP.NET Web 应用程序在其 web.configs 中使用以下行共享状态(如网络场):

<sessionState mode="StateServer" stateConnectionString="tcpip=9.9.9.9:42424" cookieless="false" timeout="60"/>

9.9.9.9 是运行 asp.net 会话状态服务的计算机的 IP(好吧,它不是 9.9.9.9.9)。 9.9真的,改了,保护无辜)。这是第三台机器(实际上是数据库服务器。

它工作得很好,直到...

错误:网站关闭!

突然网站关闭,只显示通用的 asp.net 错误页面(“关闭自定义错误以查看此错误”或其他)。

应用程序的日志记录了实际的错误消息:

发生未处理的异常无法向会话状态服务器发出会话状态请求。请确保 ASP.NET State 服务已启动,并且客户端和服务器端口相同。如果服务器位于远程计算机上,请通过检查 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection 的值来确保它接受远程请求。如果服务器位于本地计算机上,并且前面提到的注册表值不存在或设置为 0,则状态服务器连接字符串必须使用“localhost”或“127.0.0.1”作为服务器名称。

因此,Web 应用程序似乎无法联系状态服务器 (9.9.9.9)。

我“尝试转动 if auf 然后 onnegen”-重新启动状态服务器解决了问题。

为什么?

我真的很想知道发生了什么以及为什么这样我可以防止它再次发生。

到目前为止,我只有两种理论:

  1. 大约在那个时间在状态服务器上应用了 .net Framework 4 的 Windows 更新。那么也许更新对 asp.net 状态服务做了什么? Windows 事件查看器显示 .net 4 当时已记录警告:

    <块引用>

    对 IIS 元数据库的更新已中止,因为此计算机上未安装 IIS 或已禁用 IIS。要将 ASP.NET 配置为在 IIS 中运行,请安装或启用 IIS 并使用 aspnet_regiis.exe /i 重新注册 ASP.NET。

  2. 产品网站和状态服务器之间存在某种临时网络问题?不过,它们确实坐在同一个物理机架中。

  3. ???还有其他想法吗?

有人以前见过这个,或者能够纠正我的任何问题吗?

The setup: 2 web servers and a seperate state server

I have two production web servers in a load balanced configuration. The ASP.NET web app they host shares state (like a web farm) using this line in their web.configs:

<sessionState mode="StateServer" stateConnectionString="tcpip=9.9.9.9:42424" cookieless="false" timeout="60"/>

9.9.9.9 is the IP of the machine the asp.net session state service is running on (ok it's not 9.9.9.9 really, changed to protect the innocent). It's a third machine (the database server, actually.

It worked fine until...

The error: website down!

Suddenly the site went down, just showing a generic asp.net error page ('turn custom errors off to see this error' or whatever).

The app's log recorded the actual error message:

An unhandled exception occurred Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.

So it appears that the web app was unable to contact the state server (9.9.9.9).

I "tried turning if auf and then onnegen" - restarting the state server fixed the problem.

Why?

I really want know what happened and why so I can prevent it happening again.

So far all I have are two theories:

  1. A windows update, to .net framework 4, was applied around that time on the state server. So maybe the update did something to the asp.net state service? The windows event viewer showed that .net 4 had logged a warning around then:

    Updates to the IIS metabase were aborted because IIS is either not installed or is disabled on this machine. To configure ASP.NET to run in IIS, please install or enable IIS and re-register ASP.NET using aspnet_regiis.exe /i.

  2. Some kind of temporary network problem between the prod web sites and the state server? They do sit right next to each other in the same physical rack though.

  3. ??? Any other ideas, anyone?

Anyone seen this before, or able to correct me on anything?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

臻嫒无言 2024-10-08 21:21:24

从那以后还发生过这种情况吗?简单的答案是问题出在数据库服务器上,而不是网络应用程序上。 db服务器上的日志中是否有相关错误?

两个应用程序都抛出错误的事实表明问题出在公共资源上。不久前,我们花了整整一周的时间追查类似的问题,最终发现了一个有故障的光纤通道小工具。 (低于我的 OSI 级别,不确定详细信息)。

Has this happened since? The easy answer is that the problem was with the db server, not the web app. Are there any relevant errors in the log on the db server?

The fact that both apps threw an error indicates that a common resource was the problem. We chased a similar issue for a good solid week awhile back, and eventually found a faulty fiber channel gadget. (that's below my OSI level, not sure about the details).

情定在深秋 2024-10-08 21:21:24
  1. 开始->管理工具 –>服务

  2. 右键单击 ASP.NET State Service 并单击“start”

它工作正常 我们需要按照以下步骤操作

  1. Start–> Administrative Tools –> Services

  2. Right-click over the ASP.NET State Service and click “start”

It is working fine We need to follow the steps

洛阳烟雨空心柳 2024-10-08 21:21:24

之前也遇到过类似的问题,当我们的基础设施团队忘记将 3.5 安装在我们的生产设备上时,他们试图偷偷安装 3.5。框架更新后不恢复服务器只会导致各种奇怪的问题。

Had a similar issue before when our Infrastructure team tried sneaking in an install of 3.5 when they forgot to install it on our Production box. Not bouncing a server after a framework update is just going to cause all kinds of weird problems.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文