pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
37.11k stars 5.83k forks source link

Could not find the requested service pump-8250.service: host #9597

Closed Wythetells closed 5 years ago

Wythetells commented 5 years ago

Hi ~ I need help!

I want Deploy and start a TiDB cluster with a Pump component and use Method 1 : Adding a Pump component to an existing TiDB cluster requires step-by-step steps as follows.

but there have a error when i start pump

ansible-playbook start.yml --tags=pump

err info:

···
PLAY [tikv_servers] *********************************************************************************************************************************************************************

PLAY [pump_servers] *********************************************************************************************************************************************************************

TASK [start pump by supervise] **********************************************************************************************************************************************************

TASK [start pump by systemd] ************************************************************************************************************************************************************
fatal: [pump1]: FAILED! => {"changed": false, "msg": "Could not find the requested service pump-8250.service: host"}
        to retry, use: --limit @/home/tidb/tidb-ansible/retry_files/start.retry

PLAY RECAP ******************************************************************************************************************************************************************************
10.92.6.59                 : ok=3    changed=0    unreachable=0    failed=0   
10.92.6.66                 : ok=3    changed=0    unreachable=0    failed=0   
10.92.6.67                 : ok=3    changed=0    unreachable=0    failed=0   
10.92.6.68                 : ok=3    changed=0    unreachable=0    failed=0   
localhost                  : ok=1    changed=0    unreachable=0    failed=0   
pump1                      : ok=3    changed=0    unreachable=0    failed=1   

ERROR MESSAGE SUMMARY *******************************************************************************************************************************************************************
[pump1]: Ansible FAILED! => playbook: start.yml; TASK: start pump by systemd; message: {"changed": false, "msg": "Could not find the requested service pump-8250.service: host"}
Ask for help:
Contact us: support@pingcap.com
It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We'll try our best to help you deploy a TiDB cluster. Thanks. :-)

and I checked iptables,the port 8250 in open

[tidb@tidb-tipddb01-10-92-6-68 tidb-ansible]$ sudo iptables-save
# Generated by iptables-save v1.4.21 on Thu Mar  7 17:19:03 2019
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [14836475815:246422039279489]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 10050 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 4000 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 10080 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2379 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2380 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8249 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8250 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 9090 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 9091 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 9100 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 9115 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3000 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8686 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 9308 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Thu Mar  7 17:19:03 2019 

and now,what should I do

WangXiangUSTC commented 5 years ago

can you provide your inventory.ini file? you can remove some sensitive information @Wythetells

Wythetells commented 5 years ago

@WangXiangUSTC Think you~ OK,that is my inventory.ini file

ansible-playbook deploy.yml -l 10.92.6.68 ansible-playbook start.yml --tags=pump

## TiDB Cluster Part
[tidb_servers]
10.92.6.68

[tikv_servers]
10.92.6.59
10.92.6.66
10.92.6.67

[pd_servers]
10.92.6.68

[spark_master]

[spark_slaves]

[lightning_server]

[importer_server]

## Monitoring Part
# prometheus and pushgateway servers
[monitoring_servers]
10.92.6.68

[grafana_servers]
10.92.6.68

# node_exporter and blackbox_exporter servers
[monitored_servers]
10.92.6.59
10.92.6.66
10.92.6.67
10.92.6.68

[alertmanager_servers]
10.92.6.68

[kafka_exporter_servers]

## Binlog Part
[pump_servers]
pump1 ansible_host=10.92.6.68 deploy_dir=/tidb/binlog/

[drainer_servers]
#drainer_mysql ansible_host=10.92.6.68 initial_commit_ts="405787959649894401"

## Group variables
[pd_servers:vars]
# location_labels = ["zone","rack","host"]

## Global variables
[all:vars]
deploy_dir = /tidb/deploy

## Connection
# ssh via normal user
ansible_user = tidb

cluster_name = Bytedance-cluster

tidb_version = v2.1.2

# process supervision, [systemd, supervise]
process_supervision = systemd

timezone = Asia/Shanghai

enable_firewalld = False
# check NTP service
enable_ntpd = True
set_hostname = False

## binlog trigger
enable_binlog = True

# kafka cluster address for monitoring, example:
# kafka_addrs = "192.168.0.11:9092,192.168.0.12:9092,192.168.0.13:9092"
kafka_addrs = ""

# zookeeper address of kafka cluster for monitoring, example:
# zookeeper_addrs = "192.168.0.11:2181,192.168.0.12:2181,192.168.0.13:2181"
zookeeper_addrs = ""

# store slow query log into seperate file
enable_slow_query_log = False

# enable TLS authentication in the TiDB cluster
enable_tls = False

# KV mode
deploy_without_tidb = False

# Optional: Set if you already have a alertmanager server.
# Format: alertmanager_host:alertmanager_port
alertmanager_target = ""

grafana_admin_user = "admin"
grafana_admin_password = "**"

### Collect diagnosis
collect_log_recent_hours = 2

enable_bandwidth_limit = True
# default: 10Mb/s, unit: Kbit/s
collect_bandwidth_limit = 10000

and i find this dir /tidb/deploy/bin have not pump,I don't know if that is true.

[tidb@tidb-tipddb01-10-92-6-68 bin]$ ls
alertmanager  blackbox_exporter  grafana_collector  node_exporter  pd-server  prometheus  pushgateway  tidb-server
liubo0127 commented 5 years ago

ansible-playbook deploy.yml -l 10.92.6.68 should be changed to ansible-playbook deploy.yml -l pump1

Wythetells commented 5 years ago

ansible-playbook deploy.yml -l 10.92.6.68 should be changed to ansible-playbook deploy.yml -l pump1

Thank you very much! Congrats! All goes well. :-)