SSL Handshake Failure Exception on Connecting Jedis Client to KeyDB with Select Database
I performed an SSL connection test for KeyDB and generated certificates using the "gen-test-certs.sh" script. After configuring the certificate path in the keydb.conf file, I utilized the JedisPool to establish a new connection each time by setting "maxidleconnection = 0".
During the test, the program initiated 10 threads, with each thread creating 10,000 connections sequentially and exit. However, after creating numerous connections, an exception occurred, displaying the following message:
java.util.concurrent.ExecutionException: redis.clients.jedis.exceptions.JedisConnectionException: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
keydb log:
3507057:3507113:M 01 Nov 2023 16:47:37.135 # Error accepting a client connection: error:140943F2:SSL routines:ssl3_read_bytes:sslv3 alert unexpected message
The issue arises when establishing a connection using the SELECT 1 database command. Interestingly, when connections are made to the default database '0', no errors are encountered.
Steps to Reproduce:
Execute SSL connection testing for KeyDB.
Generate certificates using the "gen-test-certs.sh" script.
Load the certificate path in the keydb.conf file.
Configure Jedis client to create a new connection each time (maxidleconnection = 0).
Run the test program to create 10 threads, each establishing 10,000 connections.
Attempt to establish a connection using the SELECT 1 database command.
Expected Behavior:
The SSL connection to KeyDB using the SELECT 1 database command should be established without encountering a handshake failure.
Additional Information:
The exception occurs only when testing connections to a database other than the default '0'. Moreover, executing a SET command in the default database triggers the same error.
Your support in comprehending and resolving this SSL handshake failure issue would be greatly appreciated. Thank you for your guidance and assistance.