How to Change TiUP from Online Mirror to Offline Mirror

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

Original topic: tiup由在线镜像如何修改为离线镜像

| username: TiDBer_VtkBZH6I

[TiDB Usage Environment] Production Environment / Testing / PoC
Testing
[TiDB Version]
V5.0.0
[Reproduction Path] What operations were performed when the issue occurred
tiup cluster list, unable to fetch the image.
[Encountered Issue: Issue Phenomenon and Impact]
TiDB was installed online in the testing environment. Due to changes in the network environment, it could not access the internet, causing TiDB to fail to start normally.
Then, I downloaded the offline image using tiup mirror clone tidb-community-server-v5.0.0-linux-x86_64 v5.0.0 --os=linux --arch=x86_64. After compressing it, I transferred it to the target server and decompressed it. I also downloaded the latest root.json and timestamp.json.
I re-specified the mirror using tiup mirror set /home/tidb-community-server-v5.0.0-linux-x86_64.
tiup cluster list reported an error.
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: 裤衩儿飞上天 | Original post link

You can refer to:
tiup mirror set | PingCAP Documentation Center
Deploying a TiDB Cluster Using TiUP | PingCAP Documentation Center

| username: Kongdom | Original post link

Refer to the official operation documentation:

:sweat_smile: I just turned around to discuss a problem, and the first reply is no longer mine. Everyone is too active.

| username: TiDBer_VtkBZH6I | Original post link

The settings were configured according to the documentation.

| username: TiDBer_VtkBZH6I | Original post link

The online environment installation has been completed, now it needs to be changed to an offline image.

| username: Kongdom | Original post link

This is another SOP, let me check.

| username: Kongdom | Original post link

The signature has expired, and it has nothing to do with the offline image.

| username: TiDBer_VtkBZH6I | Original post link

No manifests found under tiup

| username: 裤衩儿飞上天 | Original post link

  1. tiup cluster list lists the clusters you have created, and this command does not require an internet connection.
  2. If you simply want to change the mirror, just use tiup set mirror, there is no need to reinstall tiup.
  3. What exactly is the requirement that needs internet access?
| username: Kongdom | Original post link

By doing this, reinstalling should solve the problem.

| username: TiDBer_VtkBZH6I | Original post link

Downloaded from the official website, tiup mirror clone tidb-community-server-v5.0.0-linux-x86_64 v5.0.0 --os=linux --arch=x86_64.

| username: Kongdom | Original post link

It has nothing to do with the mirror. Even if it is still an online mirror now, this error would still occur. This is because the signature has expired due to long periods of inactivity.

| username: Kongdom | Original post link

Some time ago, many people encountered this problem, so my cousin made a special collection for it.
https://asktug.com/t/topic/93856

| username: TiDBer_VtkBZH6I | Original post link

Still using it today.

| username: Kongdom | Original post link

:sweat_smile: But judging from the error, it should be this issue. Try reinstalling tiup in a different directory. Just reinstall tiup, not the TiDB cluster, and don’t delete the original tiup directory. After reinstalling, still use the original tiup to manage the cluster. The reinstallation is just to reacquire the signature.

| username: TiDBer_VtkBZH6I | Original post link

Every time I perform an operation, why is it always checking for updates for the component cluster?

| username: 裤衩儿飞上天 | Original post link

This is for checking the component version. If it’s not the latest, it will inform you of the latest version, but it won’t affect your use of the current version. If tiup mirror is set to offline, this action will still occur.

| username: TiDBer_VtkBZH6I | Original post link

Problem solved. I re-downloaded the offline package from the official website and reset it, and it worked normally. The first downloaded package probably had issues and was missing many components.

| username: 裤衩儿飞上天 | Original post link

:+1::+1::+1:

| username: TiDBer_VtkBZH6I | Original post link

The default value of tidb_distsql_scan_concurrency is 15. You can adjust it according to your own needs.