Questions about Installing TiUniManager

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

Original topic: TiUniManager安装的疑惑

| username: TiDBer_o0MXVuK4

First of all, let me explain that I am deploying offline.

During the installation process, I referred to the official documentation, which suggested that I should deploy TiUP first and then deploy TiUniManager. However, TiUP has its own mirror, and TiUniManager also has its own mirror, so I have to keep switching between them.

After I deployed TiUniManager, the host status always showed as abnormal when importing the host. The log error is as follows:
{“Em-X-Trace-Id”:“tBj7zZHzTBC5-B7brX6Xpg”,“level”:“info”,“msg”:"workflow VPfZGDrcS-ijQgjrfALIew of bizId FkEJr-cTSYewYvXvAmzMHw do node prepare failed, [30129]host is not expected as import file\tcall deployment serv to apply host tikv01.prod.dc.dcits.com 10.0.42.210 [
global:
user: hadoop
group: hadoop
ssh_port: 22
arch: amd64


tikv_servers:
\

  • host: 10.0.42.210
    data_dir: /data1/tikv_data
    deploy_dir: /data1/tikv_deploy
    port: 12000
    status_port: 13000



    ] failed, exit status 1.
    detail info: Please check for root manifest file, you may download one from the repository mirror, or try tiup mirror set to force reset it.
    Error: initial repository from mirror(https://tiup-mirrors.pingcap.com/) failed: error loading manifest root.json: open /home/hadoop/.tiup/bin/root.json: no such file or directory

    ",“time”:“2022-09-01T17:38:24+08:00”}

Based on the above information, I switched back to TiUP’s mirror but still got this error, and I can’t solve it no matter what.

| username: gary | Original post link

Check whether the mirror is set correctly by running the following commands:

TIUP_HOME=/home/tidb/.tiup tiup mirror show
TIUP_HOME=/home/tidb/em tiup mirror show
| username: TiDBer_o0MXVuK4 | Original post link

There is no problem with this. I have deployed it no less than 20 times, and every time I import the host, it reports an error, making me feel like dying. So I suspect that I might have made a mistake from the very beginning. When I first deployed TiUniManager, according to the official documentation, there was a step to import the TiDB Server offline image package, but it kept reporting an error:

Error: missing owner keys for owner pingcap on component pd

I have no solution. I tried to merge the mirrors of TiUniManager and tidb-server myself, which is definitely problematic since many package versions on both sides are different. I don’t know how to solve this; the official documentation is practically useless.

| username: TiDBer_o0MXVuK4 | Original post link

Another question, does it have to be under the tidb user? Can it be installed under other users?

| username: gary | Original post link

Encountering errors when importing a host? Please post the error details.
You can import a host through Cluster Management → Create New Cluster → Import Host, which can avoid many unnecessary host-related checks.
You can refer to [专栏 - TiUniManager部署和使用感受 | TiDB 社区]

| username: TiDBer_o0MXVuK4 | Original post link

I encountered errors when importing hosts. I resolved them one by one, but in the end, the asynchronous join to the cluster was still unsuccessful.

I still suspect there is an issue with the mirror. The mirror for tidb-server is not merging properly. Currently, I have two directories and switch between them as needed.

| username: TiDBer_o0MXVuK4 | Original post link

The document you posted: 9. Import TiDB Server offline image package
Import error: Error: missing owner keys for owner pingcap on component pd

| username: gary | Original post link

Try this:

su - tidb
cp -r /data/tidb-enterprise-server-v6.1.0-linux-amd64/keys /home/tidb/.tiup/
TIUP_HOME=/home/tidb/.tiup tiup mirror merge tidb-enterprise-server-v6.1.0-linux-amd64
| username: TiDBer_o0MXVuK4 | Original post link

I copied it. I followed your instructions: Cluster Management → Create Cluster → Import Host, and now a new error is reported:
[30130] install filebeat on host failed precheck join em cluster em-prod failed, exit status 1.
detail info: tiup is checking updates for component em …
A new version of em is available:
The latest version: v1.0.2
Local installed version:
Update current component: tiup update em
Update all components: tiup update --all

The component em version is not installed; downloading from repository.
Starting component em: /home/hadoop/.em/components/em/v1.0.2/tiup-em /home/hadoop/.em/components/em/v1.0.2/tiup-em display em-prod --json --wait-timeout 360 --yes

Error: em cluster em-prod not exists

Verbose debug logs have been written to /home/hadoop/.em/logs/tiup-cluster-debug-2022-09-05-18-06-29.log.

But this cluster definitely exists. After I deployed TiUniManager, I created the cluster em-prod, otherwise, how could there be subsequent operations?

| username: gary | Original post link

Is it normal to check the status of the EM cluster components using the display command?

| username: TiDBer_o0MXVuK4 | Original post link

Normal.

| username: TiDBer_o0MXVuK4 | Original post link

It’s useless, the same error.

| username: TiDBer_o0MXVuK4 | Original post link

I have encountered the same problem. After upgrading to 5.4.0, the monitoring data is missing.

| username: gary | Original post link

What do these two show commands display?

| username: gary | Original post link

If the mirror is incorrect, try setting it again:
TIUP_HOME=/home/tidb/.tiup tiup mirror set tidb-enterprise-server-v6.1.0-linux-amd64

| username: TiDBer_o0MXVuK4 | Original post link

The link you provided appears to be an image. Please provide the text content you would like translated.

| username: gary | Original post link

Your mirror setting is incorrect. Use this command to change your mirror: TIUP_HOME=/home/tidb/.tiup tiup mirror set tidb-enterprise-server-v6.1.0-linux-amd64 and then try importing the host again to see if the issue still occurs.

| username: TiDBer_o0MXVuK4 | Original post link

I changed it as shown in the picture below, but the same error is still reported (I followed your instructions – importing hosts can be done through Cluster Management → Take Over Cluster → Import Hosts, which can avoid many unnecessary host-related checks. However, there is no import host operation in the new cluster, so I can only choose to take over the cluster to import hosts. It always feels wrong; I don’t even have a cluster, so how can I take over?):

| username: TiDBer_o0MXVuK4 | Original post link

The current situation is:

  1. I can deploy tiunimanager in ten minutes, but I can’t merge the merror of tidb-server.
  2. Because of the issue in point 1, I can only set merror separately. TIUP_HOME has two directories: .tiup and .em. There are two merrors, and when combined, the situation is so concentrated that I get errors when importing hosts.
  3. There are two ways to import hosts:
    a. Importing hosts in resource management keeps encountering errors, which I resolve one by one, but at the last step, it says the cluster cannot be found, which is the error I mentioned earlier.
    b. Cluster management - Take over cluster - Import host (I really couldn’t find the option to create a new cluster and then import hosts), and similarly, at the last step, the cluster cannot be found.

I’ve been stuck for 4 days and am basically on the verge of collapse.

My environment:

  1. CentOS 7.5 64-bit
  2. TiDB 6.1.0
  3. Tiunimanager 1.0.2
| username: TiDBer_o0MXVuK4 | Original post link

Regarding the official documentation’s mention of merging tidb-server’s merror, I have always had doubts. The versions of several packages in these two offline installation packages are different, but for now, I am unable to merge them.