Activities of "oncalldev@cloudassert.com"

Hi maliming, The app has permissions to create the file, the file got created, however all of a sudden it crashed and never restarted. I have shared the logs.txt file. But due to large file size, cannot able to get the identitymodel.txt file https://drive.google.com/file/d/1RK2RKzZ1Dafc0Z9jhiZjCmB2sEGv7sZe/view?usp=sharing

Hi maliming, As per your instructions added the above lines of code to capture detailed logs. However, after few days of deployment of this code, the application completely crashed and failed to re-start. We looked at logs and we found nothing from the Logs. We thought it was problem with the Azure Platform and raised a ticket. Upon investigating a looking at the VM logs of the machine where the app was hosted the following error was registered.

<Event><System><Provider Name=".NET Runtime"/><EventID>1026</EventID><Level>1</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2024-10-16T10:33:03Z"/><EventRecordID>78189937</EventRecordID><Channel>Application</Channel><Computer>WN1MDWK0001E7</Computer><Security/></System><EventData><Data>
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options,
 Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   at Microsoft.IdentityModel.Logging.TextWriterEventListener..ctor(String filePath)
   at WDN.HealthySmiles.Program.Main(String[] args) in D:\a\1\s\aspnet-core\src\WDN.HealthySmiles.HttpApi.Host\Program.cs:line 22
   at WDN.HealthySmiles.Program.&lt;Main&gt;(String[] args)&lt;/Data&gt;&lt;/EventData&gt;&lt;/Event&gt;

The application crashed while creating the Logs/identitymodel.txt file. We had to face severe backslash from the Customer as the portal went down and failed to restart, it took two weeks for us to figure out the root cause and roll out a release. Meanwhile to serve our customers and keep application up, we had to scale up the instance count from 1 to 2. Which had doubled our operation cost.

Hi maliming, The API randomly shuts down and re-starts automatically in production. Because of this there is considerable downtime and our customers are severely affected. We have reported this issue several times and there had not been proper fix, response or support. I would like to seriously escalated to this and would request an immediate response from you. Please refer the logs and provide us a solution in an hour or two max. There are too many 499 errors in the API. Please let us know more on this.

https://drive.google.com/file/d/downloaded

Hi maliming, Again got the same error. Kindly help this resolved

please find the logs below: Logs1:

  1. 2024-10-10 06:01:03.830 +00:00 [INF] Request finished HTTP/1.1 GET https://....../health-status - 200 null application/json 12.3292ms 2024-10-10 06:01:07.942 +00:00 [WRN] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "Your request is not valid!", "details": "The following errors were detected during validation.\r\n - Failed to read the request form. The client has disconnected\r\n", "data": {}, "validationErrors": [ { "message": "Failed to read the request form. The client has disconnected", "members": [ "" ] } ] }

2024-10-10 06:01:07.942 +00:00 [WRN] ModelState is not valid! See ValidationErrors for details. Volo.Abp.Validation.AbpValidationException: ModelState is not valid! See ValidationErrors for details. at Volo.Abp.AspNetCore.Mvc.Validation.ModelStateValidator.Validate(ModelStateDictionary modelState) at Volo.Abp.AspNetCore.Mvc.Validation.AbpValidationActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) 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) 2024-10-10 06:01:07.948 +00:00 [WRN] There are 1 validation errors: Failed to read the request form. The client has disconnected ()

2024-10-10 06:01:07.949 +00:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. 2024-10-10 06:01:07.949 +00:00 [INF] Executed action xxx.xxx.Controllers.Events.EventController.CreateAsync (xxx.xxx.HttpApi) in 254023.2564ms 2024-10-10 06:01:07.949 +00:00 [INF] Executed endpoint 'xxx.xxx.Controllers.Events.EventController.CreateAsync (xxx.xxx.HttpApi)' 2024-10-10 06:01:07.968 +00:00 [DBG] Added 0 entity changes to the current audit log 2024-10-10 06:01:07.970 +00:00 [DBG] Added 0 entity changes to the current audit log 2024-10-10 06:01:08.015 +00:00 [INF] Request finished HTTP/1.1 POST https://....../api/app/xxx-events - 499 null application/json; charset=utf-8 254100.7634ms

