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

Service in Sentinel mode can't be restarted #50

Closed
assaf-arbely opened this issue Jan 19, 2020 · 7 comments
Closed

Service in Sentinel mode can't be restarted #50

assaf-arbely opened this issue Jan 19, 2020 · 7 comments

Comments

@assaf-arbely
Copy link

assaf-arbely commented Jan 19, 2020

Hi @tporadowski

We are testing the 4.0.14.1 and believe we found another issue:
The sentinel service cannot be restarted unless we are changing the sentinel.conf file.

We are running Redis in Sentinel mode using the following command:
"E:\redis\redis-server.exe" --service-run --service-name redis-sentinel E:\redis\sentinel.conf --sentinel

We are using the following config file:
port 26379

bind 0.0.0.0
sentinel monitor vmmaster 127.0.0.1 6379 1
sentinel down-after-milliseconds vmmaster 5000
logfile "redis_sentinel_log.txt"

After the service starts, the config file is modified to the following:
port 26379

bind 0.0.0.0
sentinel myid 0347fcf723b8e4c4198ad052d3dcae5449e67d97
sentinel deny-scripts-reconfig yes
logfile "redis_sentinel_log.txt"
# Generated by CONFIG REWRITE
dir "E:\redis"
sentinel monitor vmmaster 127.0.0.1 6379 1
sentinel down-after-milliseconds vmmaster 5000
sentinel config-epoch vmmaster 0
sentinel leader-epoch vmmaster 0
sentinel current-epoch 0

After the service is stopped, it fails to start unless we manually revert the config file to its original form (before it was modified by the service).
The log file "redis_sentinel_log.txt" is not indicating any error.
The windows event log shows the following (the typo sentinal is in source):
syslog-ident = redis
Invalid argument during startup: could not find sentinal subcommand deny-scripts-reconfig

@tporadowski
Copy link
Owner

Thanks for finding this, I will fix this in upcoming days.

@andrpich
Copy link

i ran into the same problem but found two similar occurances on another machine.

tried to execute
:
redis-server --service-install --service-name "Redis Sentinel" .\sentinel.conf --sentinel

and

redis-server .\sentinel.conf --sentinel

in powershell and both commands immediatly triggered a popup stating that stated "MSOpenTech stopped working..."

windows event log shows:
syslog-ident = redis
Invalid argument during startup: could not find sentinal subcommand deny-scripts-reconfig

no matter if the parameter "deny-scripts-reconfig" is set to yes/no or completely missing.

all tests were performed on clean Windows 2016 Servers in a HyperV environment.

@tporadowski
Copy link
Owner

Thanks @andrpich, command-line processing in this Redis port is extended to support Windows-specific options and also done in a different place than in the original - and I need to sync those. Stay tuned :)

@tporadowski
Copy link
Owner

This is now fixed in win-4.014 branch and on develop. I will release a 4.0.14.2 version this week.

tporadowski added a commit that referenced this issue Jan 26, 2020
- fix for #50 - running in Sentinel mode
@tporadowski
Copy link
Owner

@assaf-arbely , @andrpich I have just published Redis 4.0.14.2 for Windows

@assaf-arbely
Copy link
Author

@tporadowski Thank you so much!

@andrpich
Copy link

@tporadowski thank you very much.
i set up a 3 node deployment and everything seems to work so far.

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

3 participants