Skip to content

Spring Boot startup with Lettuce and Micrometer metrics runs into Spring context singleton lock #2814

Closed as not planned
@nicbillen

Description

@nicbillen

Hello together,
we updated our Spring Boot Service from version 3.1.6 to version 3.2.0 (Spring Cloud version 2023.0.0). The application connects via Spring data (lettuce) to a Redis Sentinel deployment. For an encrypted connection to Redis it uses ssl bundles. With Spring Boot 3.1.6 everything works fine. But after the update to the new version, the application is not starting anymore. With trace logging we see these messages (some messages are masked with XXX):

`81474969","logger_name":"jdk.event.security","thread_name":"lettuce-nioEventLoop-4-1","level":"DEBUG","level_value":10000}

{"@timestamp":"2023-12-21T11:00:19.790904008Z","@version":"1","message":"[id: 0x7e9b7544, L:/XXX - R:redis-XXX/XXX:26379] HANDSHAKEN: protocol:TLSv1.3 cipher suite:TLS_AES_128_GCM_SHA256","logger_name":"io.netty.handler.ssl.SslHandler","thread_name":"lettuce-nioEventLoop-4-1","level":"DEBUG","level_value":10000}

{"@timestamp":"2023-12-21T11:00:19.805736687Z","@version":"1","message":"[channel=0xd036595a, /XXX -> redis-XXX/XXX:26379, epid=0x2, chid=0x1] Received: 125 bytes, 1 commands in the stack","logger_name":"io.lettuce.core.protocol.CommandHandler","thread_name":"lettuce-nioEventLoop-4-1","level":"DEBUG","level_value":10000}

{"@timestamp":"2023-12-21T11:00:19.805879889Z","@version":"1","message":"[channel=0xd036595a, /XXX -> redis-XXX/XXX:26379, epid=0x2, chid=0x1] Buffer: %6\r\n$6\r\nserver\r\n$5\r\nredis\r\n$7\r\nversion\r\n$5\r\n6.2.7\r\n$5\r\nproto\r\n:3\r\n$2\r\nid\r\n:1799500\r\n$4\r\nmode\r\n$8\r\nsentinel\r\n$7\r\nmodules\r\n*0","logger_name":"io.lettuce.core.protocol.CommandHandler","thread_name":"lettuce-nioEventLoop-4-1","level":"TRACE","level_value":5000}

{"@timestamp":"2023-12-21T11:00:19.806053831Z","@version":"1","message":"[channel=0xd036595a, /XXX -> redis-XXX/XXX:26379, epid=0x2, chid=0x1] Stack contains: 1 commands","logger_name":"io.lettuce.core.protocol.CommandHandler","thread_name":"lettuce-nioEventLoop-4-1","level":"DEBUG","level_value":10000}

{"@timestamp":"2023-12-21T11:00:19.816972165Z","@version":"1","message":"Decode done, empty stack: true","logger_name":"io.lettuce.core.protocol.RedisStateMachine","thread_name":"lettuce-nioEventLoop-4-1","level":"DEBUG","level_value":10000}

The “Decode done, empty stack: true” message is the last one in the log. Afterwards the application stucks and seems to wait for something.
We haven’t tested it in a minimal local setup, but maybe someone is able to see anything. I have found the following GitHub thread with a lettuce issue: redis/lettuce#2379 Maybe it is related.

For us it is a critical problem, because we need the updates.

All the best
Nicolas Billen

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions