不确定该问题是否专门针对使用基于Postgres的EF数据库运行的dockerized .NET Core应用程序,但确实如此。
我实际上正在运行一个.NET Core 2.2.6应用程序,该应用程序仅:
我在本地成功运行了这个项目5天,还尝试在kubernetes集群上更改pod,但没有成功。这就是我总是在kube集群上获得的日志:
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
No XML encryptor configured. Key {918d59eb-e0f5-4a5a-83c9-e5dc196805f5} may be persisted to storage in unencrypted form.
warn: Microsoft.EntityFrameworkCore.Model.Validation[20600]
Property 'Guid' on entity type 'ApiToken' is part of a primary or alternate key but has a constant default value set. Constant default values are not useful for primary or alternate keys since these properties must always have non-null unqiue values.
warn: Microsoft.AspNetCore.Mvc.RazorPages.Internal.CompiledPageRouteModelProvider[1]
The page at '/Areas/Users/Views/Manage/ExternalLogins.cshtml' is located under the area root directory '/Areas/' but does not follow the path format '/Areas/AreaName/Pages/Directory/FileName.cshtml
warn: Microsoft.EntityFrameworkCore.Query[10106]
The Include operation for navigation '[ct].Currencies.AnalysedComponents.AnalysedHistoricItems' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information.
warn: Microsoft.EntityFrameworkCore.Query[10106]
The Include operation for navigation '[ct].Currencies.Requests.RequestComponents' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information.
warn: Microsoft.EntityFrameworkCore.Query[20500]
The LINQ expression 'where [ct].TypeShortForm.Equals(__typeShortForm_0, InvariantCultureIgnoreCase)' could not be translated and will be evaluated locally.
warn: Microsoft.EntityFrameworkCore.Query[20500]
The LINQ expression 'from Currency <generated>_0 in {from Currency c in value(Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[Nozomi.Data.Models.Currency.Currency]) where (([c].DeletedAt == null) AndAlso [c].IsEnabled) where {from AnalysedComponent ac in value(Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[Nozomi.Data.Models.Web.Analytical.AnalysedComponent]) where (([ac].DeletedAt == null) AndAlso [ac].IsEnabled) where ?= (Convert(Property([c], "Id"), Nullable`1) == Property([ac], "CurrencyId")) =? select [ac] => Any()} orderby [c].Id asc where ?= (Property([ct], "Id") == Property([c], "CurrencyTypeId")) =? select new Currency() {Id = [c].Id, CurrencyTypeId = [c].CurrencyTypeId, Abbreviation = [c].Abbreviation, Slug = [c].Slug, Name = [c].Name, Description = [c].Description, Denominations = [c].Denominations, DenominationName = [c].DenominationName, LogoPath = [c].LogoPath, AnalysedComponents = {from AnalysedComponent ac in value(Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[Nozomi.Data.Models.Web.Analytical.AnalysedComponent]) where (([ac].DeletedAt == null) AndAlso [ac].IsEnabled) where ?= (Convert(Property([c], "Id"), Nullable`1) == Property([ac], "CurrencyId")) =? select new AnalysedComponent([ac], __index_1, 100, ahi => ((((ahi.DeletedAt == null) AndAlso ahi.IsEnabled) AndAlso (ahi.HistoricDateTime >= DateTime.UtcNow.Subtract(__FromDays_2))) AndAlso IsNumericDecimal(ahi.Value)))}.ToList(), Requests = {from Request r in value(Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[Nozomi.Data.Models.Web.Request]) where (([r].DeletedAt == null) AndAlso [r].IsEnabled) where ?= (Convert(Property([c], "Id"), Nullable`1) == Property([r], "CurrencyId")) =? select new Request() {Guid = [r].Guid, RequestComponents = {from RequestComponent rc in value(Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[Nozomi.Data.Models.Web.RequestComponent]) where (([rc].DeletedAt == null) AndAlso [rc].IsEnabled) where ?= (Property([r], "Id") == Property([rc], "RequestId")) =? select [rc]}.ToList()}}.ToList()} => Skip((__index_1 * 100)) => Take(100)}' could not be translated and will be evaluated locally.
warn: Microsoft.EntityFrameworkCore.Query[10106]
The Include operation for navigation '[cp].Source' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information.
warn: Microsoft.EntityFrameworkCore.Query[20500]
The LINQ expression 'where [cp].MainCurrencyAbbrv.Equals(__currencyAbbrv_0, InvariantCultureIgnoreCase)' could not be translated and will be evaluated locally.
warn: Microsoft.EntityFrameworkCore.Query[20500]
The LINQ expression 'where (([cp.Source].DeletedAt == null) AndAlso [cp.Source].IsEnabled)' could not be translated and will be evaluated locally.
warn: Microsoft.EntityFrameworkCore.Query[10106]
The Include operation for navigation '[ct].AnalysedComponents.AnalysedHistoricItems' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information.
说实话,没有什么有见地的。
所以关键的问题是,我如何找出它挂在项目的哪一部分?
它似乎挂着了,因为日志似乎总是在此结束。