我試圖在運行命令時安裝鹽堆棧主人主機名:找不到鹽。在30秒內重試
python C:\ Python27 \ Scripts \ salt-minion -c C:\ salt \ minion -l debug我收到Master主機名:找不到鹽。重試在30秒
我附上我的錯誤報告,請找到它
C:\salt>python C:\Python27\Scripts\salt-minion -c C:\salt\minion -l debug
WARNING: 'C:\\salt\\minion' directory does not exist.
[DEBUG ] Missing configuration file: C:\salt\minion\minion
[DEBUG ] Guessing ID. The id can be explicitly in set c:\salt\conf\minion
[INFO ] Found minion id from get_fqhostname(): HoroppaLabs
[ERROR ] Could not cache minion ID: [Errno 2] No such file or directory: 'c:\\
salt\\conf\\minion_id'
[DEBUG ] Configuration file path: c:\salt\conf\minion
[WARNING ] Failed to open log file, do you have permission to write to c:\salt\v
ar\log\salt\minion?
[INFO ] Setting up the Salt Minion "HoroppaLabs"
[DEBUG ] Created pidfile: c:\salt\var\run\salt-minion.pid
[WARNING ] You have a version of ZMQ less than ZMQ 3.2! There are known connecti
on keep-alive issues with ZMQ < 3.2 which may result in loss of contact with min
ions. Please upgrade your ZMQ!
[DEBUG ] Missing configuration file: c:\salt\conf\minion
[ERROR ] Unable to import Python wmi module, some core grains will be missing
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 50, in <module>
import wmi
ImportError: No module named wmi
[CRITICAL] Failed to load grains defined in grain file core.hwaddr_interfaces in
function <function hwaddr_interfaces at 0x00000000037AA048>, error:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\loader.py", line 1127, in gen_grains
ret = fun()
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 1180, in hwaddr
_interfaces
ifaces = salt.utils.network.interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 449, in inter
faces
return win_interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 402, in win_i
nterfaces
with salt.utils.winapi.Com():
AttributeError: 'module' object has no attribute 'winapi'
[CRITICAL] Failed to load grains defined in grain file core.ip6 in function <fun
ction ip6 at 0x00000000037A5EB8>, error:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\loader.py", line 1127, in gen_grains
ret = fun()
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 1129, in ip6
return {'ipv6': salt.utils.network.ip_addrs6(include_loopback=True)}
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 577, in ip_ad
drs6
ifaces = interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 449, in inter
faces
return win_interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 402, in win_i
nterfaces
with salt.utils.winapi.Com():
AttributeError: 'module' object has no attribute 'winapi'
[CRITICAL] Failed to load grains defined in grain file core.ip4 in function <fun
ction ip4 at 0x00000000037A5DD8>, error:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\loader.py", line 1127, in gen_grains
ret = fun()
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 1102, in ip4
return {'ipv4': salt.utils.network.ip_addrs(include_loopback=True)}
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 546, in ip_ad
drs
ifaces = interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 449, in inter
faces
return win_interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 402, in win_i
nterfaces
with salt.utils.winapi.Com():
AttributeError: 'module' object has no attribute 'winapi'
[CRITICAL] Failed to load grains defined in grain file core.ip_interfaces in fun
ction <function ip_interfaces at 0x00000000037A5F98>, error:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\loader.py", line 1127, in gen_grains
ret = fun()
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 1159, in ip_int
erfaces
ifaces = salt.utils.network.interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 449, in inter
faces
return win_interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 402, in win_i
nterfaces
with salt.utils.winapi.Com():
AttributeError: 'module' object has no attribute 'winapi'
[ERROR ] This master address: 'salt' was previously resolvable but now fails t
o resolve! The previously resolved ip addr will continue to be used
[WARNING ] Master hostname: salt not found. Retrying in 30 seconds
你有很多問題,包括缺少wmi python模塊,舊版本的zeromq,以及由於某種原因無法寫入日誌文件。關於你提到的錯誤,在默認情況下salt-minion會查找與salt-master匹配salt的dns條目。在這種情況下,它看起來並不像您的域中有鹽項,因此它不能聯繫salt-master。你可以通過在windows的salt-minion配置文件中改變salt master的位置來改變它。 –