TiDB Installation Error

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

Original topic: tidb 安装报错

| username: 等一分钟

[tidb@db11 ~]$ more 1.yaml
global:
user: “tidb”
ssh_port: 22
deploy_dir: “/tidb-deploy”
data_dir: “/tidb-data”
server_configs: {}
pd_servers:

  • host: 10.1.50.29
    tidb_servers:
  • host: 10.1.50.11
    tikv_servers:
  • host: 10.1.50.48
    [tidb@db11 ~]$
    [tidb@db11 ~]$ tiup cluster deploy tidb-test 1.yaml --user tidb -p tidb
    tiup is checking updates for component cluster …
    A new version of cluster is available:
    The latest version: v1.10.3
    Local installed version: v1.10.2
    Update current component: tiup update cluster
    Update all components: tiup update --all

Starting component cluster: /home/tidb/.tiup/components/cluster/v1.10.2/tiup-cluster deploy tidb-test 1.yaml --user tidb -p tidb

Error: version 1.yaml is not a valid SemVer string

Verbose debug logs has been written to /home/tidb/.tiup/logs/tiup-cluster-debug-2022-08-22-09-18-23.log.
[tidb@db11 ~]$
[tidb@db11 ~]$
[tidb@db11 ~]$
[tidb@db11 ~]$ cat /home/tidb/.tiup/logs/tiup-cluster-debug-2022-08-22-09-18-23.log
2022-08-22T09:18:23.405+0800 INFO Execute command {“command”: “tiup cluster deploy tidb-test 1.yaml --user tidb -p tidb”}
2022-08-22T09:18:23.405+0800 DEBUG Environment variables {“env”: [“TIUP_HOME=/home/tidb/.tiup”, “TIUP_USER_INPUT_VERSION=”, “TIUP_VERSION=1.10.2”, “TIUP_COMPONENT_DATA_DIR=/home/tidb/.tiup/storage/cluster”, “TIUP_COMPONENT_INSTALL_DIR=/home/tidb/.tiup/components/cluster/v1.10.2”, “TIUP_TELEMETRY_STATUS=enable”, “TIUP_TELEMETRY_UUID=65a4a581-c581-4309-b1f1-f22f7b402367”, “TIUP_TELEMETRY_SECRET=ce09b82035947bb1787747c1bac9f2b4”, “TIUP_WORK_DIR=/home/tidb”, “TIUP_TAG=TFCKp5Q”, “TIUP_INSTANCE_DATA_DIR=/home/tidb/.tiup/data/TFCKp5Q”, “XDG_SESSION_ID=1”, “HOSTNAME=db11”, “SHELL=/bin/bash”, “TERM=vt100”, “HISTSIZE=1000”, “USER=tidb”, “LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=01;36:.au=01;36:.flac=01;36:.mid=01;36:.midi=01;36:.mka=01;36:.mp3=01;36:.mpc=01;36:.ogg=01;36:.ra=01;36:.wav=01;36:.axa=01;36:.oga=01;36:.spx=01;36:*.xspf=01;36:”, “MAIL=/var/spool/mail/tidb”, “PATH=/home/tidb/.tiup/bin:/home/tidb/.tiup/bin:/usr/local/mysql/bin:/usr/pgsql-13/bin:/usr/local/jdk/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/tidb/.local/bin:/home/tidb/bin”, “PWD=/home/tidb”, “JAVA_HOME=/usr/local/jdk”, “LANG=en_US.UTF-8”, “HISTCONTROL=ignoredups”, “SHLVL=1”, “HOME=/home/tidb”, “LOGNAME=tidb”, “LESSOPEN=||/usr/bin/lesspipe.sh %s”, “_=/home/tidb/.tiup/bin/tiup”, “TIUP_TELEMETRY_EVENT_UUID=29c43816-e7bf-4b2b-bea8-a185ab2f1df1”, “TIUP_MIRRORS=https://tiup-mirrors.pingcap.com”]}
2022-08-22T09:18:23.407+0800 DEBUG Initialize repository finished {“duration”: “1.708586ms”}
2022-08-22T09:18:23.407+0800 INFO Execute command finished {“code”: 1, “error”: “version 1.yaml is not a valid SemVer string”}

| username: 等一分钟 | Original post link

What could be the problem?

| username: Kongdom | Original post link

It seems to be a configuration file parameter issue based on the prompt.
Add the configurations for monitoring_servers, grafana_servers, and alertmanager_servers.

This is the simplest minimal configuration template:

| username: 等一分钟 | Original post link

[tidb@db11 ~]$ cat 1.yaml
global:
user: “tidb”
ssh_port: 22
deploy_dir: “/tidb-deploy”
data_dir: “/tidb-data”
server_configs: {}
pd_servers:

  • host: 10.1.50.11
  • host: 10.1.50.32
  • host: 10.1.50.31
    tidb_servers:
  • host: 10.1.50.29
  • host: 10.1.50.31
  • host: 10.1.50.32
    tikv_servers:
  • host: 10.1.50.31
  • host: 10.1.50.32
  • host: 10.1.50.48
    tiflash_servers:
  • host: 10.1.50.31
  • host: 10.1.50.32
  • host: 10.1.50.48
    monitoring_servers:
  • host: 10.1.50.11
    grafana_servers:
  • host: 10.1.50.11
    alertmanager_servers:
  • host: 10.1.50.11
    [tidb@db11 ~]$
    [tidb@db11 ~]$
    [tidb@db11 ~]$ tiup cluster deploy tidb-test 1.yaml --user tidb -p tidb
    tiup is checking updates for component cluster …
    A new version of cluster is available:
    The latest version: v1.10.3
    Local installed version: v1.10.2
    Update current component: tiup update cluster
    Update all components: tiup update --all

Starting component cluster: /home/tidb/.tiup/components/cluster/v1.10.2/tiup-cluster deploy tidb-test 1.yaml --user tidb -p tidb

Error: version 1.yaml is not a valid SemVer string

Verbose debug logs has been written to /home/tidb/.tiup/logs/tiup-cluster-debug-2022-08-22-09-30-29.log.
[tidb@db11 ~]$ more /home/tidb/.tiup/logs/tiup-cluster-debug-2022-08-22-09-30-29.log
2022-08-22T09:30:29.755+0800 INFO Execute command {“command”: “tiup cluster deploy tidb-test 1.yaml --user tidb -p tidb”}
2022-08-22T09:30:29.755+0800 DEBUG Environment variables {“env”: [“TIUP_HOME=/home/tidb/.tiup”, “TIUP_USER_INPUT_VERSION=”, “TIUP_VERSION=1.10.2”, “TIUP_COMPONENT_DATA_DIR=/home/tidb/.tiup/storage/cluster”, “TIUP_COMPONENT_INSTALL
DIR=/home/tidb/.tiup/components/cluster/v1.10.2", “TIUP_TELEMETRY_STATUS=enable”, “TIUP_TELEMETRY_UUID=65a4a581-c581-4309-b1f1-f22f7b402367”, “TIUP_TELEMETRY_SECRET=ce09b82035947bb1787747c1bac9f2b4”, “TIUP_WORK_DIR=/home/tidb”, “TIUP_TA
G=TFCNs2k”, “TIUP_INSTANCE_DATA_DIR=/home/tidb/.tiup/data/TFCNs2k”, “XDG_SESSION_ID=1”, “HOSTNAME=db11”, “SHELL=/bin/bash”, “TERM=vt100”, “HISTSIZE=1000”, “USER=tidb”, “LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd
=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.tx
z=01;31:
.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;3
1:
.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=0
1;35:
.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:
.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35
:.aac=01;36:.au=01;36:.flac=01;36:.mid=01;36:.midi=01;36:.mka=01;36:.mp3=01;36:.mpc=01;36:.ogg=01;36:.ra=01;36:.wav=01;36:.axa=01;36:.oga=01;36:.spx=01;36:*.xspf=01;36:”, “MAIL=/var/spool/mail/tidb”, “PATH=/home/tidb/.tiup/
bin:/home/tidb/.tiup/bin:/usr/local/mysql/bin:/usr/pgsql-13/bin:/usr/local/jdk/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/tidb/.local/bin:/home/tidb/bin”, “PWD=/home/tidb”, “JAVA_HOME=/usr/local/jdk”, “LANG=en_US.UT
F-8”, “HISTCONTROL=ignoredups”, “SHLVL=1”, “HOME=/home/tidb”, “LOGNAME=tidb”, “LESSOPEN=||/usr/bin/lesspipe.sh %s”, "
=/home/tidb/.tiup/bin/tiup”, “TIUP_TELEMETRY_EVENT_UUID=9f0d24d6-9e32-40a4-a7b0-a2ebaa1fb48a”, “TIUP_MIRRORS=https://ti
up-mirrors.pingcap.com”]}
2022-08-22T09:30:29.757+0800 DEBUG Initialize repository finished {“duration”: “1.664118ms”}
2022-08-22T09:30:29.757+0800 INFO Execute command finished {“code”: 1, “error”: “version 1.yaml is not a valid SemVer string”}

| username: 等一分钟 | Original post link

It still doesn’t work even after changing it.

| username: cheng | Original post link

Your configuration file format must strictly follow the template.

Refer to Deploy a TiDB Cluster Using TiUP | PingCAP Docs

| username: cheng | Original post link

Then rename the file to topology.yaml and try reinstalling.

| username: Kongdom | Original post link

Where did you refer to for deployment? The deploy statement is missing version information.

| username: wuxiangdong | Original post link

Generate a template using tiup cluster template > topology.yaml. Modify this template as needed. It seems like there might be an issue with the format of your configuration file.

| username: Kongdom | Original post link

The format is due to the escaping on the TUG site.

| username: 我是咖啡哥 | Original post link

The person above is right, the version information is missing.
Error: version 1.yaml is not a valid SemVer string

| username: 等一分钟 | Original post link

Thank you.

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.