Uyuni服务器Salt Minion连接失败问题排查求助
Uyuni服务器与Salt客户端连接失败排查求助
尝试通过Salt将Uyuni服务器(单台Salt Master)与客户端建立连接,Salt Master与Minion版本一致,但连接失败。以下是配置文件及调试日志:
配置文件(/etc/salt/minion.d/uyuni.conf)
master: host.name.com grains: susemanager: activation_key: "key" server_id_use_crc: adler32 enable_legacy_startup_events: False enable_fqdns_grains: False
salt-minion -l debug 输出
[DEBUG ] Reading configuration from /etc/salt/minion [DEBUG ] Including configuration from '/etc/salt/minion.d/uyuni.conf' [DEBUG ] Reading configuration from /etc/salt/minion.d/uyuni.conf [DEBUG ] Using cached minion ID from /etc/salt/minion_id: host.name.com [WARNING ] Insecure logging configuration detected! Sensitive data may be logged. [DEBUG ] Configuration file path: /etc/salt/minion [INFO ] Setting up the Salt Minion " host.name.com " [INFO ] An instance is already running. Exiting the Salt Minion [INFO ] Shutting down the Salt Minion The Salt Minion is shutdown.
systemctl status salt-minion 输出
● salt-minion.service - The Salt Minion Loaded: loaded (/usr/lib/systemd/system/salt-minion.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2023-07-03 09:11:51 CEST; 14h ago Main PID: 33166 (salt-minion) Tasks: 3 CGroup: /system.slice/salt-minion.service ├─31676 /usr/bin/python3 /usr/bin/salt-minion └─31681 /usr/bin/python3 /usr/bin/salt-minion [ERROR ] Error while bringing up minion for multi-master. Is master at host.name.com > Error while bringing up minion for multi-master. Is master at host.name.com > salt-minion[ERROR ][31681] Error while bringing up minion for multi-master. Is master at host.name.com responding? salt-minion[ERROR ][31686] Minion unable to successfully connect to a Salt Master.
salt-call -l debug state.apply 输出
[DEBUG ] Reading configuration from /etc/salt/minion [DEBUG ] Including configuration from '/etc/salt/minion.d/uyuni.conf' [DEBUG ] Reading configuration from /etc/salt/minion.d/uyuni.conf [DEBUG ] Using cached minion ID from /etc/salt/minion_id: host.name.com [WARNING ] Insecure logging configuration detected! Sensitive data may be logged. [DEBUG ] Configuration file path: /etc/salt/minion [DEBUG ] Grains refresh requested. Refreshing grains. [DEBUG ] Reading configuration from /etc/salt/minion [DEBUG ] Including configuration from '/etc/salt/minion.d/uyuni.conf' [DEBUG ] Reading configuration from /etc/salt/minion.d/uyuni.conf [DEBUG ] The functions from module 'core' are being loaded by dir() on the loaded module [DEBUG ] The functions from module 'disks' are being loaded by dir() on the loaded module [DEBUG ] The functions from module 'extra' are being loaded by dir() on the loaded module [DEBUG ] The functions from module 'lvm' are being loaded by dir() on the loaded module [DEBUG ] The functions from module 'mdadm' are being loaded by dir() on the loaded module [DEBUG ] The functions from module 'minion_process' are being loaded by dir() on the loaded module [DEBUG ] The functions from module 'opts' are being loaded by dir() on the loaded module [DEBUG ] Override __utils__: <module 'salt.loaded.int.grains.zfs' from '/usr/lib/python3.6/site-packages/salt/grains/zfs.py'> [DEBUG ] The functions from module 'zfs' are being loaded by dir() on the loaded module [DEBUG ] The functions from module 'zfs' are being loaded by dir() on the loaded module [DEBUG ] LazyLoaded zfs.is_supported [DEBUG ] Connecting to master. Attempt 1 of 1 [DEBUG ] Master URI: tcp://111.111.111:4506 [DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'host.name.com, 'tcp:// 111.111.111:4506') [DEBUG ] Generated random reconnect delay between '1000ms' and '11000ms' (4460) [DEBUG ] Setting zmq_reconnect_ivl to '4460ms' [DEBUG ] Setting zmq_reconnect_ivl_max to '11000ms' [DEBUG ] salt.crypt.get_rsa_key: Loading private key [DEBUG ] salt.crypt._get_key_with_evict: Loading private key [DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem [DEBUG ] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_fcss67juz4_pub.ipc [DEBUG ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_ fcss67juz4_pull.ipc [DEBUG ] salt.crypt.get_rsa_pub_key: Loading public key [DEBUG ] Closing AsyncReqChannel instance Unable to sign_in to master: Attempt to authenticate with the salt master failed with timeout error
排查建议
- 网络连通性检查:在Minion端执行
nc -zv 111.111.111 4506和nc -zv 111.111.111 4505,确认Salt Master的4505/4506端口是否可访问。 - DNS解析验证:执行
nslookup host.name.com,确认Minion能正确解析Master的域名到IP 111.111.111。 - Minion进程清理:从日志看已有Minion进程运行但状态异常,执行
pkill salt-minion后重启服务systemctl restart salt-minion,避免进程冲突。 - 密钥检查:确认Master端已接受Minion的密钥,在Master执行
salt-key -L查看;若未接受,执行salt-key -a host.name.com。 - 防火墙规则:检查Master和Minion端的防火墙/iptables规则,确保4505、4506端口的TCP流量被允许。
- 配置语法修正:Uyuni配置中的
grains:susemanager层级缩进错误,正确格式应为:
缩进错误可能导致激活密钥未被正确加载,影响Uyuni侧的认证。grains: susemanager: activation_key: "key"
内容的提问来源于stack exchange,提问作者Alexis
相关产品推荐
相关产品推荐

