vlstv opened a new issue, #2756:
URL: https://github.com/apache/kvrocks/issues/2756

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/kvrocks/issues) and found no similar issues.
   
   
   ### Version
   
   kvrocks version 2.10.1
   Ubuntu 22.04.5 LTS jammy
   
   
   ### Minimal reproduce step
   
   - Compile Kvrocks using the following CMake flag to enable OpenSSL 
`-DENABLE_OPENSSL=ON`
   
   - Configure TLS for replication:
   ```
   tls-cert-file /etc/kvrocks/ssl/cert.pem
   tls-key-file /etc/kvrocks/ssl/privkey.pem
   tls-ca-cert-file /etc/kvrocks/ssl/ca.pem
   tls-replication yes
   tls-auth-clients yes
   ```
   - Preload the master node with a substantial dataset (approximately 3 
million keys, totaling around 250MB). Note that smaller datasets may not 
trigger the issue.
   - Set up a clean replica node and initiate a connection to the master.
   - Monitor the replica and master logs. The replica connection to the master 
should fail
   
   ### What did you expect to see?
   
   Replica fully synced from master
   
   ### What did you see instead?
   
   On master
   ```
   I20250131 10:25:43.287408 171037 cmd_replication.cc:60] Slave 
{replica-ip}:52148, listening port: 6666, announce ip: {replica-ip} asks for 
synchronization with next sequence: 1 replication id: not supported, and local 
sequence: 2928646138
   E20250131 10:25:43.302386 171037 redis_connection.cc:110] [connection] Going 
to remove the client: {replica-ip}:52148, while encounter error: Success, SSL 
Error: error:0A000126:SSL routines::unexpected eof while reading
   I20250131 10:25:43.496016 171047 storage.cc:1025] [storage] Create 
checkpoint successfully
   I20250131 10:25:43.496235 171047 cmd_replication.cc:242] [replication] 
Succeed sending full data file info to {replica-ip}
   W20250131 10:25:43.534340 171048 cmd_replication.cc:299] [replication] Fail 
to send file 026067.sst to {replica-ip}, error: Success
   I20250131 10:25:53.575836 171049 storage.cc:1045] [storage] Using current 
existing checkpoint
   I20250131 10:25:53.575964 171049 cmd_replication.cc:242] [replication] 
Succeed sending full data file info to {replica-ip}
   W20250131 10:25:53.612814 171050 cmd_replication.cc:299] [replication] Fail 
to send file 026067.sst to {replica-ip}, error: Success
   I20250131 10:26:03.650056 171095 storage.cc:1045] [storage] Using current 
existing checkpoint
   I20250131 10:26:03.650157 171095 cmd_replication.cc:242] [replication] 
Succeed sending full data file info to {replica-ip}
   W20250131 10:26:03.688643 171096 cmd_replication.cc:299] [replication] Fail 
to send file 026067.sst to {replica-ip}, error: Success
   ```
   
   On replica
   ```
   ==> /var/log/kvrocks/kvrocks.INFO <==
   I20250131 10:29:05.033082 149749 replication.cc:613] [replication] Start 
syncing data with fullsync
   I20250131 10:29:05.043185 149749 storage.cc:1111] [storage] Succeed deleting 
invalid file 026067.sst.tmp of master checkpoint
   I20250131 10:29:05.043205 149749 replication.cc:701] [replication] Succeeded 
fetching full data files info, fetching files in parallel
   W20250131 10:29:05.079695 149948 replication.cc:946] [fetch] Fail to fetch 
file 026067.sst, err: fetch file err: read sst file: failed to read from SSL 
connection: error:00000000:lib(0)::reason(0)
   E20250131 10:29:05.079890 149749 replication.cc:717] [replication] Failed to 
parallel fetch files while fetch file err: read sst file: failed to read from 
SSL connection: error:00000000:lib(0)::reason(0)
   I20250131 10:29:05.080359 149749 replication.cc:234] [replication] Retry in 
10 seconds
   
   ==> /var/log/kvrocks/kvrocks.ERROR <==
   E20250131 10:29:05.079890 149749 replication.cc:717] [replication] Failed to 
parallel fetch files while fetch file err: read sst file: failed to read from 
SSL connection: error:00000000:lib(0)::reason(0)
   ```
   
   ### Anything Else?
   
   - Transferring the dataset from the master to the replica manually allows 
replication to work as expected
   - If new writes are made to a clean master while a replica is connected, 
replication functions normally without errors
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to