Open Closed

Microservice Template : Malformed Url when trying to edit user permissions on deployed AWS aks enviornemnt #2746


User avatar
0
amansharma created
  • ABP Framework version: v5.1.3
  • UI type: Angular
  • DB provider: EF Core
  • Exception message and stack trace:[17:56:50 INF] Route matched with {area = "permissionManagement", action = "Get", controller = "Permissions", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.Abp.PermissionManagement.GetPermissionListResultDto] GetAsync(System.String, System.String) on controller Volo.Abp.PermissionManagement.PermissionsController (Volo.Abp.PermissionManagement.HttpApi). [17:56:52 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

[17:56:52 ERR] Malformed URL System.InvalidOperationException: Malformed URL at IdentityModel.Client.DiscoveryEndpoint.ParseUrl(String input) at IdentityModel.Client.HttpClientDiscoveryExtensions.GetDiscoveryDocumentAsync(HttpMessageInvoker client, DiscoveryDocumentRequest request, CancellationToken cancellationToken) at Volo.Abp.IdentityModel.IdentityModelAuthenticationService.GetDiscoveryResponse(IdentityClientConfiguration configuration) at Volo.Abp.IdentityModel.IdentityModelAuthenticationService.CreateClientCredentialsTokenRequestAsync(IdentityClientConfiguration configuration) at Volo.Abp.IdentityModel.IdentityModelAuthenticationService.GetTokenResponse(IdentityClientConfiguration configuration) at Volo.Abp.IdentityModel.IdentityModelAuthenticationService.GetAccessTokenAsync(IdentityClientConfiguration configuration) at Volo.Abp.IdentityModel.IdentityModelAuthenticationService.GetAccessTokenOrNullAsync(String identityClientName) at Volo.Abp.IdentityModel.IdentityModelAuthenticationService.TryAuthenticateAsync(HttpClient client, String identityClientName) at Volo.Abp.Http.Client.IdentityModel.IdentityModelRemoteServiceHttpClientAuthenticator.Authenticate(RemoteServiceHttpClientAuthenticateContext context) at Volo.Abp.Http.Client.IdentityModel.Web.HttpContextIdentityModelRemoteServiceHttpClientAuthenticator.Authenticate(RemoteServiceHttpClientAuthenticateContext context) 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.Identity.ClientProxies.IdentityUserClientProxy.GetRolesAsync(Guid id) at Volo.Abp.Identity.HttpClientUserRoleFinder.GetRolesAsync(Guid userId) at Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider.CheckAsync(String[] names, String providerName, String providerKey) at Volo.Abp.PermissionManagement.PermissionManager.GetInternalAsync(PermissionDefinition[] permissions, String providerName, String providerKey) at Volo.Abp.PermissionManagement.PermissionManager.GetAsync(String[] permissionNames, String providerName, String providerKey) at xyz.Portal.AdministrationService.AppAdministrativeService.xyzPermissionAppService.GetAsync(String providerName, String providerKey) in /src/services/administration/src/xyz.Portal.AdministrationService.Application/AppAdministrationService/xyzPermissionAppService.cs:line 71 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at lambda_method3404(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

  • Steps to reproduce the issue:"

Click on User Permissions

Error on administration service POD

Locally it works fine but when deployed it throws MALFORMED URL ERROR

Request URL: https://webgateway.xyz.io/api/permission-management/permissions?providerName=R&providerKey=Employee%20User ------> This Works

Request URL: https://webgateway.xyz.io/api/permission-management/permissions?providerName=U&providerKey=7d2bf3e2-881f-82af-2e19-3a025c616e15 ----> This Doesn't Work


8 Answer(s)
  • User Avatar
    0
    amansharma created

    Any update??

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    Check your RemoteService configurations under AdministrationService appsettings.

    You may have forgotten to override this IdentityService url on pod environment.

  • User Avatar
    0
    amansharma created

    It was already overridden to identity service.

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    Then this may be related to AWS AKS altering the internal URL. Can you check with the AWS team? We didn't receive any similar issue from Azure AKS though.

  • User Avatar
    0
    amansharma created

    Not but it works partially. could you please help us with this?

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    It is not working partially, they are different. I will try to explain better.

    Request URL: https://webgateway.xyz.io/api/permission-management/permissions?providerName=R&providerKey=Employee%20User ------> This Works

    This request is done to AdministrationService to get the permissions of the role,

    Request URL: https://webgateway.xyz.io/api/permission-management/permissions?providerName=U&providerKey=7d2bf3e2-881f-82af-2e19-3a025c616e15 ----> This Doesn't Work

    This request is done to the AdministrationService to get the permission of the user. Since user list can be found in IdentityService; AdministrationService makes a server-to-server request to IdentityService to get this list. See this: https://docs.abp.io/en/commercial/latest/startup-templates/microservice/microservices#identity-server-authorization-1

    And it seems AdministrationService is having a problem when getting token from the AuthServer (client-credential request, see related docs above) to make a request to IdentityService.

    Can AdministrationService pod reach the internet? To https://yourAuthServer.com/.well-known/openid-configuration endpoint?

  • User Avatar
    0
    amansharma created

    I changed the placeholder of auth server in administration service yaml file but we get a different error now

    [11:01:28 INF] Request starting HTTP/1.1 GET http://admin-service/api/permission-management/permissions?providerName=U&providerKey=18325788-8d90-c514-d188-3a026603159e - 0 [11:01:28 INF] Executing endpoint 'Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)' [11:01:28 INF] Route matched with {area = "permissionManagement", action = "Get", controller = "Permissions", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.Abp.PermissionManagement.GetPermissionListResultDto] GetAsync(System.String, System.String) on controller Volo.Abp.PermissionManagement.PermissionsController (Volo.Abp.PermissionManagement.HttpApi). [11:01:29 INF] Start processing HTTP request GET https://auth.xyz.io/.well-known/openid-configuration [11:01:29 INF] Sending HTTP request GET https://auth.xyz.io/.well-known/openid-configuration [11:01:29 INF] Received HTTP response headers after 56.3661ms - 200 [11:01:29 INF] End processing HTTP request after 64.5436ms - 200 [11:01:29 INF] Start processing HTTP request GET https://auth.xyz.io/.well-known/openid-configuration/jwks [11:01:29 INF] Sending HTTP request GET https://auth.xyz.io/.well-known/openid-configuration/jwks [11:01:29 INF] Received HTTP response headers after 21.8753ms - 200 [11:01:29 INF] End processing HTTP request after 22.1598ms - 200 [11:01:29 INF] Start processing HTTP request POST https://auth.xyz.io/connect/token [11:01:29 INF] Sending HTTP request POST https://auth.xyz.io/connect/token [11:01:30 INF] Received HTTP response headers after 197.3464ms - 200 [11:01:30 INF] End processing HTTP request after 198.8615ms - 200 [11:01:30 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An error occurred during the ABP remote HTTP request. (An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set.) See the inner exception for details.", "details": null, "data": {}, "validationErrors": null }

    [11:01:30 ERR] An error occurred during the ABP remote HTTP request. (An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set.) See the inner exception for details. Volo.Abp.Http.Client.AbpRemoteCallException: An error occurred during the ABP remote HTTP request. (An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set.) See the inner exception for details. ---> System.InvalidOperationException: An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set. at System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request) at System.Net.Http.HttpClient.CheckRequestBeforeSend(HttpRequestMessage request) at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) 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.Identity.ClientProxies.IdentityUserClientProxy.GetRolesAsync(Guid id) at Volo.Abp.Identity.HttpClientUserRoleFinder.GetRolesAsync(Guid userId) at Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider.CheckAsync(String[] names, String providerName, String providerKey) at Volo.Abp.PermissionManagement.PermissionManager.GetInternalAsync(PermissionDefinition[] permissions, String providerName, String providerKey) at Volo.Abp.PermissionManagement.PermissionManager.GetAsync(String[] permissionNames, String providerName, String providerKey) at Volo.Abp.PermissionManagement.PermissionAppService.GetAsync(String providerName, String providerKey) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at lambda_method1582(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) [11:01:30 ERR] Code: [11:01:30 ERR] Details: [11:01:30 INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. [11:01:30 INF] Executed action Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi) in 1203.1455ms [11:01:30 INF] Executed endpoint 'Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)' [11:01:30 INF] Request finished HTTP/1.1 GET http://admin-service/api/permission-management/permissions?providerName=U&providerKey=18325788-8d90-c514-d188-3a026603159e - 0 - 500 - application/json;+charset=utf-8 1664.6889ms`

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    It seems admin-service can not be resolved. Can you make sure this DNS is correct and be resolved?

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