Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Redis复制主机和副本之间的无限循环_Redis_Replication - Fatal编程技术网

Redis复制主机和副本之间的无限循环

Redis复制主机和副本之间的无限循环,redis,replication,Redis,Replication,我需要复制方面的帮助,我正在ubuntu 18中使用redis-6-0-8 创建了redis2.conf,我在其中进行了更改: 复制127.0.0.1 6379 6380端口 appendfilename“appendonly2.aof”当我运行复制服务器时,我得到了这个无限同步循环: 18293:C 19 Oct 2020 11:37:30.325 # Redis version=6.0.8, bits=64, commit=00000000, modified=0, pid=18293, j

我需要复制方面的帮助,我正在ubuntu 18中使用redis-6-0-8

创建了redis2.conf,我在其中进行了更改:

复制127.0.0.1 6379

6380端口

appendfilename“appendonly2.aof”当我运行复制服务器时,我得到了这个无限同步循环:

18293:C 19 Oct 2020 11:37:30.325 # Redis version=6.0.8, bits=64, commit=00000000, modified=0, pid=18293, just started
18293:C 19 Oct 2020 11:37:30.325 # Configuration loaded
18293:S 19 Oct 2020 11:37:30.326 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
18293:S 19 Oct 2020 11:37:30.326 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
18293:S 19 Oct 2020 11:37:30.326 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 6.0.8 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6380
 |    `-._   `._    /     _.-'    |     PID: 18293
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

