components-contrib: Sql Server state component error: Dapr.Actors.ActorMethodInvocationException
Issue Description
I am trying to replace the redis store by azure sql server. The target table is created successfuly but whenever I try to create a proxy actor I get this error when trying to execute a method Unhandled exception. Dapr.Actors.ActorMethodInvocationException: Remote Actor Method Exception
---> Dapr.Actors.DaprException: not found
at Dapr.Actors.DaprHttpInteractor.SendAsyncHandleUnsuccessfulResponse(Func1 requestFunc, String relativeUri, String requestId, CancellationToken cancellationToken) at Dapr.Actors.DaprHttpInteractor.SendAsync(Func1 requestFunc, String relativeUri, String requestId, CancellationToken cancellationToken)
at Dapr.Actors.DaprHttpInteractor.GetStateAsync(String actorType, String actorId, String keyName, CancellationToken cancellationToken)
at Dapr.Actors.Runtime.DaprStateProvider.ContainsStateAsync(String actorType, String actorId, String stateName, CancellationToken cancellationToken)
Actual Behavior
Receiving a Remoted Actor Method not found If I swap sqlstate.yaml with redis state.yaml everything works fine again
LOGS:
== DAPR == time="2020-02-21T12:14:57+01:00" level=info msg="starting Dapr Runtime -- version 0.4.0 -- commit v0.3.0-rc.0-73-ga1e270f-dirty"
== DAPR == time="2020-02-21T12:14:57+01:00" level=info msg="log level set to: info"
== DAPR == time="2020-02-21T12:14:57+01:00" level=info msg="standalone mode configured"
== DAPR == time="2020-02-21T12:14:57+01:00" level=info msg="dapr id: lande_actor"
== DAPR == time="2020-02-21T12:14:57+01:00" level=info msg="mTLS is disabled. Skipping certificate request and tls validation"
== DAPR == time="2020-02-21T12:14:57+01:00" level=info msg="loaded component statestore (state.sqlserver)"
== DAPR == time="2020-02-21T12:14:57+01:00" level=info msg="loaded component servicebus (pubsub.azure.servicebus)"
== DAPR == time="2020-02-21T12:14:57+01:00" level=info msg="application protocol: http. waiting on port 5000"
== APP == info: Microsoft.Hosting.Lifetime[0]
== APP == Now listening on: http://localhost:5000
== APP == info: Microsoft.Hosting.Lifetime[0]
== APP == Application started. Press Ctrl+C to shut down.
== APP == info: Microsoft.Hosting.Lifetime[0]
== APP == Hosting environment: Development
== APP == info: Microsoft.Hosting.Lifetime[0]
== APP == Content root path: C:\source\labs\dapr\dotnet\MyActorService
== DAPR == time="2020-02-21T12:15:00+01:00" level=info msg="application discovered on port 5000"
== DAPR == time="2020-02-21T12:15:00+01:00" level=info msg="application configuration loaded"
== APP == Listing subscription topics
== DAPR == time="2020-02-21T12:15:01+01:00" level=info msg="App is subscribed to the following topics: [topic1]"
== DAPR == time="2020-02-21T12:15:02+01:00" level=info msg="Initialized service discovery to standalone"
== DAPR == time="2020-02-21T12:15:02+01:00" level=info msg="actor runtime started. actor idle timeout: 1h0m0s. actor scan interval: 30s"
== DAPR == time="2020-02-21T12:15:02+01:00" level=info msg="actors: starting connection attempt to placement service at localhost:6050"
== DAPR == time="2020-02-21T12:15:02+01:00" level=info msg="http server is running on port 3500"
== DAPR == time="2020-02-21T12:15:02+01:00" level=info msg="gRPC server is running on port 27443"
== DAPR == time="2020-02-21T12:15:02+01:00" level=info msg="local service entry announced"
== DAPR == time="2020-02-21T12:15:02+01:00" level=info msg="dapr initialized. Status: Running. Init Elapsed 4775.6745ms"
Sql state store definition file:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
spec:
type: state.sqlserver
metadata:
- name: connectionString
value: server=server.database.windows.net;user id=dwlab;password=pass!;port=1433;database=db1;
- name: tableName
value: dapr
- name: actorStateStore
value: "true"
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (20 by maintainers)
Ok so we really need to try and save the data with HTTP, because if the data fails to get written than its normal for the not found error to return
Good job!
We now know it’s coming from here: https://github.com/dapr/components-contrib/blob/5b75f4d0fbc6cee6b8ef2576abd203eb826e8032/state/sqlserver/sqlserver.go#L440