Error Deploying Cluster

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

Original topic: 部署集群报错

| username: 孤君888

【TiDB Environment】Production
【TiDB Version】v6.1.1
【Encountered Issue】

Error: init config failed: x.x.x.x:9090:add local rule: read local directory /data1/tidbcluster/tidb-deploy/prometheus-8249/prometheus_rule failed: open /data1/tidbcluster/tidb-deploy/prometheus-8249/prometheus_rule: no such file or directory

Do I need to manually create the directory /data1/tidbcluster/tidb-deploy/prometheus-8249/prometheus_rule?

【Reproduction Path】What operations were performed that caused the issue
【Issue Phenomenon and Impact】

| username: 孤君888 | Original post link

Here is my monitoring-related configuration

monitoring_servers:
  - host: x.x.x.x
    ssh_port: 22
    port: 9090
    ng_port: 12020
    deploy_dir: "/data1/tidbcluster/tidb-deploy/prometheus-8249"
    log_dir:    "/data1/tidbcluster/tidb-deploy/prometheus-8249/log"
    rule_dir:   "/data1/tidbcluster/tidb-deploy/prometheus-8249/prometheus_rule"
    data_dir:   "/data1/tidbcluster/tidb-data/prometheus-8249"

grafana_servers:
  - host: x.x.x.x
    port: 3000
    deploy_dir: "/data1/tidbcluster/tidb-deploy/grafana-3000"
    dashboard_dir: "/data1/tidbcluster/tidb-deploy/grafana-3000/dashboards"
    config:
       log.file.level: warning

alertmanager_servers:
  - host: x.x.x.x
    ssh_port: 22
    listen_host: 0.0.0.0
    web_port: 9093
    cluster_port: 9094
    deploy_dir: "/data1/tidbcluster/tidb-deploy/alertmanager-9093"
    log_dir:    "/data1/tidbcluster/tidb-deploy/alertmanager-9093/log"
    data_dir:   "/data1/tidbcluster/tidb-data/alertmanager-9093"
    config_file: "/data1/tidbcluster/tidb-deploy/alertmanager-9093/bin/alertmanager/alertmanager.yml"
| username: xiaohetao | Original post link

  1. What is the user in the YAML configuration file?
  2. The /data1 directory must exist, and the user in the configuration file must be the owner and group of /data1. If the owner of /data1 cannot be changed, then manually create the tidbcluster directory and change its owner and group to the user in the configuration file.
| username: 孤君888 | Original post link

  1. The user in the YAML configuration file is TIDB, and passwordless login has been configured. Permissions and other settings are also normal.
  2. The /data1 directory exists, and the user in the configuration file is the owner and group owner of /data1, which is also the TIDB user.
| username: xiaohetao | Original post link

  1. What about directory permissions? Are they writable and executable?
  2. There are two types of “password-free” as mentioned above:
    1. Each node’s tidb user can use password-free sudo to the root user of that node;
    2. The tidb user on the control machine can log in to the tidb users on all other nodes without a password.
| username: 孤君888 | Original post link

The problem has been solved by using the default simplest monitoring configuration.

| username: system | Original post link

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