rqueue icon indicating copy to clipboard operation
rqueue copied to clipboard

Lettuce keeps trying to reconnect

Open ipekbaysal-vng opened this issue 3 years ago • 3 comments

What's not working?

Hi, we start redis within our unit test framework as below:

@BeforeAll static void setup() { redisServer = RedisServer.builder().port(6379).build(); redisServer.start(); }

and we shutdown it like that:

@AfterAll
static void clean() throws InterruptedException {
    redisServer.stop();
}

but after test passes and redis is shutdown. Lettuce within rQueue is still trying to reconnect. It causes our test to hang for a while. Can you let me know how would we avoid that? We have lots of these logs:

{"@timestamp":"2022-02-16T16:55:37.599Z","@version":"1","level":"INFO","message":"z Reconnecting, last destination was localhost/:6379"} {"@timestamp":"2022-02-16T16:55:37.605Z","@version":"1","level":"WARN","message":"z Cannot reconnect to [localhost/:6379]: Connection refused: localhost/127.0.0

Another question I have is: Do we need to start redis server, to be able to use rQueue? I would expect some sort of embedded redis would start within the library. But if I do not start redis explicitly I get redis connection errors.

ipekbaysal-vng avatar Feb 16 '22 17:02 ipekbaysal-vng

HI @ipekbaysal-vng Yes we need to start Redis manually like you do though I'm not quite sure why it's printing these lines.

Can you run this test and report me if you find the similar log?

https://github.com/sonus21/rqueue/blob/master/rqueue-spring-boot-starter/src/test/java/com/github/sonus21/rqueue/spring/boot/tests/integration/JobCheckinTest.java

sonus21 avatar Feb 18 '22 09:02 sonus21

I'm getting the same problem, using version 3.1.1. I also have an afterall hook and get the same exact logs.

jrsperry avatar Mar 07 '24 17:03 jrsperry

@jrsperry can you share stacktrace or sample app with this issue? I'll try to debug and update here.

sonus21 avatar Mar 07 '24 18:03 sonus21