Open Closed

problems to connect between micro services - sync #4956


User avatar
0
mmaldonado@emscltd.com created
  • ABP Framework version: 6.0.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

I am facing problems to connect between micro services - sync. I know the problem is under my environment due to I tried to replicate on a empty solution from the beginning and it worked correctly.

So I would like to know if you could help me to find the error on my environment, and which information could be useful to share with you.

As initial thought I would like to share with you the error that I am facing is fired by ApiDescriptionFinder.FindActionAsync

throw new AbpException($"Could not found remote action for method: {method} on the URL: {baseUrl}");

after the call to the function throw the interface.

As second thought I already have an integration to identity service from the same microservice, so I do not know why I am facing this error


7 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    It looks like you are using the Dynamic proxy.

    The Dynamic proxy system needs to get the API defines from the gateway.

    You can consider using the Static proxy.

    • Run the abp generate-proxy -t csharp -m TheModuleNameOfServiceB -u TheURLOfServiceB on the ServiceB.HttpApi.Client project directory
    • Open the ServiceBHttpClientModule class and change AddHttpClientProxies to AddStaticHttpClientProxies

    Now it should be working.

    If you don't know the TheModuleNameOfServiceB, you can access the TheURLOfServiceB:/api/abp/api-definition endpoint to check it.

  • User Avatar
    0
    mmaldonado@emscltd.com created

    Hi,

    It looks like you are using the Dynamic proxy.

    The Dynamic proxy system needs to get the API defines from the gateway.

    You can consider using the Static proxy.

    • Run the abp generate-proxy -t csharp -m TheModuleNameOfServiceB -u TheURLOfServiceB on the ServiceB.HttpApi.Client project directory
    • Open the ServiceBHttpClientModule class and change AddHttpClientProxies to AddStaticHttpClientProxies

    Now it should be working.

    If you don't know the TheModuleNameOfServiceB, you can access the TheURLOfServiceB:/api/abp/api-definition endpoint to check it.

    Hi,

    It still load with dynamic proxy

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Open the ServiceBHttpClientModule class and change AddHttpClientProxies to AddStaticHttpClientProxies

    You can search for AddHttpClientProxies globally and replace it with AddStaticHttpClientProxies in the MicroserviceB solution.

  • User Avatar
    0
    mmaldonado@emscltd.com created

    Hi,

    Open the ServiceBHttpClientModule class and change AddHttpClientProxies to AddStaticHttpClientProxies

    You can search for AddHttpClientProxies globally and replace it with AddStaticHttpClientProxies in the MicroserviceB solution.

    Hi,

    I am still facing a problem, is it possible to set a meeting to show you so you could help me find the error?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    ok shiwei.liang@volosoft.com

  • User Avatar
    1
    liangshiwei created
    Support Team Fullstack Developer

    Solved

  • User Avatar
    0
    mmaldonado@emscltd.com created

    Solved

    Check list about errors

    • Change the dynamic proxy to static
      • Not sure why it does not work with dynamic but after fix all errors it did not work with dynamic
      • I have an integration with IdentityService, and my gateway expose 7 different services, not sure if it is related
    • Fix the app service name to use AppService post fix
      • It was one service that was not resolved so is better to follow name conventions
    • The generations of the client has to be on the owner of the implementation
      • I was creating a client of MicroService B inside MicroService A
      • Also the reference of projects was not correct

    Thanks so much for your help

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09