You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
node dist/index.js
server created v6
Running API server on 3000
registered actors [ 'MyActor' ]
2024-09-29T12:00:32.803Z INFO [HTTPServer, Actors] Initializing Actors
Starting Dapr server
2024-09-29T12:00:32.805Z INFO [HTTPServer, HTTPServer] Listening on 50004
2024-09-29T12:00:32.805Z INFO [HTTPServer, HTTPServer] Registering 0 PubSub Subscriptions
2024-09-29T12:00:32.810Z INFO [HTTPClient, HTTPClient] Sidecar Started
Server started successfully
builder
actor [class MyActor extends AbstractActor]
2024-09-29T12:01:17.371Z INFO [HTTPClient, HTTPClient] Sidecar Started
error creating actors Error: {"error":"Internal Server Error","error_msg":"{"errorCode":"ERR_ACTOR_INVOKE_METHOD","message":"error invoke actor method: did not find address for actor MyActor/asset-0"}","status":500}
at HTTPClient.execute (/usr/src/app/node_modules/@dapr/dapr/implementation/Client/HTTPClient/HTTPClient.js:172:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ActorClientHTTP.invoke (/usr/src/app/node_modules/@dapr/dapr/actors/client/ActorClient/ActorClientHTTP.js:21:24)
at async Proxy. (/usr/src/app/node_modules/@dapr/dapr/actors/client/ActorProxyBuilder.js:38:33)
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.
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
The text was updated successfully, but these errors were encountered: