This is the error details
System.OperationCanceledException: The supervisor is stopping, no additional
scopes can be created
at MassTransit.Util.TaskSupervisor.CreateScope(String tag)
at MassTransit.Util.TaskScope.MassTransit.Util.ITaskSupervisor.CreateScope(String tag)
at MassTransit.Util.TaskSupervisorExtensions.CreateScope(ITaskSupervisor supervisor, String tag, Func`1 afterStopped)
at MassTransit.RabbitMqTransport.Integration.RabbitMqModelCache.ModelScope..ctor(ITaskScope supervisor)
at MassTransit.RabbitMqTransport.Integration.RabbitMqModelCache.Send(IPipe`1 connectionPipe, CancellationToken cancellationToken)
at MassTransit.RabbitMqTransport.RabbitMqSendTransport.<MassTransit-Transports-ISendTransport-Send>d__6`1.MoveNext()
--- The last part of the stack trace in the previous location that caused the exception ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at MassTransit.RabbitMqTransport.Pipeline.RabbitMqBasicConsumer.<RabbitMQ-Client-IBasicConsumer-HandleBasicDeliver>d__19.MoveNext()
This error will appear on time,how to solve him,thx for help!!!!!!!!
Related
Firstly I feel like the need to qualify why having to do this on such an old version of RavenDB:
We are using Particular ServiceControl for NServiceBus/RabbitMQ message handling, namely error messages. Latest version of ServiceControl (v4.22.0) uses an embedded RavenDB v3.5 for storing among other things failed messages.
We need to monitor these failed messages using an external monitoring tool, and therefore I need to periodically scrape and group the failed messages and expose these groupings as metrics for the monitoring software to react upon.
Attempts so far
I have managed to expose the RavenDB database thus allowing myself to access it via REST/http. As such I can loop through e.g. an index using a request like
curl -X GET "http://localhost:33334/indexes/FailedMessageViewIndex?pageSize=5"
This works, but have no filtering options, field selectors or the like.
According to docs (of later versions, I admit), I should be able to query indices like this with RQL syntax:
curl -X POST "http://live-test.ravendb.net/databases/<system>/queries" -d "{ \"Query\": \"from doc in docs.FailedMessages\" }"
but I can only get it to produce the following error:
{"Url":"/databases/%3Csystem%3E/queries?debug=true","Error":"System.Exception: Error reading RavenJArray from JsonReader. Current JsonReader item is not an array: StartObject\r\n at Raven.Json.Linq.RavenJArray.Load(JsonReader reader)\r\n at Raven.Database.Server.Controllers.RavenBaseApiController.d__28.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Database.Server.Controllers.QueriesController.d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Threading.Tasks.TaskHelpersExtensions.d__1`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()"}
Now I can deduce that this /queries endpoint expects an array of some sort, but poking around Raven Studio this seems to be a fixed list of strings with which to obtain various information, e.g. payloads ["Raven/StudioConfig"], ["Raven/Alerts"] et.al.
Lastly I can seem to touch something by using the GET request I started out with with a "query" query string parameter, but I get no results - i.e.
curl -X GET http://localhost:33334/indexes/FailedMessageViewIndex?pageSize=3&query=from%20index%20FailedMessageViewIndex
Result:
{
"Results": [],
"Includes": [],
"IsStale": false,
"IndexTimestamp": "2022-10-11T23:01:30.7137228Z",
"TotalResults": 0,
"SkippedResults": 0,
"IndexName": "FailedMessageViewIndex",
"IndexEtag": "01000000-0000-0101-0000-00000000DE8D",
"ResultEtag": "6F5C0902-5EAA-79A4-9D23-B493D5048FB6",
"Highlightings": {},
"NonAuthoritativeInformation": false,
"LastQueryTime": "2022-10-11T23:01:31.6916452Z",
"DurationMilliseconds": 0,
"ScoreExplanations": {},
"TimingsInMilliseconds": {},
"ResultSize": 0
}
The question
I realize that I am at this point merely trying to guess my way through.
But my question is: can I somehow query my embedded RavenDB v3.5 with REST/http using RQL, Lucene or in some other way provide arguments as to what I wish to retrieve?
I'm looking for ways to manage and monitor groups and activities that are happening during the meets in MS Teams. So I thought this might get me started: https://github.com/microsoftgraph/aspnet-snippets-sample
I did everything according to the guide, howewer when I try to login with my work account, it outputs this error:
fail: Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler[17]
Exception occurred while processing message.
Status Code: NotFound
Microsoft.Graph.ServiceException: Code: ResourceNotFound
Message: Resource could not be discovered.
Inner error:
AdditionalData:
date: 2020-11-28T14:54:07
request-id: /*not sure you should see this*/
client-request-id: /*not sure you should see this*/
ClientRequestId: /*not sure you should see this*/
at Microsoft.Graph.HttpProvider.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Microsoft.Graph.UserRequest.GetAsync(CancellationToken cancellationToken)
at SnippetsApp.Startup.<>c__DisplayClass4_0.<<ConfigureServices>b__3>d.MoveNext() in C:\Users\master\Documents\aspnet-snippets-sample-master\SnippetsApp\Startup.cs:line 62
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Identity.Web.WebAppServiceCollectionExtensions.<>c__DisplayClass4_1.<<AddWebAppCallsProtectedWebApi>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RunAuthorizationCodeReceivedEventAsync(OpenIdConnectMessage authorizationResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt)
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
It appears that this error usually happens when trying to use mail services when user has no mailbox created.
Did I miss something?
Edit: My user type in Azure Active Directory is member.
This issue has explained this error. You need to login with a Microsoft account(personal or work/school), not an invited account.
When sending an email as a user, the user needs to have a mailbox
associated with them.
Users without a license that includes Exchange Online, as well as
external users (e.g. invited users) will generally not have a mailbox
in the tenant, and thus would be unable to send emails.
I am new to .Net Core 2.0 and Identity framework. I am trying to use OpenIddict in the project.
References:
OpenIddict (2.0.0-rc1-final)
OpenIddict.EntityFrameworkCore(2.0.0-rc1-final)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (2.0.1)
I keep on getting the following runtime error:
Invalid object name 'OpenIddictAuthorizations'.
Here is the stack trace:
at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__108_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.<ExecuteAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.<ExecuteAsync>d__32.MoveNext()
It looks like a SQL exception but I am not sure why it is looking for an object called OpenIddictAuthorizations in the database. Any help is highly appreciated.
Because you need this Table in your Db beside other tables
dbo.OpenIddictApplications
dbo.OpenIddictAuthorizations
dbo.OpenIddictScopes
dbo.OpenIddictTokens
So, OpenId can store the tokens and verify them.
When creating a new order I am seeing long execution times and then it finally fails with a TaskCanceledException.
I'm using my own payment module and I've compared it to one's written already and I seem to be implementing things right. The payment is being processed.
https://github.com/montanehamilton/vc-module-PayPal-Rest
I do have a custom shipping method module as well
https://github.com/montanehamilton/vc-fedex
Any thought's on where to look when encountering this behavior? Running 2.13.9 of the platform.
Exception Details
POST storefrontapi/cart/createorder 500 Internal Server Error A task was canceled.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at VirtoCommerce.Storefront.AutoRestClients.OrdersModuleApi.OrderModule.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at VirtoCommerce.Storefront.AutoRestClients.OrdersModuleApi.OrderModuleExtensions.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at VirtoCommerce.Storefront.Controllers.Api.ApiCartController.d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.b__36(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.b__32(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult)
The tasks were getting canceled due to timeouts. The VirtoCommerce storefront should be configured to set these timeouts to a value appropriate for the task.
In my case PayPal recommends at least 30 seconds, if not more. I set the timeout to 1 minute and the problem was resolved.
You can set the AppSetting with name "VirtoCommerce:Storefront:ApiRequest:Timeout" in your web.config to change the timeout when making API calls.
I recommend update platform to 2.13.11 and modules to latest version.
The update reduced Memory Usage and performance during order flow, so we can decrease Azure price plan.
Just running with a vanilla NServiceBus 6.0.0-beta0004
var endpointConfiguration = new EndpointConfiguration("endpoint");
endpointInstance = await Endpoint.Start(endpointConfiguration).ConfigureAwait(false);
This throws an exception:
Bus.ProgramService An unhandled error has occurred.
Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'NServiceBus.RecoverabilityExecutorFactory' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
at NServiceBus.AutofacObjectBuilder.Build(Type typeToBuild) in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\ObjectBuilder\Autofac\AutofacObjectBuilder.cs:line 39
at NServiceBus.CommonObjectBuilder.Build[T]() in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\ObjectBuilder\Common\CommonObjectBuilder.cs:line 28
at NServiceBus.StartableEndpoint.CreateReceivers() in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\StartableEndpoint.cs:line 93
at NServiceBus.StartableEndpoint.<Start>d__1.MoveNext() in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\StartableEndpoint.cs:line 45
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at NServiceBus.Endpoint.<Start>d__1.MoveNext() in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\Endpoint.cs:line 28
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
What am I missing? My understanding is that the Recoverability stuff is to do with the First Level Retries + Second Level Retries but I've not set this up yet. Moreover, there seems to be discussion between the guys about this already: https://github.com/Particular/NServiceBus/pull/3828
Any help would be greatly appreciated :)
As Daniel already mentioned in the comments, this code should not be part of the available beta packages. It's highly recommended to stick with the available beta packages on NuGet instead because it's very likely to run into issues when using any persistence/transport package otherwise. The release-6.0.0 branch is still under active development.
(But of course that exception should not occur at all ;) )