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

WARNING: Sentinel was not able to save the new configuration on disk!!!: Device or resource busy #287

Closed
startjava opened this issue Aug 28, 2021 · 3 comments

Comments

@startjava
Copy link

sudo docker run -v /home/ghy/redis_master_replica/RedisSentinel1.conf:/redisConfig/RedisSentinel1.conf -v /home/ghy/redis_master_replica/sentinel_data:/sentinel_data --name redis6.2.5_sentinel_26381 --network host -d redis:6.2.5 redis-sentinel /redisConfig/RedisSentinel1.conf

log info bottom:
1:X 28 Aug 2021 03:40:19.696 # Could not rename tmp config file (Device or resource busy)
1:X 28 Aug 2021 03:40:19.696 # WARNING: Sentinel was not able to save the new configuration on disk!!!: Device or resource busy

restart 3 sentinel server,

use command:
info sentinel

show old master !

@startjava
Copy link
Author

[ghy@localhost redis_master_replica]$ sudo docker -v
[sudo] ghy 的密码:
Docker version 20.10.8, build 3967b7d
[ghy@localhost redis_master_replica]$

@wglambert
Copy link

Something else might be using that file/directory. I would try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repos aren't really a user-help forum

@yosifkit
Copy link
Member

I would guess the problem is that the conf file is mounted directly (by inode) and when redis goes to save/edit it, then that will fail because the "idempotent" way to write a file is to write it to a temporary file and then rename to the real file and that won't work on a bind-mounted file.

Try mounting the directory of the config file instead. May want to make a "conf" sub-directory for it.

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