我正在尝试将 salt-minion 连接到 Salt Master。但是它不起作用。错误在哪里?有什么问题?
从主服务器 ping 到从服务器有效,反之亦然
以下是日志:
**
Minion 日志:
**
数控-V-Z 176.111.111 4505
nc: connect to 176.111.111 port 4505 (tcp) failed: No route to host
salt-minion-l 调试
[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: test.com
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[DEBUG ] Configuration file path: /etc/salt/minion
[INFO ] Setting up the Salt Minion " test.com "
[DEBUG ] Marking 'base64_encode' as a jinja filter
[DEBUG ] Marking 'base64_decode' as a jinja filter
[DEBUG ] Marking 'md5' as a jinja filter
[DEBUG ] Marking 'sha1' as a jinja filter
[DEBUG ] Marking 'sha256' as a jinja filter
[DEBUG ] Marking 'sha512' as a jinja filter
[DEBUG ] Marking 'hmac' as a jinja filter
[DEBUG ] Marking 'hmac_compute' as a jinja filter
[DEBUG ] Created pidfile: /var/run/salt-minion.pid
[INFO ] Starting up the Salt Minion
[DEBUG ] AsyncEventPublisher PUB socket URI: /var/run/salt/minion/minion_event_ga7823F_pub.ipc
[DEBUG ] AsyncEventPublisher PULL socket URI: /var/run/salt/minion/minion_event_ ga7823F _pull.ipc
[INFO ] Starting pull socket on /var/run/salt/minion/minion_event_ ga7823F _pull.ipc
[DEBUG ] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_ ga7823F _pub.ipc
[DEBUG ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_ ga7823F _pull.ipc
[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
[INFO ] Creating minion process manager
[DEBUG ] Process Manager starting!
[DEBUG ] Process Manager starting!
[DEBUG ] Connecting to master. Attempt 1 of 1
[DEBUG ] Master URI: tcp://176.111.111.111:4506
[DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'test.com', 'tcp:// 176.111.111.111:4506')
[DEBUG ] Generated random reconnect delay between '1000ms' and '11000ms' (10564)
[DEBUG ] Setting zmq_reconnect_ivl to '10564ms'
[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_ ga7823F _pub.ipc
[DEBUG ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_ ga7823F _pull.ipc
[DEBUG ] salt.crypt.get_rsa_pub_key: Loading public key
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[DEBUG ] Closing AsyncReqChannel instance
[ERROR ] Error while bringing up minion for multi-master. Is master at 176.111.111.111responding?
[DEBUG ] Connecting to master. Attempt 1 of 1
[DEBUG ] Master URI: tcp:// 176.111.111.111:4506
[DEBUG ] Re-using AsyncAuth for ('/etc/salt/pki/minion', ‚test.com‘, 'tcp:// 176.111.111.111:4506')
[DEBUG ] Generated random reconnect delay between '1000ms' and '11000ms' (9944)
[DEBUG ] Setting zmq_reconnect_ivl to '9944ms'
[DEBUG ] Setting zmq_reconnect_ivl_max to '11000ms'
[DEBUG ] salt.crypt.get_rsa_key: Loading private key
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_ ga7823F _pub.ipc
[DEBUG ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_ ga7823F _pull.ipc
[DEBUG ] salt.crypt.get_rsa_pub_key: Loading public key
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Minion unable to successfully connect to a Salt Master.
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[DEBUG ] Closing AsyncReqChannel instance
[ERROR ] Error while bringing up minion for multi-master. Is master at 176.111.111.111 responding?
[DEBUG ] Connecting to master. Attempt 1 of 1
[DEBUG ] Master URI: tcp:// 176.111.111.111:4506
[DEBUG ] Re-using AsyncAuth for ('/etc/salt/pki/minion', ‚test.com, 'tcp:// 176.111.111.111:4506')
[DEBUG ] Generated random reconnect delay between '1000ms' and '11000ms' (5633)
[DEBUG ] Setting zmq_reconnect_ivl to '7145ms'
[DEBUG ] Setting zmq_reconnect_ivl_max to '11000ms'
[DEBUG ] salt.crypt.get_rsa_key: Loading private key
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_ ga7823F _pub.ipc
[DEBUG ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_ ga7823F _pull.ipc
[DEBUG ] salt.crypt.get_rsa_pub_key: Loading public key
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[DEBUG ] Closing AsyncReqChannel instance
^C[DEBUG ] Closing IPCMessageSubscriber instance
[WARNING ] Minion received a SIGINT. Exiting.
[INFO ] Shutting down the Salt Minion
salt-call -l 调试状态.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: minion.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:// 176.111.111.111:4506
[DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', ‚ ‚minion.com‘, 'tcp:// 176.111.111.111:4506')
[DEBUG ] Generated random reconnect delay between '1000ms' and '11000ms' (1892)
[DEBUG ] Setting zmq_reconnect_ivl to '1892ms'
[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_ ga7823F _pub.ipc
[DEBUG ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_ ga7823F _pull.ipc
[DEBUG ] salt.crypt.get_rsa_pub_key: Loading public key
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
[ERROR ] Failed to send msg SaltReqTimeoutError('Message timed out',)
主服务器上的 4505 和 4506 端口已打开
非常感谢