skip to Main Content

Spring Boot 2.4.2 – DNS Resolution Problem at start on Apple M1 – CentOS

I'm upgrading my Spring Boot version from 2.1.x to 2.4.2. When I compiled and run the code, I got the following warning: Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider,fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. java.lang.ClassNotFoundException: io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider…

VIEW QUESTION

Postgres container connection refused – Debian

Docker-compose with 2 containers. 1st is a Postgres database and 2nd is a Java Spring Boot application. For running, I use further docker-compose config file: docker-compose.yml version: "3.7" services: db-service: image: postgres restart: always volumes: - /home/ec2-user/dbdata:/var/lib/postgresql/data environment: POSTGRES_USER: postgres…

VIEW QUESTION

Cannot connect to redis using spring and lettuce

I am struggling to find what could be wring here; need help. I am using spring-data-redis 2.4.1 RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration() redisStandaloneConfiguration.setHostname(hostname) redisStandaloneConfiguration.setPort(6379) redisStandaloneConfiguration.setPassword("password") I then create lettuceClientConfigurationBuilder and specify clientName I then use lettuceClientConfiguration and redisStandaloneConfiguration to create…

VIEW QUESTION

NOAUTH Authentication required spring-boot-data-redis+Realease Lettuce+Redis sentinel

when I restart redis cause java.util.concurrent.ExecutionException: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required. Why is this a problem use version like this @Configuration public class RedisConfig { @Autowired private RedisProperties redisProperties; @Bean(destroyMethod = "close") public StatefulRedisConnection<String, Object> StatefulRedisConnection() { RedisURI redisUri = RedisURI.builder().withPassword(redisProperties.getPassword())…

VIEW QUESTION

using spring boot data redis template get a null pointer error

config: @Configuration @EnableCaching public class RedisConfig extends CachingConfigurerSupport{ @Bean(name = "template") public RedisTemplate<String, Object> template(RedisConnectionFactory factory) { RedisTemplate<String, Object> template = new RedisTemplate<>(); template.setConnectionFactory(factory); Jackson2JsonRedisSerializer<Object> jacksonSeial = new Jackson2JsonRedisSerializer<>(Object.class); ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jacksonSeial.setObjectMapper(om); StringRedisSerializer stringSerial…

VIEW QUESTION

Will the redis callback be executed in redis and not in my program?

Let say for example I have the following code: return (long) redisTemplate.execute(new RedisCallback() { @Override public Object doInRedis(RedisConnection connection) throws DataAccessException { String redisKey = RedisKeyUtil.getDAUKey(df.format(start), df.format(end)); connection.bitOp(RedisStringCommands.BitOperation.OR, redisKey.getBytes(), keyList.toArray(new byte[0][0])); return connection.bitCount(redisKey.getBytes()); } }); Will this doInredis method be…

VIEW QUESTION

Spring Boot Caching with Redis Sentinel always connects to master node

I have a Spring Boot (2.3.1.RELEASE) app that has caching with Redis Sentinel. This is my configuration for the Sentinel connection: @Bean public LettuceConnectionFactory redisConnectionFactory() { RedisSentinelConfiguration sentinelConfig = new RedisSentinelConfiguration() .master(redisProperties.getSentinel().getMaster()); redisProperties.getSentinel().getNodes().forEach(s -> sentinelConfig.sentinel(s, redisProperties.getPort())); sentinelConfig.setPassword(RedisPassword.of(redisProperties.getPassword())); return new LettuceConnectionFactory(sentinelConfig);…

VIEW QUESTION
Back To Top
Search