yunionio / cloudpods

A cloud-native open-source unified multi-cloud and hybrid-cloud platform. 开源、云原生的多云管理及混合云融合平台
https://www.cloudpods.org
Apache License 2.0
2.59k stars 533 forks source link

TASK [primary-master-node : Use ocadm init first master node] #10281

Closed iupi0203 closed 3 years ago

iupi0203 commented 3 years ago

您好,每次运行到这里就报错。请问是什么原因呢。 TASK [primary-master-node : Use ocadm init first master node] **** fatal: [39.97.170.125]: FAILED! => {"changed": true, "cmd": ["/opt/yunion/bin/ocadm", "init", "--mysql-host", "39.97.170.125", "--mysql-user", "root", "--mysql-password", "Litongxi@2", "--control-plane-endpoint", "39.97.170.125:6443", "--onecloud-version", "v3.4.13", "--enable-host-agent"], "delta": "0:02:07.356686", "end": "2021-02-28 13:14:13.247189", "msg": "non-zero return code", "rc": 1, "start": "2021-02-28 13:12:05.890503", "stderr": "error execution phase preflight: [preflight] Some fatal errors occurred:\n\t[ERROR Mysql]: show grants for root@%: dial tcp 39.97.170.125:3306: connect: connection timed out\n[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...", "stderr_lines": ["error execution phase preflight: [preflight] Some fatal errors occurred:", "\t[ERROR Mysql]: show grants for root@%: dial tcp 39.97.170.125:3306: connect: connection timed out", "[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=..."], "stdout": "[init] Using Kubernetes and Onecloud version: v1.15.8 & v3.4.13\n[preflight] Running pre-flight checks", "stdout_lines": ["[init] Using Kubernetes and Onecloud version: v1.15.8 & v3.4.13", "[preflight] Running pre-flight checks"]}

zexi commented 3 years ago

这个问题报错是连接不上数据库:

show grants for root@%: dial tcp 39.97.170.125:3306: connect: connection timed out

ioito commented 3 years ago

不要把明文密码贴出来,注意保护隐私,另外检查下阿里云上的数据库是否有安全设置,3306端口是否开放

zexi commented 3 years ago

/close