Confirmed,
Kindly remove the response/Ticket
Hi,
Ok, Although I don't recommend you to do this, it should be possible.
For example(this just is an idea):
[Dependency(ReplaceServices = true)] [ExposeServices(typeof(IDistributedCache))] public class MyRedisCache : IDistributedCache, ICacheSupportsMultipleItems { private readonly AbpRedisCache _cache; public MyRedisCache(AbpRedisCache cache) { _cache = cache; } public byte[]? Get(string key) { if (IsRedisAvailable()) { return _cache.Get(key); } return null; } protected virtual bool IsRedisAvailable() { // check redis connection return true; } ..... } public override void ConfigureServices(ServiceConfigurationContext context) { ..... context.Services.AddSingleton<AbpRedisCache>(); }
hi
thanks for quick response
I believe this check is performed after the initial start-up, in my case the app is not starting at all
on start application if Redis connection string is not available / URL not correct, how can i skip it and continue the start-up
because right now the application crashes if the Redis URL not available ? and the Try/Catch Solution didn't worked also
Hi,
I think you shouldn't stop the application from crashing if Redis server is not available
In distributed and microservice applications, distributed caching is necessary. It's like SQLServer. Imagine if the SQLServer is unavailable, will you choose to keep the application running?
You can check this: https://support.abp.io/QA/Questions/6344/Why-do-we-need-to-install-Redis-When-is-it-used-Why-Redis-is-needed
Hi liangshiwei
I already have a Redis cluster, But my point is that Redis is add-on for the application for optimization and therefore the application should consider it as optional,
let's say that for whatever reason the Redis server is not available or can't accept connection in that case can i skip it and get the data i want from my SQL DB server
because right now my application just crashes if redis is not there
Hi
this is the exact same configuration we have but we are using HTTPS instead of HTTP.
could you please run as HTTPS and confirm that it is working?
Hi
Changing the audience didn't make any difference.
Just to keep in mind this application is in production and it is operating well using the IIS web server.
This issue is related to the Kubernetes deployment where we need to add another endpoint to auth-server in order to communicate with it within the internal cluster, so the metadata address is the http://<k8s service name> and the authority is https://<the external domain name> when metadata address is added to the code the errors in ticket start to appear, while if we stick with the authority URL only it will not be reachable from inside the cluster.
I hope that this will clarify the situation we have.
Hi Anjali
actually, we don't have PreConfigureService
but this is ConfigureService if you want to check
and this is the configure authentication for adding the metadata URL
and from Swagger, i can execute any API with a 200 status code
but when we log in from the angular app it throws the following error
It requests the jwks from HTTPS while it is the auth-server is operating on HTTP in the local environment
requirehttpsmetadata is false in the angular environment.json, backend, and auth-server appsettings.json
this is where we reach tell now.
I hope that you can help us fix this issue.
thank you,
can you provide the logs of the HTTP500 error
the requested API is returning HTTP 500 because it requires authentication and when it tries to authenticate it throws this error unable to obtain ..... However, the API now can authenticate but the angular can't while it is trying to fetch from https://auth-server/.well-known/jwks it is not specified to use HTTPS so it returns connection refused
Please find the code section for adding metadata URL
Please advise.
thank you,
Hello nanohealthserviceaccount,
Please do let us know if this solution has worked for you?
Awaiting for your response.
Thank You, Anjali
is it possible to get a live support session ? as this is holding us back and we need to do ASAP