Frage

After i configured redis with password protected i get below error

Exception Occured 
Exception Message --> NOAUTH Authentication required.
Exception Cause --> redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.
File Name : SecurityInterceptor.java    
Class Name : org.tcs.com.security.filter.SecurityInterceptor
Method Name : doFilter
War es hilfreich?

Lösung 2

Add your password property to the block in your Tomcat context.xml..

Andere Tipps

redis.clients.jedis.exceptions.JedisDataException

indicates that jedis (a java Redis client) is used to connect with Redis server.

"NOAUTH Authentication required error"

indicates that the jedis connection requires password for authentication.

The following java code snippet shows how the password could be set:

JedisShardInfo shardInfo = new JedisShardInfo(redisHost, redisPort);
shardInfo.setPassword(redisPassword);
Jedis jedis = new Jedis(shardInfo);
jedis.connect();

The message is misleading. Proposal is

Error NOAUTH - Authentication required

String cacheHostname = "your cash host";
String cachekey = "your cash primary key";
JedisShardInfo shardInfo = new JedisShardInfo(cacheHostname, 6379);
shardInfo.setPassword(cachekey);
Jedis jedis = new Jedis(shardInfo);
jedis.auth(cachekey);
jedis.connect();
System.out.println( "Cache Response : " + jedis.ping());
  public JedisPool(final Config poolConfig, final String host, int port,
        int timeout, final String password) {
    this(poolConfig, host, port, timeout, password, Protocol.DEFAULT_DATABASE);
}

This method maybey help you.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top