- ABP Framework version: v3.3.2
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Seperated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:
Hi, I have set the redis cache to false in appsettings.json. However, I still got this error when deploying the API into UAT server, this issue does not happen in localhost.
appsettings.json:
"Redis": {
"Configuration": "127.0.0.1",
"IsEnabled": "false"
},
Error:
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServices phase of the module SingHealth.DigitalPlatform.DigitalPlatformHttpApiHostModule, SingHealth.DigitalPlatform.HttpApi.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
---> StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s). UnableToConnect on 127.0.0.1:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 1s ago, last-write: 1s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 6s ago, v: 2.0.593.37019
at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Object configuration, TextWriter log) in C:\projects\stackexchange-redis\src\StackExchange.Redis\ConnectionMultiplexer.cs:line 942
20 Answer(s)
-
0
hi
It may be that different environments use wrong appsettings.json.
-
0
Hi @maliming, I thought about that at first, so I have set the "IsEnabled": "false" for all the setting files, I also tried to delete all the appsettings and left the appsetings.json -> also got the same issue
-
0
I tested again in my localhost with deployment in IIS, the same issue happens. It only works fine if we run it on IIS Express using visual studio.
-
0
hi
Can I check your souce code remotely?
-
0
Hi @maliming, sorry, can we have a call at the other time? how abt 02:00PM GMT+8?
-
0
OK.
02:00PM GMT+8
is ok. -
0
Hi @maliming, noted, thanks
-
0
Hi @maliming, so sorry, I am stuck in another urgent request meeting, can we rearrange the meeting to another time? please let me know your available time slots, I will tried to fit one of yours.
-
0
My working hours are 9:00-18:00 UTC+8, You can leave message when you are free.
-
0
Abp: 4.2.1
Hi there,
The problem is that abp platform forces to use Redis in production mode. I belive this is a bug, or there is something else on that. Commenting lines are solved this issue for me (see the code below).
private void ConfigureRedis( ServiceConfigurationContext context, IConfiguration configuration, IWebHostEnvironment hostingEnvironment) { if (!hostingEnvironment.IsDevelopment()) { /*var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); context.Services .AddDataProtection() .PersistKeysToStackExchangeRedis(redis, "edelivery2-Protection-Keys");*/ } }
-
0
hi jurec
The tiered project needs the Redis.
https://github.com/abpframework/abp/issues/5023#issuecomment-687854205
-
0
Hi @maliming, why redis is mandatory for tiered project? this is not mentioned in the documentation:
https://docs.abp.io/en/abp/latest/Redis-Cache
if it is because of key storage provider, we can replace it by entity framework core, right?
https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/implementation/key-storage-providers?view=aspnetcore-5.0&tabs=visual-studio
please help check and confirm.
-
1
why redis is mandatory for tiered project?
Applications are using caching, such as caching query results, settings, permissions, etc., so we need to cache, especially tiered project.
-
0
Hi @maliming, is it for performance purpose only? what if we are using tiered project and do not install the redis? I have replaced the data protection storage provider with EF core.
-
0
If you don't use redis, the caches of multiple projects will be inconsistent and cause problems.
-
0
Hi here, I got the same problem when deploy application in test server. It works in local with IIS Express Visual Studio. What should I do to solve this issue?
-
0
hi lan.dang Please create a new question.
-
0
This question has been automatically marked as stale because it has not had recent activity.
-
1
Please help me to resolve this issue asap .
Appsetting configuration.
Error:-
StackExchange.Redis.RedisConnectionException: 'It was not possible to connect to the redis server(s). UnableToConnect on localhost:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 0s ago, last-write: 0s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 5s ago, v: 2.2.4.27433'
Thanks
-
0
hi Jatinder.singh
Please create a new question.