-
Notifications
You must be signed in to change notification settings - Fork 528
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
Why .NET 7 Sample API get "error invoking app service-a: 500 Internal Server Error" use dapr #822
Comments
attached the error screenshot. |
Maybe you just need to do this, with the GET verb Otherwise. |
@LuBu0505 thanks for report. As @msfussell says this exact command works for me with your code adding However, I believe you're missing an May I suggest you first try the Service Invocation Quickstart in entirety? That shows how to set the app-protocol and test. Then, I suggest copy in your MapGet functions, and try the dapr invoke with the |
@LuBu0505 - Any other update here? Did you try out the suggestions above ^ ^ ? |
I am also facing similar issue. when try to do service invocation working. I have two services one Client and one Server named. Attempted service invocation from Client app to Server app. used both DaprClientBuilder client and DaprClient.CreateInvokeHttpClient. Both cases I see internal server error when Client app attempting to POST request to Server app. Dapr version : 1.12 Attempted to give a try via postman directly to dapr sidecar port. http://localhost:{{dpartPortServerApp}}/v1.0/invoke/order-processor/method/Order/Create and it is actually giving same internal server 500 error. I could see the instances running in Dapr dashboard. Not sure how to get more insight on what's wrong. Client : dapr run --app-id checkout --app-port 7200 --app-protocol http --dapr-http-port 3500 -- dotnet run If I attempt directly to the Server controller route from Postman (as normal API). It works : http://localhost:7201/Order/Create but not via service invocation mechanism. Also, I have also used Quickstart as it from the dapr docs. Only checkout app invokes but order-processing doesn't receive. Any hints? if needed i can share the testapp. |
@vamanpnayak and @LuBu0505 could you try the documented steps of "dapr run -f ." in the root of the http folder? That should work. |
Ask your question here
I Have create a very sample .net 7 API and use dapr run it in my local environment.
My API Code:
and start this app by dapr run.
dapr run --app-id service-a --app-port 5001 dotnet run
After that, I saw this app already run.
PS C:\LBWorkSpace\MyCode\68-Dapr-Dotnet7\githubstartdemo\hello-world\node> dapr list
APP ID HTTP PORT GRPC PORT APP PORT COMMAND AGE CREATED DAPRD PID CLI PID APP PID RUN TEMPLATE PATH
nodeapp 3500 64657 3000 node app.js 21m 2023-04-02 12:16.29 23400 20488 18696
pythonapp 53800 53801 0 cmd /c python app.py 7m 2023-04-02 12:30.25 18648 17100 25128
service-a 56727 56728 5001 dotnet run 30s 2023-04-02 12:37.05 14996 8124 17064
But Why I can not invoke this method.
dapr invoke --app-id service-a --method Hello
dapr invoke --app-id service-a --method getservicea
Always get 500 error.
Cloud you please tell me why?
PS: I also used the quick starts dome -- "/~https://github.com/dapr/quickstarts/tree/v1.5.0/hello-world", It works. But for my Net 7 API. Not.
The text was updated successfully, but these errors were encountered: