TiDB-Lightning Stuck While Importing Data

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb-lightning 导入数据卡住

| username: CoCoTaro

[TiDB Usage Environment] Test Environment
[TiDB Version] v7.5.1
[Reproduction Path] Successfully imported once using lightning, but due to incomplete data export, deleted the data and re-imported. Deleted the /tmp/.pb files. Currently, when executing the lightning task again, the import is unsuccessful and gets stuck, and no /tmp/.pb files are generated.
[Encountered Problem: Phenomenon and Impact] Old cluster v6.1.0, used dumpling to export SQL files, used tidb-lightning v7.5.1 to import into the new cluster, it gets stuck and data cannot be imported.
[Resource Configuration]

[Attachment: Screenshot/Log/Monitoring]

tidb-lightning.toml file content:
[lightning]
status-addr = “:8289”
#server-mode = true

[mydumper]
data-source-dir = “/mntdisk/lbj/tidb_data_bak”
filter = [‘ent*.*’]

[tikv-importer]
parallel-import = true
backend = “tidb”

sorted-kv-dir = “/mntdisk/lbj/tidb_sort”

addr = “192.168.3.207:8287”

[tidb]
host = “192.168.3.207”
port = 4000
user = “root”
password = “XXX”
status-port = 10080
pd-addr = “192.168.3.207:2479”
log-level = “debug”

[checkpoint]
enable = true

schema = “tidb_lightning_checkpoint”

[conflict]
strategy = “ignore”

| username: Demo二棉裤 | Original post link

Can you check if there is anything under /mntdisk/lbj/tidb_sort?

| username: WalterWj | Original post link

Could you provide your lightning execution command and the complete lightning log or error log?

| username: CoCoTaro | Original post link

This part below is empty.

| username: CoCoTaro | Original post link

tiup tidb-lightning -config tidb-lightning.toml

The log in the screenshot is the complete log, it only prints this much, and there are no errors.

| username: rebelsre | Original post link

How about trying it like this: tiup tidb-lightning:v7.5.1 -config tidb-lightning.toml?

| username: CoCoTaro | Original post link

I tried this, but it still doesn’t work.

| username: Demo二棉裤 | Original post link

Is there any schema related to lightning in the database, such as lightning-task? Delete all of them, delete pb as well, and clean up the temporary sort files. Directly go to the tooltick directory and extract a v7.5.1 lightning. Try using nohup ./tidb-lightning --config xxxx.toml &.

| username: CoCoTaro | Original post link

I uninstalled Lightning 8.1.0, and currently, I only have version 7.5.1.

| username: Demo二棉裤 | Original post link

Hmm, don’t use this one. Just go to the tools package and extract one to use.

| username: rebelsre | Original post link

This command should also have terminal output. Please take a screenshot and have a look.

| username: 小于同学 | Original post link

Change it.

| username: CoCoTaro | Original post link

These temporary files and related data tables with lightning are not present. I tried using lightning 7.5.1 from tooltick, but it didn’t work, just like the previous logs.

I suspect there was an issue with my cluster. I uninstalled and reinstalled the cluster, and also reinstalled lightning, and it worked.