Open Closed

Abp Remote Call Exception For Linux #6628


User avatar
0
Teknosol created
  • ABP Framework version: v7.1.1
  • UI Type:Angular
  • Database System:EF Core PostgreSQL
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hello, In our project, we make the gateway remote service using the "typeof(AbpAspNetCoreMvcClientModule)" module. The project runs smoothly in Windows DockerDesktop application, when we stand up docker containers with the same yml and same services in linux, we get the error "AbpRemoteCallException: An error occurred during the ABP remote HTTP request.".

Do you have any suggestion about this? When we got this error before, we were deleting and reinstalling redis continer, but this time it didn't fix it.

Application logs: [10:59:41 INF] Request starting HTTP/2 GET https://api-------------:4319/favicon.ico - - [10:59:41 WRN] Could not find IdentityClientConfiguration for AbpMvcClient. Either define a configuration for AbpMvcClient or set a default configuration. [10:59:41 INF] Start processing HTTP request GET https://gateway------------:5501/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 [10:59:41 INF] Sending HTTP request GET https://gateway----------------r:5501/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 [10:59:41 ERR] An unhandled exception has occurred while executing the request. Volo.Abp.Http.Client.AbpRemoteCallException: An error occurred during the ABP remote HTTP request. (Connection refused (gateway----------------:5501)) See the inner exception for details. ---> System.Net.Http.HttpRequestException: Connection refused (gateway----------------:5501) ---> System.Net.Sockets.SocketException (111): Connection refused at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync(ClientProxyRequestContext requestContext) --- End of inner exception stack trace --- at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync(ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync[T](String methodName, ClientProxyRequestTypeValue arguments) at Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClientProxies.AbpApplicationConfigurationClientProxy.GetAsync(ApplicationConfigurationRequestOptions options) at Definition.MyMvcCachedApplicationConfigurationClient.GetRemoteConfigurationAsync() in /src/host/Definition.HttpApi.Host/MyMvcCachedApplicationConfigurationClient.cs:line 69 at Definition.MyMvcCachedApplicationConfigurationClient.<GetAsync>b__16_0() in /src/host/Definition.HttpApi.Host/MyMvcCachedApplicationConfigurationClient.cs:line 52 at Volo.Abp.Caching.DistributedCache2.GetOrAddAsync(TCacheKey key, Func1 factory, Func1 optionsFactory, Nullable1 hideErrors, Boolean considerUow, CancellationToken token) at Definition.MyMvcCachedApplicationConfigurationClient.GetAsync() in /src/host/Definition.HttpApi.Host/MyMvcCachedApplicationConfigurationClient.cs:line 50 at Volo.Abp.AspNetCore.Mvc.Client.RemoteLanguageProvider.GetLanguagesAsync() at Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync() at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Definition.DefinitionHttpApiHostModule.<>c.<<OnApplicationInitialization>b__1_0>d.MoveNext() in /src/host/Definition.HttpApi.Host/DefinitionHttpApiHostModule.cs:line 245 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context) [10:59:41 INF] Request finished HTTP/2 GET https://api----------:4319/favicon.ico - - - 500 - text/plain;+charset=utf-8 39.7725ms


5 Answer(s)
  • User Avatar
    0
    Teknosol created

    Hi again, We solved the problem, when we added the remote service url to the hosts file, the problem was solved, it was due to not being able to reach the url.

  • User Avatar
    0
    Teknosol created

    Hi again,

    This time we loaded the mvc page, but when we press the login button on the page, it does not redirect to the redirect url, that is, to the swagger page. Can you help with this problem?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I guess the redirect URL is not allowed

    You can check the RedirectAllowedUrls

  • User Avatar
    0
    Teknosol created

    Hi, We are currently moving containers to linux, front end is not active, we get this error when we try to log in from swagger. When I press the login button many times, I see this error on the swagger screen.

    In the OpenIddictApplications table, api in redirectUris looks like this.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Could you share the error log?

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