18293:S 19 Oct 2020 11:37:30.328 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
18293:S 19 Oct 2020 11:37:30.328 # Server initialized
18293:S 19 Oct 2020 11:37:30.328 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
18293:S 19 Oct 2020 11:37:30.328 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').
18293:S 19 Oct 2020 11:37:30.330 * Ready to accept connections
18293:S 19 Oct 2020 11:37:30.330 * Connecting to MASTER 127.0.0.1:6379
18293:S 19 Oct 2020 11:37:30.330 * MASTER <-> REPLICA sync started
18293:S 19 Oct 2020 11:37:30.330 * Non blocking connect for SYNC fired the event.
18293:S 19 Oct 2020 11:37:30.331 * Master replied to PING, replication can continue...
18293:S 19 Oct 2020 11:37:30.331 * Partial resynchronization not possible (no cached master)
18293:S 19 Oct 2020 11:37:30.332 * Full resync from master: 1a3d1af99e5a53fb856030e3fcde97eccb0be660:0
18293:S 19 Oct 2020 11:37:30.441 * MASTER <-> REPLICA sync: receiving 257 bytes from master to disk
18293:S 19 Oct 2020 11:37:30.443 * MASTER <-> REPLICA sync: Flushing old data
18293:S 19 Oct 2020 11:37:30.446 * MASTER <-> REPLICA sync: Loading DB in memory
18293:S 19 Oct 2020 11:37:30.451 # Failed trying to load the MASTER synchronization DB from disk
18293:S 19 Oct 2020 11:37:31.332 * Connecting to MASTER 127.0.0.1:6379
18293:S 19 Oct 2020 11:37:31.333 * MASTER <-> REPLICA sync started
18293:S 19 Oct 2020 11:37:31.333 * Non blocking connect for SYNC fired the event.
18293:S 19 Oct 2020 11:37:31.333 * Master replied to PING, replication can continue...
18293:S 19 Oct 2020 11:37:31.333 * Partial resynchronization not possible (no cached master)
18293:S 19 Oct 2020 11:37:31.335 * Full resync from master: 1a3d1af99e5a53fb856030e3fcde97eccb0be660:0
18293:S 19 Oct 2020 11:37:31.447 * MASTER <-> REPLICA sync: receiving 257 bytes from master to disk
18293:S 19 Oct 2020 11:37:31.448 * MASTER <-> REPLICA sync: Flushing old data
18293:S 19 Oct 2020 11:37:31.448 * MASTER <-> REPLICA sync: Loading DB in memory
18293:S 19 Oct 2020 11:37:31.455 # Failed trying to load the MASTER synchronization DB from disk
18293:S 19 Oct 2020 11:37:32.336 * Connecting to MASTER 127.0.0.1:6379
18293:S 19 Oct 2020 11:37:32.337 * MASTER <-> REPLICA sync started
18293:S 19 Oct 2020 11:37:32.337 * Non blocking connect for SYNC fired the event.
18293:S 19 Oct 2020 11:37:32.337 * Master replied to PING, replication can continue...
18293:S 19 Oct 2020 11:37:32.338 * Partial resynchronization not possible (no cached master)
18293:S 19 Oct 2020 11:37:32.340 * Full resync from master: 1a3d1af99e5a53fb856030e3fcde97eccb0be660:0
18293:S 19 Oct 2020 11:37:32.454 * MASTER <-> REPLICA sync: receiving 257 bytes from master to disk
18293:S 19 Oct 2020 11:37:32.456 * MASTER <-> REPLICA sync: Flushing old data
18293:S 19 Oct 2020 11:37:32.456 * MASTER <-> REPLICA sync: Loading DB in memory
18293:S 19 Oct 2020 11:37:32.467 # Failed trying to load the MASTER synchronization DB from disk
18293:C 19 Oct 2020 11:37:30.325#Redis version=6.0.8,bits=64,commit=00000000,modified=0,pid=18293,刚刚开始
18293:C 2020年10月19日11:37:30.325#配置已加载
18293:S 19 Oct 2020 11:37:30.326#您请求了10000个MaxClient,要求至少10032个max文件描述符。
18293:S 19 Oct 2020 11:37:30.326#服务器无法将最大打开文件数设置为10032,因为操作系统错误:不允许操作。
18293:S 19 Oct 2020 11:37:30.326 35;当前最大打开文件数为4096。MaxClient已减少到4064,以补偿低ulimit。如果需要更高的MaxClient,请增加“ulimit-n”。
_._
_.-``__ ''-._
_.-``    `.  `_.  ''-._           Redis 6.0.8(00000000/0)64位
.-`` .-```.  ```\/    _.,_ ''-._
以独立模式运行的(',.-` | `)
|`-.端口:6380
|`-.`.\/.-'| PID:18293
`-._    `-._  `-./  _.-'    _.-'
|`-._`-._    `-.__.-'    _.-'_.-'|
|    `-._`-._        _.-'_.-'    |           http://redis.io
`-._    `-._`-.__.-'_.-'    _.-'
|`-._`-._    `-.__.-'    _.-'_.-'|
|    `-._`-._        _.-'_.-'    |
`-._    `-._`-.__.-'_.-'    _.-'
`-._    `-.__.-'    _.-'
`-._        _.-'
`-.__.-'
18293:S 2020年10月19日11:37:30.328#警告:无法强制执行TCP积压设置511,因为/proc/sys/net/core/somaxconn被设置为较低的值128。
18293:S 2020年10月19日11:37:30.328#服务器已初始化
18293:S 2020年10月19日11:37:30.328 35;警告超限#内存设置为0!在内存不足的情况下,后台保存可能会失败。要解决此问题,请将“vm.overmit_memory=1”添加到/etc/sysctl.conf,然后重新启动或运行命令“sysctl vm.overmit_memory=1”,使其生效。
18293:S 2020年10月19日11:37:30.328#警告您的内核中启用了透明巨型页面(THP)支持。这将造成Redis的延迟和内存使用问题。要解决此问题,请以root用户身份运行命令'echo madvise>/sys/kernel/mm/transparent_hugepage/enabled',并将其添加到/etc/rc.local,以便在重新启动后保留设置。禁用THP(设置为“madvise”或“never”)后,必须重新启动Redis。
18293:S 2020年10月19日11:37:30.330*准备接受连接
18293:S 19 2020年10月11:37:30.330*连接到主机127.0.0.1:6379
18293:S 19 2020年10月11:37:30.330*主副本同步已开始
18293:S 2020年10月19日11:37:30.330*同步的非阻塞连接触发了事件。
18293:S 2020年10月19日11:37:30.331*主机已回复PING,复制可以继续。。。
18293:S 19 Oct 2020 11:37:30.331*无法进行部分重新同步(无缓存主机)
18293:S 2020年10月19日11:37:30.332*主机完全重新同步:1a3d1af99e5a53fb856030e3fcde97eccb0be660:0
18293:S 19 Oct 2020 11:37:30.441*主副本同步:从主副本到磁盘接收257字节
18293:S 19 2020年10月11:37:30.443*主副本同步:刷新旧数据
18293:S 19 Oct 2020 11:37:30.446*主副本同步:在内存中加载数据库
18293:S 2020年10月19日11:37:30.451#尝试从磁盘加载主同步数据库失败
18293:S 19 Oct 2020 11:37:31.332*连接到主机127.0.0.1:6379
18293:S 2020年10月19日11:37:31.333*主副本同步已开始
18293:S 19 Oct 2020 11:37:31.333*同步的非阻塞连接触发了事件。
18293:S 2020年10月19日11:37:31.333*主机已回复PING,复制可以继续。。。
18293:S 19 Oct 2020 11:37:31.333*无法进行部分重新同步(无缓存主机)
18293:S 2020年10月19日11:37:31.335*主机完全重新同步:1a3d1af99e5a53fb856030e3fcde97eccb0be660:0
18293:S 19 Oct 2020 11:37:31.447*主副本同步:从主副本到磁盘接收257字节
18293:S 19 2020年10月11:37:31.448*主副本同步:刷新旧数据
18293:S 19 Oct 2020 11:37:31.448*主副本同步:在内存中加载数据库
18293:S 19 Oct 2020 11:37:31.455#尝试从磁盘加载主同步数据库失败
18293:S 19 2020年10月11:37:32.336*连接到主机127.0.0.1:6379
18293:S 2020年10月19日11:37:32.337*主副本同步已开始
18293:S 19 Oct 2020 11:37:32.337*同步的非阻塞连接触发了事件。
18293:S 19 Oct 2020 11:37:32.337*主机已回复PING,复制可以继续。。。
18293:S 19 Oct 2020 11:37:32.338*无法进行部分重新同步(无缓存主机)
18293:S 2020年10月19日11:37:32.340*主机完全重新同步:1a3d1af99e5a53fb856030e3fcde97eccb0be660:0
18293:S 19 Oct 2020 11:37:32.454*主副本同步:从主副本到磁盘接收257字节
18293:S 19 2020年10月11:37:32.456*主副本同步:刷新旧数据
18293:S 19 Oct 2020 11:37:32.456*主副本同步:在内存中加载数据库
18293:S 19 Oct 2020 11:37:32.467#尝试从磁盘加载主同步数据库失败
你有什么可能的解决办法吗?或者为什么我会碰到它