TiDB Lightning Alert

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

Original topic: tidb lightning 报警

| username: 烂番薯0

When using lightning to import, I found the following error in the tidb-lightning.log. What does it mean?

This is the configuration of tidb-lightning.toml

| username: wenyi | Original post link

Try referring to my configuration
[lightning]
level = “info”
file = “tidb-lightning.log”
check-requirements = true

[mydumper]
data-source-dir = “/app/basehissyssreport/”

[tikv-importer]
backend = “local”
sorted-kv-dir = “/app/sortkv”

[tidb]
host =
port = 4000
status-port = 10080

Address of the pd-server, just fill in one.

pd-addr =
user = “root”
password = “”
log-level = “error”

[cron]

Duration for TiDB Lightning to automatically refresh the import mode status, this value should be less than the corresponding setting in TiKV.

switch-mode = “3m”

Duration to print import progress in the log.

log-progress = “3m”

| username: 烂番薯0 | Original post link

What should I do now? Should I delete the data and then stop it?
How do I stop it?

| username: wenyi | Original post link

The database size is not large. I suggest cleaning up the database and referring to my configuration to start over.

| username: 烂番薯0 | Original post link

Okay, thank you, I’ll give it a try.

| username: tidb菜鸟一只 | Original post link

It looks somewhat similar to this:

| username: 烂番薯0 | Original post link

A bunch of errors, boss

| username: 普罗米修斯 | Original post link

tidb-lightning.toml

[lightning]

region-concurrency = 16

max-size = 256

max-days = 28

max-backups = 14

level = “info”

status-addr = ‘:8289’

check-requirements = true

file = “/home/tidb/tidb-toolkit-v5.0.1-linux-amd64/bin/tidb-lightning.log”

[checkpoint]

enable = true

[tikv-importer]

backend = “tidb”

on-duplicate = “ignore”

[Mydumper]

data-source-dir = “/test”

[tidb]

host = “192.168.80.203”

port = 4000

user = “root”

password = “tidb”

status-port = 10080

| username: 普罗米修斯 | Original post link

Try using the TiDB mode if the data volume is not large.

| username: 有猫万事足 | Original post link

At the beginning of the issue, you should consider using curl to post to the address in the log that cannot be accessed. Figure out why this PD API address cannot be accessed.

The most likely reason is that your Lightning version is inconsistent with your TiDB version. Therefore, the address that Lightning needs to access does not exist on your PD.
A less likely reason is that your PD has undergone TLS security hardening, causing the PD’s HTTP address to become HTTPS, so it cannot be accessed.
In short, the root cause is the issue with accessing this URL.

The subsequent error occurs because your last Lightning import encountered an error and exited abnormally, but the checkpoint was not cleared. When you try to import again, it finds that the previous checkpoint exists, so it does not continue the import and exits directly.
You can follow the prompts in the log to clear the checkpoint data and then continue. You may need to install tidb-lightning-ctl separately.

| username: 烂番薯0 | Original post link

My version was installed through the official website’s tiup component, and the versions are basically the same. I think the issue might have been caused by the incomplete data from the interrupted transmission not being cleared. Now that it has been cleared, I re-imported using the tidb mode, and so far there are no issues.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.