2016-07-27 25 views
1

我们正在测试一个ASP.net核心应用程序,它在IIS自动使用的“反向代理”系统中运行dotnet.exe进程时崩溃,如果您已将IIS .net核心托管选项安装到您的计算机中。IIS内部的dotnet进程崩溃。我如何确定原因和补救措施?

一旦dotnet进程(本例中为五个)崩溃,所有请求都会返回502个错误,并且IIS不会通过重新启动dotnet进程进行恢复。

IIS日志记录(在事件查看器中)没有任何内容可以指示池为什么崩溃,有时IIS管理界面显示池已“停止”并且有时会“启动”,但在任务经理,所有的dotnet.exe进程已经消失。

我们要平分(从我们的代码以前提交重建),直到我们隔离,但是,这个问题主要是关于国际空间站和DOTNET的反向代理:

  • 难道还有比事件查看器其他地方(eventvwr.msc)可能包含IIS反向代理和dotnet.exe主机进程的相关日志记录?在事件查看器中没有看起来相关的当前项目。除了我们发生崩溃的日子之外,还有一些消息显示WAS启动并重新启动IIS池,但是当dotnet进程刚刚消失时没有任何消息。

iis messages in event viewer

  • 是否有DOTNET运行任何已知的错误导致它崩溃,和IIS没有恢复并重新启动进程?

  • 我从IIS看到的唯一记录是GET/POST请求,在C:\inetpub\logs\LogFiles\...没有有用的信息

更新:从今天开始,我现在看到一些相关的事件查看器条目: Failed to start process with commandline '"dotnet" .\MyCompany.Authorization.Api.dll', ErrorCode = '0x80004005'. from Source: IIS AspNetCore Module

+2

尝试查看“Windows日志\应用程序”事件。可能有一些东西可能与源'IIS AspNetCore模块'。 – pepo

+1

