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

Sentinel not work #566

Open
zhoudi94 opened this issue Jun 14, 2023 · 2 comments
Open

Sentinel not work #566

zhoudi94 opened this issue Jun 14, 2023 · 2 comments

Comments

@zhoudi94
Copy link

Describe the bug
Before to open an issue, please be sure that it is not related to StackExchange.Redis but to this libray that is a simple wrapper.
After that, please add a clear and concise description of what the bug is.

This operation has been disabled in the command-map and cannot be used: GET

image

To Reproduce
Steps to reproduce the behavior:

my code
image
image

Expected behavior
A clear and concise description of what you expected to happen.

I try this and it works fine
image

Screenshots / StackTrace
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Linux Alpine]
  • Runtime version [.NET Framework, .NET Core 3.0 ....]
  • Version [e.g. 6.0.0]

StackExchange.Redis.Extensions.AspNetCore v9.1.0
Additional context
Add any other context about the problem here.

@zhoudi94
Copy link
Author

I solved this problem by setting the ConnectionString field, why?

image

@imperugo
Copy link
Owner

Hi,
sorry for the delay.

Your code looks good, If I check the RedisConfiguration of StackExchange.Redis.Extensions is enough to put the sentinel name into the ServiceName propreerty in order to use it

public bool IsSentinelCluster => !string.IsNullOrEmpty(ServiceName);

if (IsSentinelCluster)
{
     newOptions.ServiceName = ServiceName;
     newOptions.CommandMap = CommandMap.Sentinel;
}

I neeed to understand how to setup a sentinel service in my local environment and debug it, or better, write a unit test that replicate the issue

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

2 participants