saltstack master無法收到minion

遇到的問題如下:

root@Saltstack:/etc/salt# salt-key -L
Accepted Keys:
Unaccepted Keys:
Rejected Keys:


root@Saltstack:/etc/salt# salt-master -l debug
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: Saltstack.cs2cloud.internal
[DEBUG   ] Configuration file path: /etc/salt/master
[INFO    ] Setting up the Salt Master
[WARNING ] Unable to bind socket, error: [Errno 99] Cannot assign requested address
The ports are not available to bind
root@Saltstack:/etc/salt# salt-minion -l debug
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: Saltstack.cs2cloud.internal
[DEBUG   ] Configuration file path: /etc/salt/minion
[INFO    ] Setting up the Salt Minion "Saltstack.cs2cloud.internal"
[DEBUG   ] Created pidfile: /var/run/salt-minion.pid
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Attempting to authenticate with the Salt Master at 192.168.101.26
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[ERROR   ] Attempt to authenticate with the salt master failed


解決方法:

1,minion 無法認證 master, 查看minion 和master 配置問題,沒有問題.

注:

2,minion , master 之間可以ping 通。本身在一臺機器上。

3,從另一個minion進行測試。到60秒沒有反饋。

4,根據這個提示

[WARNING ] Unable to bind socket, error: [Errno 99] Cannot assign requested address
The ports are not available to bind

調整端口數量。還是不好使,說明報錯有問題,不是端口問題。

# echo 16777216 > /proc/sys/net/core/rmem_max
# echo 16777216 > /proc/sys/net/core/wmem_max
# echo "4096 87380 16777216" > /proc/sys/net/ipv4/tcp_rmem
# echo "4096 87380 16777216" > /proc/sys/net/ipv4/tcp_wmem

5 根據這個提示

[WARNING ] Unable to bind socket, error: [Errno 99] Cannot assign requested address
The ports are not available to bind

刪除相關運行內容。

killall -SIGUSR2 salt-master

還是不好使,說明報錯有問題,不是進行服務問題。

6 但是多次表明是ip地址的問題。最後進入python使用以下命令

 #!/usr/bin/python env
import socket
myname = socket.getfqdn(socket.gethostname())
myaddr = socket.gethostbyname(myname)
print"myname= %s"% myname
print"myaddr= %s"% myaddr

反回值的地址,不是我機器地址。是10.10.10.10
而master 和minion配置的是192.168.10.10


ifconfig 查看機器地址爲10.10.10.10 哦~~~~~~~~~~

爲什麼呢?因爲我應用的是cloudstack上的VM,couldstack網絡做了nat .

一會兒再寫一下couldstack網絡的問題分解。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章