Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error actor instance is missing #1184

Open
tructran91 opened this issue Nov 7, 2023 · 4 comments
Open

Error actor instance is missing #1184

tructran91 opened this issue Nov 7, 2023 · 4 comments
Labels
area/actor/runtime question Further information is requested

Comments

@tructran91
Copy link

Ask your question here

I'm using .NET 6 and Dapr.Actors.AspNetCore version 1.8.0. I have an error: "actor instance is missing" when trying to load state via this.StateManager.GetStateAsync(). This error is not always but often occurs. Below is some information. How can I fix it?

Dapr.DaprApiException: actor instance is missing at async Task<HttpResponseMessage> Dapr.Actors.DaprHttpInteractor.SendAsyncHandleUnsuccessfulResponse(Func<HttpRequestMessage> requestFunc, string relativeUri, CancellationToken cancellationToken) at async Task<HttpResponseMessage> Dapr.Actors.DaprHttpInteractor.SendAsync(Func<HttpRequestMessage> requestFunc, string relativeUri, CancellationToken cancellationToken) at async Task<string> Dapr.Actors.DaprHttpInteractor.GetStateAsync(string actorType, string actorId, string keyName, CancellationToken cancellationToken) at async Task<ConditionalValue<T>> Dapr.Actors.Runtime.DaprStateProvider.TryLoadStateAsync<T>(string actorType, string actorId, string stateName, CancellationToken cancellationToken) at async Task<ConditionalValue<T>> Dapr.Actors.Runtime.ActorStateManager.TryGetStateAsync<T>(string stateName, CancellationToken cancellationToken) at async Task<PlatformTradingAccount> Service.Actors.GetAccountFromStateManagerAsync(CancellationToken cancellationToken) in /src/Service/Actor.cs:line 127 at async void Service.Actors.OnOrderUpdateEvent(object sender, OrderUpdateEventArgs updateEvent) in /src/Actor.cs:line 236

dapper

@philliphoff
Copy link
Collaborator

@tructran91 Several questions:

  • What version of Dapr runtime are you using?
  • Do you see this only in production or does it also reproduce locally?
  • Have you tried using the 1.12 versions of both the Dapr runtime and Dapr .NET SDK?
  • Do you have any Dapr sidecar logs (preferably with --log-level set to debug) for the period in which the error occurs?

@halspang
Copy link
Contributor

halspang commented Nov 7, 2023

@tructran91 - This most likely means that the actor isn't hosted in your runtime. Is this the app that hosts the actor?

1.8 is quite old though, and no longer officially supported. I'd recommend updating to 1.12 and we can debug from there. Here is the list of supported version.

@halspang halspang added question Further information is requested area/actor/runtime labels Nov 7, 2023
@tructran91
Copy link
Author

Thank you for your reply.

@philliphoff

  • We're using version 1.11.0 of Dapr runtime, in our source code, we use Dapr.Actors.AspNetCore version 1.8.0
  • It happen both production and locally, it very hard to reproduce. It not always occurs
  • We use ELK to log error and info happen in system

image

@halspang
Copy link
Contributor

halspang commented Dec 1, 2023

I would still recommend updating the Dapr.Actors.AspNetCore version.

Generally though, this error simply means there isn't a host available for that actor. Do you see any instances of your apps restarting? It could be that they are temporarily down and thus no longer receiving traffic. Without seeing more of your code and how you setup/register your actors though, we can't debug a whole lot more from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/actor/runtime question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants