salt出錯Job for salt-master.service failed because the control process exited with error code.,

來源:互聯網
上載者:User

salt出錯Job for salt-master.service failed because the control process exited with error code.,
問題

&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: [ErrnoMar 09 16:13:34 ubuntu salt-master[2408]: The salt master is shutdown. The ports are not available to bindMar 09 16:13:34 ubuntu systemd[1]: salt-master.service: Main process exited, code=exited, status=4/NOPERMISSIOMar 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 -xeMar 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 bindMar 09 15:41:46 ubuntu systemd[1]: salt-master.service: Main process exited, code=exited, status=4/NOPERMISSIONMar 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中,不說了,哭暈在廁所,嗚嗚嗚~~

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.