redis 不小心运行了 slaveof get 2 导致连接错误
我的redis 单机环境。 今天用 ./redis-cli 连上去后不小心运行了 SLAVEOF get 2 本来是想运行SLOWLOG get 2运行后各client 就开始报错了,错误如下:
read client org.springframework.data.redis.RedisConnectionFailureException: java.net.SocketTimeoutException: Read timed out; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed outwrite client org.springframework.dao.InvalidDataAccessApiUsageException: READONLY You can't write against a read only slave.; nested exception is redis.clients.jedis.exceptions.JedisDataException: READONLY You can't write against a read only slave.各位有好的解决办法没? 我用的笨方法,将业务停掉, 重启 redis 这样不是最好的解决办法吧。如果业务系统在运行呢。 没有看懂问题、、、 明白了,但是也不用重启redis啊,直接用redis-cli执行 slaveof no one 不就可以了吗? 执行过slave no one之后,该redis实例的role就是master了,就可以写了
页:
[1]