Lots of connection errors (without secret stuff in it!)

775 views
Skip to first unread message

Mark Juchems

unread,
Jun 22, 2016, 12:41:59 PM6/22/16
to lettuce-redis-client-users

We seem to be getting loads of these errors in our topology.

1.  Should I be getting these errors?
2.  Is there anything I can do to mitigate this?

All seems to be working fine.  That is the odd thing...

Thanks for any input!

mark


2016-06-22 15:57:01 STDIO [ERROR] Jun 22, 2016 3:57:01 PM com.lambdaworks.redis.protocol.ConnectionWatchdog reconnect
INFO: Reconnecting, last destination was blah.blah.blah.com
2016-06-22 15:57:01 STDIO [ERROR] Jun 22, 2016 3:57:01 PM com.lambdaworks.redis.protocol.ConnectionWatchdog reconnect
INFO: Reconnected to blah.blah.blah.com:6380
2016-06-22 15:57:01 STDIO [ERROR] Jun 22, 2016 3:57:01 PM com.lambdaworks.redis.protocol.ConnectionWatchdog reconnect INFO: Reconnecting, last destination was blah.blah.blah.com:6380
2016-06-22 15:57:01 STDIO [ERROR] Jun 22, 2016 3:57:01 PM com.lambdaworks.redis.protocol.ConnectionWatchdog reconnect INFO: Reconnected to blah.blah.blah.com:6380
2016-06-22 15:57:05 STDIO [ERROR] Jun 22, 2016 3:57:05 PM com.lambdaworks.redis.protocol.ConnectionWatchdog reconnect INFO: Reconnecting, last destination was blah.blah.blah.com:6380
2016-06-22 15:57:05 STDIO [ERROR] Jun 22, 2016 3:57:05 PM com.lambdaworks.redis.protocol.ConnectionWatchdog reconnect INFO: Reconnected to blah.blah.blah.com:6380 2016-06-22 15:57:10 STDIO [ERROR] Jun 22, 2016 3:57:10 PM com.lambdaworks.redis.protocol.ConnectionWatchdog reconnect INFO: Reconnecting, last destination was blah.blah.blah.com:6380
2016-06-22 15:57:10 STDIO [ERROR] Jun 22, 2016 3:57:10 PM com.lambdaworks.redis.protocol.ConnectionWatchdog reconnect INFO: Reconnected to blah.blah.blah.com:6380

I am connecting like this:

public static RedisConnection<String, String> getRegistrationRedisDataSource() {
		String url = PropertiesButler.getProperty("redis.registration.url", true);
		String password = PropertiesButler.getProperty("redis.registration.key", true);
		int port = Integer.parseInt(PropertiesButler.getProperty("redis.registration.port", true));
		int timeout = Integer.parseInt(PropertiesButler.getProperty("redis.registration.timeout", true));

		RedisURI uri = new RedisURI();
		uri.setSsl(true);
		uri.setHost(url);
		uri.setPort(port);
		uri.setPassword(password);
		uri.setTimeout(timeout);
		uri.setUnit(TimeUnit.SECONDS);

		RedisClient redisClient = RedisClient.create(uri);
		RedisConnection<String, String> redisConnection = null;
		try {
			redisConnection = redisClient.connect();
		}
		catch (Exception e) {
			log.error("Redis connection could not be made!  Port is probably closed (is this dev?).", e);
			if (!TmaticProperties.environment.in(Environment.dev)) {
				throw e;
			}
		}
		return redisConnection;
	}

Mark Paluch

unread,
Jun 22, 2016, 2:17:05 PM6/22/16
to lettuce-redis-client-users
Hi Mark, 

STDIO [ERROR] Jun 22, 2016 3:57:01 PM com.lambdaworks.redis.protocol.ConnectionWatchdog reconnect
INFO: Reconnecting, last

isn't an error, it's an INFO log message that lettuce tries to reconnect to your Redis server. It seems the shaded artifact has relocated the slf4j/log4j adapters into com.lambdaworks.org.slf4j. Because of that, lettuce falls back to java.util.logging. I just don't know why your container hasn't an adapter for java.util.logging and reports each log event as ERROR.

If your container uses slf4j-based logging you could try adding jul-to-slf4j to your classpath and see whether it solves your issue.


HTH, Mark
Reply all
Reply to author
Forward
0 new messages