Logs2: 2. 2024-10-10 04:59:32.772 +00:00 [WRN] Savepoints are disabled because Multiple Active Result Sets (MARS) is enabled. If 'SaveChanges' fails, then the transaction cannot be automatically rolled back to a known clean state. Instead, the transaction should be rolled back by the application before retrying 'SaveChanges'. See https://go.microsoft.com/fwlink/?linkid=2149338 for more information and examples. To identify the code which triggers this warning, call 'ConfigureWarnings(w => w.Throw(SqlServerEventId.SavepointsDisabledBecauseOfMARS))'. 2024-10-10 04:59:32.773 +00:00 [ERR] An error occurred using a transaction. 2024-10-10 04:59:32.776 +00:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

2024-10-10 04:59:32.776 +00:00 [ERR] A task was canceled. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpDbContext`1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.Uow.UnitOfWork.SaveChangesAsync(CancellationToken cancellationToken) at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.SaveChangesAsync(ActionExecutingContext context, IUnitOfWorkManager unitOfWorkManager) at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.SaveChangesAsync(ActionExecutingContext context, IUnitOfWorkManager unitOfWorkManager) at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

Thanks

Hi maliming,

  1. Replaced the IformFile with IRemoteStreamContent and load testing is in progress, will update here once load testing is over
  2. How do you think this will resolve the issue?

Thanks

Hi maliming,

I have shared the controller's full code and the respective DTO which used in creation API(CreateAsync method in controller is used for creating)

https://drive.google.com/file/d/1ht7AuADgwew5gbqZNQyuin4DnfSJybWe/view?usp=sharing https://drive.google.com/file/d/1JxNj2bM7eEK5wNzP1f6NHCM506-GIWNH/view?usp=sharing

Thanks

Getting 499 error when tried to load test an API. Sometimes it is returning 499 error status code, sometimes executed successfully with 200 status code. load testing is done using postman and powershell scripts. Added 2 logs of this issue

  • Why this issue is taking place?

  • How can we address this issue?

  • ABP Framework version: v8.0.1

  • UI Type: Angular

  • Database System: EF Core (SQL Server)

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

  • Exception message and full stack trace:

  • Steps to reproduce the issue:

Logs:

* 2024-10-08 06:26:20.246 +00:00 [ERR] An error occurred using a transaction. 2024-10-08 06:26:20.257 +00:00 [WRN] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "Your request is not valid!", "details": "The following errors were detected during validation.\r\n - Failed to read the request form. The client has disconnected\r\n", "data": {}, "validationErrors": [ { "message": "Failed to read the request form. The client has disconnected", "members": [ "" ] } ] }

2024-10-08 06:26:20.257 +00:00 [WRN] ModelState is not valid! See ValidationErrors for details. Volo.Abp.Validation.AbpValidationException: ModelState is not valid! See ValidationErrors for details. at Volo.Abp.AspNetCore.Mvc.Validation.ModelStateValidator.Validate(ModelStateDictionary modelState) at Volo.Abp.AspNetCore.Mvc.Validation.AbpValidationActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) 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) 2024-10-08 06:26:20.257 +00:00 [WRN] There are 1 validation errors: Failed to read the request form. The client has disconnected ()

2024-10-08 06:26:20.257 +00:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. 2024-10-08 06:26:20.263 +00:00 [INF] Executed action xxx.xxx.Controllers.Events.EventController.CreateAsync (xxx.xxx.HttpApi) in 3861068.766ms 2024-10-08 06:26:20.264 +00:00 [INF] Executed endpoint 'xxx.xxx.Controllers.Events.EventController.CreateAsync (xxx.xxx.HttpApi)' 2024-10-08 06:26:20.295 +00:00 [DBG] Added 0 entity changes to the current audit log 2024-10-08 06:26:20.295 +00:00 [DBG] Added 0 entity changes to the current audit log 2024-10-08 06:26:20.313 +00:00 [INF] Request finished HTTP/1.1 POST https://......./api/app/xxx-events - 499 null application/json; charset=utf-8 3858506.3645ms

* 2024-10-08 05:00:40.062 +00:00 [WRN] Savepoints are disabled because Multiple Active Result Sets (MARS) is enabled. If 'SaveChanges' fails, then the transaction cannot be automatically rolled back to a known clean state. Instead, the transaction should be rolled back by the application before retrying 'SaveChanges'. See https://go.microsoft.com/fwlink/?linkid=2149338 for more information and examples. To identify the code which triggers this warning, call 'ConfigureWarnings(w => w.Throw(SqlServerEventId.SavepointsDisabledBecauseOfMARS))'. 2024-10-08 05:00:40.063 +00:00 [ERR] An error occurred using a transaction. 2024-10-08 05:00:40.133 +00:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

2024-10-08 05:00:40.133 +00:00 [ERR] A task was canceled. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpDbContext`1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.Uow.UnitOfWork.SaveChangesAsync(CancellationToken cancellationToken) at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.SaveChangesAsync(ActionExecutingContext context, IUnitOfWorkManager unitOfWorkManager) at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.SaveChangesAsync(ActionExecutingContext context, IUnitOfWorkManager unitOfWorkManager) at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

