Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: lingting恢复数据报错
[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
An error occurred while using Lightning to restore data. Is it due to version mismatch?
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
Please copy and paste the error message; the image is a bit unclear.
Verbose debug logs will be written to tidb-lightning.log
tidb lightning encountered error: [Lightning:DB:ErrDBConnect] failed to connect database: commands out of sync. You can’t run this command now
The image you uploaded is not visible. Please provide the text you need translated.
I suggest you check whether the versions of TiDB Lightning and TiDB are compatible. You can refer to the Release Notes of TiDB Lightning to see the supported TiDB versions.
The version of TiDB Lightning should be the same as the cluster.
If the versions match, you can try the following steps:
- Check if the TiDB Lightning configuration file is correct, especially the database connection information.
- Verify if TiDB is running properly by using a MySQL client to connect to TiDB and execute some simple SQL statements.
- Check the TiDB Lightning log files to see if there are any other error messages. You can enable detailed logging by setting
log-level = "debug"
in the TiDB Lightning configuration file to better understand the issue.
What is the content of this file?
Check the toml configuration file, and then manually test whether you can connect.
The default value of tidb_enable_clustered_index
is INT_ONLY
, which means that only integer primary keys will use clustered indexes by default. If you want to enable clustered indexes for all primary keys, you need to set this parameter to ON
.
Found the error, it’s an issue with haproxy again. Previously configured haproxy incorrectly, didn’t add send-proxy here. Couldn’t log in using proxy port 3390, but now after adding it, 3390 works, but can’t log in through port 4000.
If you are using lighting on 55, 56, it should not be able to connect. Non-PROXY protocol connections will be rejected.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.