Open tvikure opened 1 month ago
Usually that error indicates that the actor has not been registered correctly.
Are you sure the ordering is correct?
Should you first await server.actor.init();
then call server.actor.registerActor(MyActor)
afterwards?
You log out console.log('server created');
but it hasn't been started yet, its just an object at that point.
The documentation has it this way:
import { DaprServer } from "@dapr/dapr";
import ParkingSensorImpl from "./ParkingSensorImpl";
const daprHost = "127.0.0.1";
const daprPort = "50000";
const serverHost = "127.0.0.1";
const serverPort = "50001";
const server = new DaprServer({
serverHost,
serverPort,
clientOptions: {
daprHost,
daprPort,
},
});
await server.actor.init(); // Let the server know we need actors
server.actor.registerActor(ParkingSensorImpl); // Register the actor
await server.start(); // Start the server
// To get the registered actors, you can invoke `getRegisteredActors`:
const resRegisteredActors = await server.actor.getRegisteredActors();
console.log(`Registered Actors: ${JSON.stringify(resRegisteredActors)}`);
Ask your question here
I am trying to run a nodejs express app to create actors on demand in kubernetes. I have below services running in dapr-system namespace.
dapr-operator-559ff985fd-7s4wj
dapr-placement-server-0 dapr-scheduler-server-0
dapr-sentry-7f6966fd59-mg8jt
dapr-sidecar-injector-65fd7d94c5-qks5q
in the default namespace
my-node-app and redis is running.
When trying to create actors on demand facing the below error. Please suggest. Trying to fix this from 48 hours. this is only issue when running kubernetes cluster. When I try to run in local using dapr run it is working fine.
using below versions.
Daprd failure (attached detailed log file)
time="2024-09-29T12:01:17.372807304Z" level=warning msg="Error processing operation DaprBuiltInActorNotFoundRetries. Retrying in 1s…" app_id=my-node-app instance=my-node-app-7b84959966-m4whv scope=dapr.runtime type=log ver=1.14.4
my-node-app logs
Deployment yaml
daprd_log.txt