“invalid tidb.port
setting”
参考 https://docs.pingcap.com/zh/tidb-in-kubernetes/stable/restore-data-using-tidb-lightning
使用了下lightning , bankend选择import,没问题。换成tidb,就提示端口不对。
# Default values for tidb-lightning.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# timezone is the default system timzone
timezone: UTC
image: pingcap/tidb-lightning:v4.0.0
imagePullPolicy: IfNotPresent
# imagePullSecrets: []
service:
type: NodePort
# failFast causes the lightning pod fails when any error happens.
# when disabled, the lightning pod will keep running when error happens to allow manual intervention, users have to check logs to see the job status.
failFast: true
dataSource:
local:
nodeName: 10.226.132.106
hostPath: /tmp/test
# The backup data is on a PVC which is from tidb-backup or scheduled backup, and is not uploaded to cloud storage yet.
# Note: when using this mode, the lightning needs to be deployed in the same namespace as the PVC
# and the `targetTidbCluster.namespace` needs to be configured explicitly
adhoc: {}
# pvcName: tidb-cluster-scheduled-backup
# backupName: scheduled-backup-20190822-041004
remote:
rcloneImage: pingcap/tidb-cloud-backup:20200229
storageClassName: local-ssd
storage: 100Gi
secretName: cloud-storage-secret
path: s3:bench-data-us/sysbench/sbtest_16_1e7.tar.gz
# Directory support downloading all files in a remote directory, shadow dataSoure.remote.path if present
# directory: s3:bench-data-us
# If rcloneConfig is configured, then `secretName` will be ignored,
# `rcloneConfig` should only be used for the cases where no sensitive
# information need to be configured, e.g. the configuration as below,
# the Pod will get the credentials from the infrastructure.
#rcloneConfig: |
# [s3]
# type = s3
# provider = AWS
# env_auth = true
# region = us-west-2
targetTidbCluster:
name: demo
# namespace is the target tidb cluster namespace, can be omitted if the lightning is deployed in the same namespace of the target tidb cluster
namespace: lxnamespace
user: root
#password: Testtest1
#port: 4000 #加了port也不行
#status-port: 10080
#host: 10.233.7.89
# If the `secretName` and `secretUserKey` are set,
# the `user` will be ignored and the user in the
# `secretName` will be used by lightning.
# If the `secretName` and `secretPwdKey` are set, the
# password in the `secretName` will be used by lightning.
secretName: tidb-secret
#secretUserKey: root
secretPwdKey: root
resources: {}
# limits:
# cpu: 16000m
# memory: 8Gi
# requests:
# cpu: 16000m
# memory: 8Gi
nodeSelector: {}
annotations: {}
tolerations: []
affinity: {}
backend: tidb #importer # importer | tidb
# Specify a Service Account for lightning
# serviceAccount:
config: |
[lightning]
level = "info"
以上是我lightning的配置。下图是logs看到的错误