redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required. 阿新 • • 發佈:2019-01-08 在用jedis叢集中,用ShardedJedisPool對主從進行hash演算法選取redis服務端,然而我在redis主從都設定了密碼,在配置連線時報如下錯誤 at redis.clients.jedis.Protocol.processError(Protocol.java:117) at redis.clients.jedis.Protocol.process(Protocol.java:151) at redis.clients.jedis.Protocol.read(Protocol.java:205) at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:297) at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:216) at redis.clients.jedis.Connection.getBulkReply(Connection.java:205) at redis.clients.jedis.Jedis.clusterNodes(Jedis.java:3166) at redis.clients.jedis.JedisClusterInfoCache.discoverClusterNodesAndSlots(JedisClusterInfoCache.java:48) at redis.clients.jedis.JedisClusterConnectionHandler.initializeSlotsCache(JedisClusterConnectionHandler.java:36) at redis.clients.jedis.JedisClusterConnectionHandler.<init>(JedisClusterConnectionHandler.java:25) at redis.clients.jedis.JedisSlotBasedConnectionHandler.<init>(JedisSlotBasedConnectionHandler.java:21) at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:54) at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:48) at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:35) at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:27) at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:31) at redis.clients.jedis.tests.JedisCTest.setUp(JedisCTest.java:55) at junit.framework.TestCase.runBare(TestCase.java:139) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) 解決方式: 對從不設定密碼,而在設定切片池時,從用主的密碼,就可以,什麼原理沒清楚