Hi, Tried adding ITenantManager in expose services, but that didn't work. Getting the same exception in authserver logs I have attached the CustomTenantManager code below

namespace xxx.xxx.Tenants
{
    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(TenantManager), typeof(ITenantManager))]
    public class CustomTenantManager : TenantManager
    {
        public CustomTenantManager(ITenantRepository tenantRepository) : base(tenantRepository)
        {
        }
        public virtual Task<bool> IsActiveAsyc(Tenant tenant)
        {
            return Task.FromResult(tenant.ActivationState switch
            {
                TenantActivationState.Active => true,
                TenantActivationState.Passive => true,
                TenantActivationState.ActiveWithLimitedTime => true,
                _ => true
            });
        }
        [Obsolete("Use IsActiveAsync method.")]
        public bool IsActive(Tenant tenant)
        {
            return tenant.ActivationState switch
            {
                TenantActivationState.Active => true,
                TenantActivationState.Passive => true,
                TenantActivationState.ActiveWithLimitedTime => true,
                _ => true
            };
        }
        public override Task<Tenant> CreateAsync(string name, Guid? editionId = null)
        {
            return base.CreateAsync(name, editionId);
        }
    }
}

And also tried by adding the CustomTenantManager in expose service( * [ExposeServices(typeof(TenantManager), typeof(ITenantManager), typeof(CustomTenantManager))]* ), But this also not worked.

Hi,please find the gdrive link below https://drive.google.com/file/d/1sRQyvGgz3ocNrri2X_tlqIsEUVlZIWiL/view?usp=drive_link

I have shared a image of logs, It has thrown business exception. The tenant id shared in the details line is the one which I tried to login.

for setting the logs, the below code has been used

public class Program
{
    public async static Task<int> Main(string[] args)
    {
        Log.Logger = new LoggerConfiguration()
#if DEBUG
            .MinimumLevel.Debug()
#else
            .MinimumLevel.Information()
#endif
            .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
            .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
            .Enrich.FromLogContext()
            .WriteTo.Async(c => c.File("Logs/logs.txt", rollOnFileSizeLimit: true, fileSizeLimitBytes: 10485760, retainedFileCountLimit: 100))
            .WriteTo.Async(c => c.Console())
            .CreateLogger();

Please let me know if you cannot access logs file

I have tried the above given code by creating a new file and inherited the Tenantmanager . But that didn't work. I have added the code below. But when I tried overriding the createasync function, it worked, But the IsActiveAsync is not working. I cannot able to login a user who's subscription is ended(tenant activation end date is past date ).

I have followed this link for creating a custom tenantmanager file(https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services#example-overriding-a-domain-service)

using System;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Saas;
using Volo.Saas.Tenants;

namespace xxx.xxx.Tenants
{
    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(TenantManager))]
    public class CustomTenantManager : TenantManager
    {
        public CustomTenantManager(ITenantRepository tenantRepository) : base(tenantRepository)
        {
        }
        public virtual Task<bool> IsActiveAsyc(Tenant tenant)
        {
            return Task.FromResult(tenant.ActivationState switch
            {
                TenantActivationState.Active => true,
                TenantActivationState.Passive => true,
                TenantActivationState.ActiveWithLimitedTime => true,
                _ => true
            });
        }
        [Obsolete("Use IsActiveAsync method.")]
        public bool IsActive(Tenant tenant)
        {
            return tenant.ActivationState switch
            {
                TenantActivationState.Active => true,
                TenantActivationState.Passive => true,
                TenantActivationState.ActiveWithLimitedTime => true,
                _ => true
            };
        }

        public override  Task<Tenant> CreateAsync(string name, Guid? editionId = null)
        {
            return base.CreateAsync(name, editionId);
        }
    }
}

I have added this code in the Domain layer . And also tried by adding [Dependency(ReplaceServices = true)] [ExposeServices(typeof(TenantManager))] and removing these lines based on the given lines in the above link (ExposeServices(typeof(IdentityUserManager))] attribute is required here since IdentityUserManager does not define an interface (like IIdentityUserManager) )

Showing 1 to 10 of 53 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35