您是否尝试编辑web.config并设置了'''stdoutLogEnabled'为true? – Tseng

+0

我现在认为这是用于DOTNET进程的新IIS托管模型中的一个错误。 –

回答

0

看起来IIS在这种情况下崩溃了,而不是我的应用程序池中的dotnet进程。我的证据是,C:\ inetpub \ logs \ LogFiles \ W3SVC1中的日志文件显示了这一点,这看起来像IIS本身正在崩溃并正在重新启动。请注意,“#”在什么样子了一些初步bringup /启动日志的开头:

2016-08-03 13:30:09 W3SVC1 192.168.215.35 GET /api/v3/fhir/patient/311 - 80 - 192.168.215.164 HTTP/1.1 python-requests/2.10.0 - dev-html5.mycompany.biz 404 0 2 1405 1099 0 
2016-08-03 13:31:19 W3SVC1 192.168.215.35 OPTIONS /api/v3/fhir/code _dc=1470231079494 80 - 192.168.225.119 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 http://localhost:8086/ dev-html5.mycompany.biz 200 0 0 206 544 109 
2016-08-03 13:31:21 W3SVC1 192.168.215.35 OPTIONS /api/v3/fhir/imagingstudy/297 _dc=1470231081268 80 - 192.168.225.119 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 http://localhost:8086/ dev-html5.mycompany.biz 200 0 0 206 556 312 
2016-08-03 13:31:33 W3SVC1 192.168.215.35 OPTIONS /api/v3/fhir/code _dc=1470231093098 80 - 192.168.225.119 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 http://localhost:8086/ dev-html5.mycompany.biz 200 0 0 206 544 53 
2016-08-03 13:31:34 W3SVC1 192.168.215.35 OPTIONS /api/v3/fhir/imagingstudy/297 _dc=1470231094714 80 - 192.168.225.119 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 http://localhost:8086/ dev-html5.mycompany.biz 200 0 0 206 556 59 
#Software: Microsoft Internet Information Services 8.5 
#Version: 1.0 
#Date: 2016-08-03 13:33:03 
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken 
2016-08-03 13:33:03 W3SVC1 192.168.215.35 GET /api/v3/fhir/organization/1 - 80 - 192.168.215.35 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 - dev-html5.mycompany.biz 502 5 0 1627 1255 519 
2016-08-03 13:33:10 W3SVC1 192.168.215.35 GET /api/v3/authorize/login username=admin&password=mycompanyx 80 - 192.168.215.164 HTTP/1.1 python-requests/2.10.0 - dev-html5.mycompany.biz 502 5 0 1627 210 520 
2016-08-03 13:33:23 W3SVC1 192.168.215.35 GET /api/v3/fhir/organization/1 - 80 - 192.168.215.35 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 - dev-html5.mycompany.biz 502 5 0 1627 1255 523 
#Software: Microsoft Internet Information Services 8.5 
#Version: 1.0 
#Date: 2016-08-03 13:34:06 
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken 
2016-08-03 13:34:06 W3SVC1 192.168.215.35 OPTIONS /api/v3/fhir/linkage/patient/315 _dc=1470231246063 80 - 192.168.225.30 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 http://localhost:8086/ dev-html5.mycompany.biz 502 5 0 1627 511 548 
#Software: Microsoft Internet Information Services 8.5 
#Version: 1.0 
#Date: 2016-08-03 13:34:18 
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken 
2016-08-03 13:34:18 W3SVC1 192.168.215.35 GET /api/v3/fhir/organization/1 - 80 - 192.168.215.35 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 - dev-html5.mycompany.biz 502 5 0 1627 1255 531 
2016-08-03 13:34:41 W3SVC1 192.168.215.35 GET /api/v3/authorize/login username=admin&password=mycompanyx 80 - 192.168.215.164 HTTP/1.1 python-requests/2.10.0 - dev-html5.mycompany.biz 502 5 0 1627 210 531 
2016-08-03 13:34:46 W3SVC1 192.168.215.35 OPTIONS /api/v3/fhir/code _dc=1470231282672 80 - 192.168.225.119 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 http://localhost:8086/ dev-html5.mycompany.biz 502 5 0 1627 544 777 
2016-08-03 13:34:46 W3SVC1 192.168.215.35 OPTIONS /api/v3/fhir/imagingstudy/297 _dc=1470231284575 80 - 192.168.225.119 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 http://localhost:8086/ dev-html5.mycompany.biz 502 5 0 1627 556 1037 
2016-08-03 13:34:57 W3SVC1 192.168.215.35 GET /api/v3/fhir/organization/1 - 80 - 192.168.215.35 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 - dev-html5.mycompany.biz 502 5 0 1627 1221 530 
2016-08-03 13:35:00 W3SVC1 192.168.215.35 OPTIONS /api/v3/fhir/code _dc=1470231299728 80 - 192.168.225.119 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/51.0.2704.103+Safari/537.36 http://localhost:8086/ dev-html5.mycompany.biz 502 5 0 1627 544 527 

我要尽量让重复性试验基地,但现在这似乎是相关的:

  1. Windows Server 2012 R2上的IIS与安装的dotnet IIS托管更新以及所有最新的Windows更新。

  2. IIS在单个应用程序池中托管多个应用程序。由于存在已知问题(如此),我决定(由我)在单个池中托管多个应用程序可能是“不推荐”的,但是当我获得更好的信息时,我会更新此答案。

此外,当IIS崩溃时,IIS失败请求跟踪(FREB)似乎很有用。 See this article

更新:我设置了一个Azure虚拟机,并能够复制并向Microsoft提供详细信息。该研究的结果发布在IISIntegration Github issue 245 here.上。一种特定的问题,我正在经历的解决办法是由某人在微软向我建议,解决方法的思路是:

  • 在部署IIS dotnet的核心应用相对变化的web.config文件名推出绝对的文件名,从,例如<aspNetCore processPath="dotnet" arguments=".\yourapp.dll" ... /><aspNetCore processPath="dotnet" arguments="c:\full\path\to\yourapp.dll" ... />,并将代码更改为Startup.cs和Program.cs,以检查环境是否为Release,如果是,则始终将应用程序当前工作目录作为Web根目录而不是提供的环境Web根目录。

  • 在运行时,每次部署之后,手动重新应用web.config更改是因为无法修改项目中的web.config源(输入)文件,只有部署的最终二进制内容(在完成dotnet发布之后)。

+0

关于github/iis集成的相关讨论:https://github.com/aspnet/IISIntegration/issues/245 –

+0

我不认为这和你的帐户是一样的,是吗? http://stackoverflow.com/users/6684540/warren-p –

+0

另外:http://meta.stackoverflow.com/questions/331857/how-to-deal-with-a-possible-fake-account –

相关问题