salt出错Job for salt-master.service failed because the control process exited with error code.
2018-03-09 16:35
1516 查看
问题
&emsap; 在虚拟机上使用salt的时候,因为一边看文档一边学习,突然之前salt就用不了了,然后ps aux | grep salt
&emsap; 发现salt-maste和salt-minion都在,准备重启一下salt-master服务试试:
sudo service salt-master restart
但是提示报错:
Job for salt-master.service failed because the control process exited with error code. See "systemctl status salt-master.service" and "journalctl -xe" for details.
使用提示的命令看出错信息:
root@ubuntu:/home/nick# systemctl status salt-master.service ● salt-master.service - The Salt Master Server Loaded: loaded (/lib/systemd/system/salt-master.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2018-03-09 16:13:34 CST; 13min ago Docs: man:salt-master(1) file:///usr/share/doc/salt/html/contents.html https://docs.saltstack.com/en/latest/contents.html Process: 2408 ExecStart=/usr/bin/salt-master (code=exited, status=4) Main PID: 2408 (code=exited, status=4) Mar 09 16:13:33 ubuntu systemd[1]: Stopped The Salt Master Server. Mar 09 16:13:33 ubuntu systemd[1]: Starting The Salt Master Server... Mar 09 16:13:34 ubuntu salt-master[2408]: [WARNING ] Unable to bind socket 192.168.164.134:4505, error: [Errno Mar 09 16:13:34 ubuntu salt-master[2408]: The salt master is shutdown. The ports are not available to bind Mar 09 16:13:34 ubuntu systemd[1]: salt-master.service: Main process exited, code=exited, status=4/NOPERMISSIO Mar 09 16:13:34 ubuntu systemd[1]: Failed to start The Salt Master Server. Mar 09 16:13:34 ubuntu systemd[1]: salt-master.service: Unit entered failed state. Mar 09 16:13:34 ubuntu systemd[1]: salt-master.service: Failed with result 'exit-code'. //以及 root@ubuntu:/home/nick# journalctl -xe Mar 09 15:41:45 ubuntu systemd[1]: Stopped The Salt Master Server. -- Subject: salt-master.service 单元已结束停止操作 -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- salt-master.service 单元已结束停止操作。 Mar 09 15:41:45 ubuntu systemd[1]: Starting The Salt Master Server... -- Subject: salt-master.service 单元已开始启动 -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- salt-master.service 单元已开始启动。 Mar 09 15:41:45 ubuntu salt-master[2862]: [WARNING ] Unable to bind socket 192.168.164.134:4507, error: [Errno 99] Cannot assign requested address; Is there another salt-master running? Mar 09 15:41:46 ubuntu salt-master[2862]: The salt master is shutdown. The ports are not available to bind Mar 09 15:41:46 ubuntu systemd[1]: salt-master.service: Main process exited, code=exited, status=4/NOPERMISSION Mar 09 15:41:46 ubuntu systemd[1]: Failed to start The Salt Master Server. -- Subject: salt-master.service 单元已失败 -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- salt-master.service 单元已失败。 -- -- 结果为“failed”。 Mar 09 15:41:46 ubuntu systemd[1]: salt-master.service: Unit entered failed state. Mar 09 15:41:46 ubuntu systemd[1]: salt-master.service: Failed with result 'exit-code'.
根据提示,显示无法绑定4505(安装salt时默认使用4505端口,可以再/etc/salt/master中修改)端口,然后使用
netstat -lnput
查看端口号,发现并没有进程占用4505端口,然后去网上找了好多方法——无果。
最终发现自己IP变了,因为用的虚拟机,IP他就突兀的变了,不给我一点点防备。
在/etc/salt/master中修改完IP就好了(因为之前为了其他服务的正常运行,我将默认的0:0:0:0改成了虚拟机的IP,所以虚拟机IP改变之后就无法成功运行)。
告诫大家,如果在虚拟机上学习使用salt,没有别的要求的话别动master里面的IP设置
半小时后更新:
记得改minion里面的IP,同样在
/etc/salt/minion中,不说了,哭晕在厕所,呜呜呜~~
相关文章推荐
- Job for php-fpm.service failed because the control process exited with error code. See "systemctl st
- Job for nginx.service failed because the control process exited with error code. See "systemctl stat
- Jenkins 安装启动提示“iJob for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.”
- 解决Job for docker.service failed because the control process exited with error code. See "systemctl s
- Dockers Job for docker.service failed because the control process exited with error code
- Job for vsftpd.service failed because the control process exited with error code. See "systemctl sta
- Centos 7不能上网,Job for iptables.service failed because the control process exited with error code.
- 重启网卡报Job for network.service failed because the control process exited with error code.。。 错误
- Job for postfix.service failed because the control process exited with error code. See "systemctl st
- 关于nginx的Job for nginx.service failed because the control process exited with error code.错误
- Job for vsftpd.service failed because the control process exited with error code
- mysql.service failed because the control process exited with error code问题
- Job for tomcat.service failed because the control process exited with error code 解决办法:
- centos出现这个错误:Job for sshd.service failed because the control process exited with error code.
- CentOS7启动SSH服务报:Job for ssh.service failed because the control process exited with error code.......
- Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
- Centos 7不能上网,Job for iptables.service failed because the control process exited with error code.
- 解决Docker启动服务器链接失败-Job for docker.service failed because the control process exited error code
- OpenStack常见错误:无法开启http服务 Job for httpd.service failed because the control process exited with error
- gitlab搭建提示inet_interfacesJob for postfix.service failed because the control process exited with erro