title: NOAUTH Authentication required spring-boot-data-redis+Realease Lettuce+Redis sentinel
body: <p>when I restart redis  cause<br />
  java.util.concurrent.ExecutionException: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.
  Why is this a problem
  use version like this</p>
  <pre><code>@Configuration
  public class RedisConfig {
  
      @Autowired
      private RedisProperties redisProperties;
  
      @Bean(destroyMethod = &quot;close&quot;)
      public StatefulRedisConnection&lt;String, Object&gt; StatefulRedisConnection() {
          RedisURI redisUri = RedisURI.builder().withPassword(redisProperties.getPassword())
                  .withSentinel(redisProperties.getSentinel().getNodes().get(0).split(&quot;:&quot;)[0],
                          Integer.valueOf(redisProperties.getSentinel().getNodes().get(0).split(&quot;:&quot;)[1]))
                  .withSentinelMasterId(redisProperties.getSentinel().getMaster())
                  .withDatabase(redisProperties.getDatabase()).build();
          RedisClient redisClient = RedisClient.create(redisUri);
          return redisClient.connect(new SerializedObjectCodec());
      }
  }
  </code></pre>
  <pre><code>public class CacheImpl implements Cache {
      @Autowired
      private StatefulRedisConnection connect;
  
      public Boolean addCourseInfosCache() {
          RedisAsyncCommands&lt;String, Object&gt; commands = connect.async();
          // disable auto-flushing
          commands.setAutoFlushCommands(false);
          List&lt;RedisFuture&lt;?&gt;&gt; futures = Lists.newArrayList();
          commands.flushCommands();
      }
  }
  </code></pre>