saltstack master无法收到minion-luojing
遇到的问题如下:root@Saltstack:/etc/salt# salt-key -L
Accepted Keys:
Unaccepted Keys:
Rejected Keys:
root@Saltstack:/etc/salt# salt-master -l debug
Reading configuration from /etc/salt/master
Using cached minion> Configuration file path: /etc/salt/master
Setting up the Salt Master
Unable to bind socket, error: Cannot assign requested address
The ports are not available to bind
root@Saltstack:/etc/salt# salt-minion -l debug
Reading configuration from /etc/salt/minion
Using cached minion> Configuration file path: /etc/salt/minion
Setting up the Salt Minion "Saltstack.cs2cloud.internal"
Created pidfile: /var/run/salt-minion.pid
Reading configuration from /etc/salt/minion
Attempting to authenticate with the Salt Master at 192.168.101.26
Loaded minion key: /etc/salt/pki/minion/minion.pem
Attempt to authenticate with the salt master failed
解决方法:
1,minion 无法认证 master, 查看minion 和master 配置问题,没有问题.
注:
2,minion , master 之间可以ping 通。本身在一台机器上。
3,从另一个minion进行测试。到60秒没有反馈。
4,根据这个提示
Unable to bind socket, error: 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 根据这个提示
Unable to bind socket, error: 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网络的问题分解。
页:
[1]