Vra

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
Was dit nuttig?

Oplossing 2

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

Ander wenke

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.

Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow
scroll top