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

Service invocation response ERR_DIRECT_INVOKE #4332

Closed
sergiibielskyi opened this issue Mar 7, 2022 · 6 comments
Closed

Service invocation response ERR_DIRECT_INVOKE #4332

sergiibielskyi opened this issue Mar 7, 2022 · 6 comments
Labels
kind/bug Something isn't working

Comments

@sergiibielskyi
Copy link

Hi, I try to play with service invocation but I see an error like this
{
"errorCode": "ERR_DIRECT_INVOKE",
"message": "fail to invoke, id: cosmosdb, err: couldn't find service: cosmosdb"
}

My command to run
dapr run --app-id cosmosdb --app-port 5298 --dapr-http-port 50001 --components-path Components dotnet run

I have two web APIs and trying to call web method
var client = new DaprClientBuilder().Build();
var result = client.CreateInvokeMethodRequest(HttpMethod.Get, "cosmosdb", "api/objects/all");
return await client.InvokeMethodWithResponseAsync(result);

I use macOS M1 with latest updates. Any ideas?

@sergiibielskyi sergiibielskyi added the kind/bug Something isn't working label Mar 7, 2022
@shubham1172
Copy link
Member

Can you please share the logs from dapr run?

@sergiibielskyi
Copy link
Author

Can you please share the logs from dapr run?

Hi, sure. Take a look below,
Starting Dapr with id cosmosdb. HTTP Port: 50001. gRPC Port: 58073
INFO[0000] starting Dapr Runtime -- version 1.6.0 -- commit 4bb25fa app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0000] log level set to: info app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0000] metrics server started on :58074/ app_id=cosmosdb instance=machine.local scope=dapr.metrics type=log ver=1.6.0
INFO[0000] standalone mode configured app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0000] app id: cosmosdb app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0000] mTLS is disabled. Skipping certificate request and tls validation app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0000] local service entry announced: cosmosdb -> 192.168....:58078 app_id=cosmosdb instance=machine.local scope=dapr.contrib type=log ver=1.6.0
INFO[0000] Initialized name resolution to mdns app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0000] loading components app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0000] component loaded. name: azurekeyvault, type: secretstores.azure.keyvault/v1 app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0000] waiting for all outstanding components to be processed app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
== APP == Building...
INFO[0002] component loaded. name: cosmosdb, type: state.azure.cosmosdb/v1 app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0002] all outstanding components processed app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0002] enabled gRPC tracing middleware app_id=cosmosdb instance=machine.local scope=dapr.runtime.grpc.api type=log ver=1.6.0
INFO[0002] enabled gRPC metrics middleware app_id=cosmosdb instance=machine.local scope=dapr.runtime.grpc.api type=log ver=1.6.0
INFO[0002] API gRPC server is running on port 58073 app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0002] enabled metrics http middleware app_id=cosmosdb instance=machine.local scope=dapr.runtime.http type=log ver=1.6.0
INFO[0002] enabled tracing http middleware app_id=cosmosdb instance=machine.local scope=dapr.runtime.http type=log ver=1.6.0
INFO[0002] http server is running on port 50001 app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0002] The request body size parameter is: 4 app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0002] enabled gRPC tracing middleware app_id=cosmosdb instance=machine.local scope=dapr.runtime.grpc.internal type=log ver=1.6.0
INFO[0002] enabled gRPC metrics middleware app_id=cosmosdb instance=machine.local scope=dapr.runtime.grpc.internal type=log ver=1.6.0
INFO[0002] internal gRPC server is running on port 58078 app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0002] application protocol: http. waiting on port 5298. This will block until the app is listening on that port. app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
ℹ️ Updating metadata for app command: dotnet run
✅ You're up and running! Both Dapr and your app logs will appear here.

== APP == info: Microsoft.Hosting.Lifetime[14]
== APP == Now listening on: https://localhost:5001
== APP == info: Microsoft.Hosting.Lifetime[14]
== APP == Now listening on: http://localhost:5298
== 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: /../Project
INFO[0005] application discovered on port 5298 app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0005] application configuration loaded app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
WARN[0005] failed to init actors: no actor state store defined app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0
INFO[0005] dapr initialized. Status: Running. Init Elapsed 5840.912ms app_id=cosmosdb instance=machine.local scope=dapr.runtime type=log ver=1.6.0

@shubham1172
Copy link
Member

It looks related to #3256

Can you please check the related issues in that issue (starting with #2665) to see if it helps you?

@sergiibielskyi
Copy link
Author

It looks related to #3256

Can you please check the related issues in that issue (starting with #2665) to see if it helps you?

I do not have any VPN enabled services. Only antivirus firewall. Anyway let me try to disable it to see if it is fixed afterward

@sergiibielskyi
Copy link
Author

Yes, after removing, it works
Знімок екрана 2022-03-09 о 12 18 08

@sergiibielskyi
Copy link
Author

that works right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants