快照的 Redis 问题 - 在最终目标 : Operation not permitted 上移动临时数据库文件时出错

标签 redis sensu

我有一个使用 redis 和 sensu 的工作设置。在尝试拍摄 RDB 快照时,我突然遇到了 Redis 服务器问题。

[2830] 27 Dec 06:25:50.648 * 10000 changes in 60 seconds. Saving...
[2830] 27 Dec 06:25:50.649 * Background saving started by pid 24929
[24929] 27 Dec 06:25:50.670 # Error moving temp DB file on the final destination: Operation not permitted
[2830] 27 Dec 06:25:50.750 # Background saving error

我检查了redis目录路径,写权限在那里。

这是我的 redis 配置。

Redis配置文件示例
daemonize yes
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 0

loglevel debug
logfile "/var/log/redis/redis.log"

databases 1
####   save ""
save 9000 1
save 3000 10
save 60 10000

stop-writes-on-bgsave-error yes

rdbcompression yes
rdbchecksum yes

dbfilename dump.rdb
dir /var/redis/6379

slave-serve-stale-data yes
repl-disable-tcp-nodelay no
slave-priority 100
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec

no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64

set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64

hll-sparse-max-bytes 3000
activerehashing yes

client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60

hz 10
aof-rewrite-incremental-fsync yes 

最佳答案

只有需要访问 Redis 的用户才有权限读取其数据和数据库。这是默认用户,即用户 Redis。 Redis 数据目录必须归 Redis 所有。

Option one (第 4、5、6、7、8 段)或 Option two (第 6 步)

关于快照的 Redis 问题 - 在最终目标 : Operation not permitted 上移动临时数据库文件时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34489079/

相关文章:

来自 RDB 基础文件的 Redis AOF

redis - 升级redis 2.4.14到redis 2.6.14,命令 "service redis start"总是挂起

php - Redis 的 allkeys-lru maxmemory 策略是否要求 key 设置过期?

redis如何在1个查询中组合多个命令

kubernetes - 从 Kubernetes 中的另一个 pod 引用 Helm Redis master

python - 如何使用Sensu监控Python脚本?

bash - 无法使用 bash 作为 Sensu 插件获取 jstat 指标

mysql - Sensu 检查 MySQL 长时间运行的查询。

ruby - 如何使用 Sensu 中的 check-tail 插件检查重复的字符串?

arm - 监控多个Raspberry Pi