2016-05-16 10 views
0

私のasp.net 5/mvc6 WebサイトをAzureのアプリケーション/ Webサイト環境に展開するのに問題はありませんでしたが、先月私は奇妙な問題を抱えています。MVC 6 WebサイトをAzureに展開するとエラー502

ウェブサイトをAzureに展開すると、90%の時間で、デプロイが成功するとブラウザが自動的に開き、5分間だけロードされ、最終的に私に502エラーまたは500エラーが表示されますタイムアウト。私は何度も再展開することができますが、決してうまくいかないでしょう。基本的な空のWebサイトと私のWebサイトの違いを特定することはできません。なぜなら、空のテンプレートWebサイトは最初はうまくいくはずですが、問題のWebサイトにインラインで変更を加えるとエラーが発生しますが、空の「こんにちはの世界」のウェブサイトでも問題は解決されます。

リモートデバッグに至るまでに至るまでのコードは無駄です。問題はアプリの起動時に発生します。同プロジェクトは、新しい/空の溶液中で仕事をするので、私がこれまで伝えることができるものから、

更新

は、それが ソリューションに関連しているようだということです。 I はSolution Itemsに global.jsonと.tfignoreという基本的なSoluion Items/src/test/toolsフォルダ構造を持っています。

eventlog.xmlは私に

View Msvsmon's help for more information.</Data><Binary>08005E80</Binary></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-15T18:40:24Z"/><EventRecordID>1002678312</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '6424' failed to start. Port = 11271, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-15T19:40:29Z"/><EventRecordID>1006283437</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '9840' failed to start. Port = 20348, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-15T20:40:41Z"/><EventRecordID>1009895484</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '9796' failed to start. Port = 27433, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-15T21:40:56Z"/><EventRecordID>1013510812</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '7748' failed to start. Port = 33738, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-15T22:41:16Z"/><EventRecordID>1017131093</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '5844' failed to start. Port = 20405, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-15T23:41:43Z"/><EventRecordID>1020757406</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '4208' failed to start. Port = 16859, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T00:42:13Z"/><EventRecordID>1024387796</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '8840' failed to start. Port = 23996, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T01:42:48Z"/><EventRecordID>1028023000</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '8724' failed to start. Port = 9206, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T02:43:29Z"/><EventRecordID>1031663140</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '320' failed to start. Port = 9307, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T03:44:14Z"/><EventRecordID>1035308281</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '9540' failed to start. Port = 27060, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T04:44:14Z"/><EventRecordID>1038908703</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '8212' failed to start. Port = 31282, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T05:44:20Z"/><EventRecordID>1042514234</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '9608' failed to start. Port = 23608, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T06:44:30Z"/><EventRecordID>1046124390</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '4216' failed to start. Port = 15739, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T07:44:45Z"/><EventRecordID>1049739625</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '3544' failed to start. Port = 13495, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T08:45:05Z"/><EventRecordID>1053359796</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '908' failed to start. Port = 6457, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T09:45:30Z"/><EventRecordID>1056984968</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '5272' failed to start. Port = 32023, Error Code = '-2147023829'.</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>1000</EventID><Level>0</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2016-05-16T10:46:01Z"/><EventRecordID>1060615265</EventRecordID><Channel>Application</Channel><Computer>RD0003FF1D2CD5</Computer><Security/></System><EventData><Data>Process '7708' failed to start. Port = 9729, Error Code = '-2147023829'.</Data></EventData></Event></Events> 

私のweb.configファイルを提供します( global.jsonを削除しようとしたが、違いを生むdidntは)デフォルトです。

<handlers> 
     <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/> 
    </handlers> 
    <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/> 
+0

配置用スロットを使用します。デポイプのステージングスロットがinitilaizeを待機してからスワップします。おそらくあなたはあなたのプロジェクトを変更しており、initilaizeは通常よりも時間がかかり、この問題に直面しています。 –

+0

私はステージングに展開していますが、両方の環境に問題があります。この問題のため、スワップは成功しません。 – user2713516

答えて

0

2番目のテストソリューションで私の解決策を完全に作り直した後、プロジェクトとリファレンスを段階的に追加してブレークポイントを見つけようとしたところ、別のクラスlib(かなり大きなもの)を私のMVC6アプリケーションからそれを参照すると、それは壊れるでしょう。私が参照を削除すると、それはまだ壊れてしまうので、修正不可能な問題のように思えます。いくつかの試行錯誤の後、私はパッケージとwrap-foldersの中の参照をつぶし始め、最終的に問題を発見しました。

デフォルトでは、asp.netのライブラリでは、埋め込まれたNewtonsoft.jsonバージョン6.xxxが使用されます。 最新バージョンのNewtonsoft.json(8.xx)をMVC 6プロジェクトに追加してから、(new)newtonsoftフォルダ/ファイルをwrapとpackagesフォルダから削除しました。

また、451の代わりにDNX46に変更されました(これまでに試しましたが、問題点はありません)。

6.xxxファイルを削除した後、最初はビルドが中断しますが、Visual Studioを再起動するとこれが修正されます。

私はAzureにデプロイし、すべてが機能しました。私は今、まったく同じ問題を抱えていた複数のソリューションでこの修正を試みましたが、修正されたようです。

空のクラスlibs/mvcプロジェクトで新しいソリューションを作成するとうまくいくので、このバージョン管理の問題の原因となっている参照されたクラスlibに何かがある可能性がありますが、どちらかといえば解決してうれしいです。

0

タイムアウトや関連するさまざまな問題についていくつかの制限があるようです。とパフォーマンス、確かに。 Webアプリケーションを標準のようなよりパワフルなモードに移行し、それが役立つかどうか確認してください。 次に、500/502の理由を言うのは簡単ではありません。これらのエラーのトラブルシューティングにはofficial guidanceがあります。

まず、herehereのような冗長な診断を有効にし、ログに何か問題がないかどうかを確認します。また、いくつかのログは、LogFilesコンソールのデバッグコンソールでKuduコンソール(http://webappname.scm.azurewebsites.net、メモSCM)を介して利用できます。

+0

私はガイドラインの中で基本的にすべてを試しましたが、イベントログのエラー2147023829のほかに、Azureのトラブルシューティングガイド/アクションから多くは得られません。私も大きなインスタンスにスケールアップしましたが、それは違いをもたらしませんでした。 (私はスタンダード・スモールになっています) – user2713516

+0

ええ、私は古いGitHubの問題を発見しました。私は何とか構成に関連していると思います。 [https://github.com/aspnet/Home/issues/1147]があなたの問題と何らかの形で似ているのを見てみてください。 –

+0

私はスレッドも見つけましたが、それは非常によく似ていますが、彼の解決策は私のためにそれをしません。 – user2713516

関連する問題