Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Redis config on startup template #5023

Closed
buaziz opened this issue Aug 11, 2020 · 16 comments
Closed

Remove Redis config on startup template #5023

buaziz opened this issue Aug 11, 2020 · 16 comments

Comments

@buaziz
Copy link
Contributor

buaziz commented Aug 11, 2020

host folder in startup template assumes redis configuration which results in below error on launching HostAPI and Identity Server projects individually.

image

Error text:

2020-08-11 12:46:44.129 +03:00 [WRN] 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: 2s ago, last-write: 2s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 62s ago, v: 2.0.593.37019
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: 2s ago, last-write: 2s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 62s ago, v: 2.0.593.37019
   at StackExchange.Redis.ConnectionMultiplexer.ConnectImplAsync(Object configuration, TextWriter log) in C:\projects\stackexchange-redis\src\StackExchange.Redis\ConnectionMultiplexer.cs:line 825
   at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.ConnectAsync(CancellationToken token)
   at Volo.Abp.Caching.StackExchangeRedis.AbpRedisCache.SetManyAsync(IEnumerable`1 items, DistributedCacheEntryOptions options, CancellationToken token)
   at Volo.Abp.Caching.DistributedCache`2.SetManyAsync(IEnumerable`1 items, DistributedCacheEntryOptions options, Nullable`1 hideErrors, CancellationToken token)
@realLiangshiwei
Copy link
Member

realLiangshiwei commented Aug 11, 2020

HttpApi.Host project used redis for distributed caching. Should not be removed.

@buaziz
Copy link
Contributor Author

buaziz commented Aug 11, 2020

so I guess it should be documented to install redis, and launching this project will load for 60 seconds until it times out.

@realLiangshiwei
Copy link
Member

Which document?

@buaziz
Copy link
Contributor Author

buaziz commented Aug 11, 2020

@buaziz
Copy link
Contributor Author

buaziz commented Aug 11, 2020

@realLiangshiwei
Copy link
Member

OK. I will update the document. Thanks.

@buaziz
Copy link
Contributor Author

buaziz commented Aug 14, 2020

For others to know how to install redis on Windows.

To install Redis on your local machine:

@realLiangshiwei
Copy link
Member

I don't think it is necessary. Developers should know how to configure the development environment(like install redis.)

@JSvanDonk
Copy link

Maybe in addition to documenting Redis as a pre requirement, also add redis to the module template docker files? So by default this (all?) requirements are met when starting the docker containers for development.

@olicooper
Copy link
Contributor

olicooper commented Sep 2, 2020

Why do we have to have Redis on development environment? tempkey.rsa works well and offers the least resistance to get started. Redis isn't native on Windows so you have to use it through Windows Subsystem for Linux or use old versions or Redis etc. which makes it very messy when it used to work out-of-the-box before.

Can we enable it for production only instead?

Edit:

Okay, @realLiangshiwei would you be able to update the docs to include a link to memurai for Windows users? Maybe this is an alternative to switching it off on dev.

Also, how long has the startup template had redis included? My project was created back in abp v0.21 and this seems to have slipped through until now! 🤦

@realLiangshiwei
Copy link
Member

Can not be used for production only, there will be inconsistent cache problems.

And I don't think installing Redis is a problem, developers should know this knowledge

@buaziz
Copy link
Contributor Author

buaziz commented Sep 3, 2020

use this

https://www.memurai.com/get-memurai

@yeahe83
Copy link

yeahe83 commented Sep 4, 2020

so crazy that without a redis, you can even not make a bookstore. - -!

@hikalkan
Copy link
Member

hikalkan commented Sep 6, 2020

so crazy that without a redis, you can even not make a bookstore. - -!

No, you can do. Just don't use a tiered solution for MVC (or don't use separate IDS for angular). In this way you will have a single server side application and you don't need to a distributed cache in development.

If you want to separate them, there will be two server applications and somehow they should use a shared cache. This is why the such a tiered startup template requires redis. Otherwise, you will have inconsistent caches between applications. It is just that simple. What's the problem here?

@yeahe83
Copy link

yeahe83 commented Oct 27, 2020

so crazy that without a redis, you can even not make a bookstore. - -!

No, you can do. Just don't use a tiered solution for MVC (or don't use separate IDS for angular). In this way you will have a single server side application and you don't need to a distributed cache in development.

If you want to separate them, there will be two server applications and somehow they should use a shared cache. This is why the such a tiered startup template requires redis. Otherwise, you will have inconsistent caches between applications. It is just that simple. What's the problem here?

haha, i just say redis now is more than why it is created.

@DenverSearle
Copy link

For the "windows fan" looking for the redis.msi installer: https://github.com/microsoftarchive/redis/releases

Everything works 100% after installing Redis. Thank you @buaziz / @hikalkan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants