ABP Framework version: v8.0.1
UI Type: Angular
Database System: EF Core (SQL Server)
Tiered (for MVC) or Auth Server Separated (for Angular): Auth Server Separated
Exception message and full stack trace:Failed to validate the token. Microsoft.IdentityModel.Tokens.SecurityTokenExpiredException: IDX10223: Lifetime validation failed. The token is expired. ValidTo (UTC): '7/31/2024 11:58:08 AM', Current time (UTC): '9/10/2024 12:53:59 PM'. at Microsoft.IdentityModel.Tokens.Validators.ValidateLifetime(Nullable
1 notBefore, Nullable
1 expires, SecurityToken securityToken, TokenValidationParameters validationParameters) at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateTokenPayloadAsync(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration) at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateJWSAsync(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration) 2024-09-10 12:53:59.835 +00:00 [INF] Bearer was not authenticated. Failure message: IDX10223: Lifetime validation failed. The token is expired. ValidTo (UTC): '7/31/2024 11:58:08 AM', Current time (UTC): '9/10/2024 12:53:59 PM'. 2024-09-10 12:53:59.841 +00:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2024-09-10 12:53:59.841 +00:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationRequestOptions) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).Steps to reproduce the issue: Yesterday all of a sudden there was a complete black screen displayed on the Production Portal. Refreshing the page did not help, however, restarting the API helped and Users were able to login to the application again.
Why do we see a back screen during this call - ** Request starting HTTP/1.1 GET https://api.xxxxx.com/api/abp/application-configuration?includeLocalizationResources=false - null null**
How can we navigate to Login page when the application does not respond with a black screen. Please refer the screen shot.
A lot of users were unable to access the application for almost 2 hours.
As this is a Production issue, I am requesting immediate assistance from you.
Thanks.
5 Answer(s)
-
0
hi
Can you share full logs when this happens?
liming.ma@volosoft.com
Thanks.
-
0
Please download the Logs from here - sent file through mail.
-
0
hi
I can see from the log that this API is blocking requests. However, the log level is Information and no more info can be obtained. You can change the log level to Debug so that we can get more information in next time.
And is your Redis work?
IDX10223: Lifetime validation failed. The token is expired.
This is a normal log if your access token is expired.
When this happens:
- Is the database in a normal state?
- Is the Redis in a normal state?
- What about the server's memory and CPU?
We can only change the log level and try to reproduce the problem.
There are not many clues at the moment.
.MinimumLevel.Debug()
public class Program { public async static Task<int> Main(string[] args) { IdentityModelEventSource.ShowPII = true; IdentityModelEventSource.Logger.LogLevel = EventLevel.Verbose; var wilsonTextLogger = new TextWriterEventListener("Logs/identitymodel.txt"); wilsonTextLogger.EnableEvents(IdentityModelEventSource.Logger, EventLevel.Verbose); Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) .Enrich.FromLogContext() .WriteTo.Async(c => c.File("Logs/logs.txt")) .CreateLogger();
-
0
How do you say that the API is blocking requests? From which log can you identify that?
-
0
You can see the requests are taking too much time, and return 499
The request must be blocked at some step.
Request finished HTTP/1.1 GET https://api..com/api/app/notifications/get-user-notification - 499 null null 59171973.8186ms Request finished HTTP/1.1 GET https://api..com/api/abp/application-configuration?includeLocalizationResources=false - 499 null null 59146523.8819ms Request finished HTTP/1.1 GET https://api..com/api/app/dashboard/recent-newsletters?count=20 - 499 null null 59170152.7414ms
You can change the log level to
.MinimumLevel.Debug()
so we can get more information next time when this problem occurs again.public class Program { public async static Task Main(string[] args) { IdentityModelEventSource.ShowPII = true; IdentityModelEventSource.Logger.LogLevel = EventLevel.Verbose; var wilsonTextLogger = new TextWriterEventListener("Logs/identitymodel.txt"); wilsonTextLogger.EnableEvents(IdentityModelEventSource.Logger, EventLevel.Verbose); Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) .Enrich.FromLogContext() .WriteTo.Async(c => c.File("Logs/logs.txt")) .CreateLogger();