尝试在salt-master
Vagrant
上运行Ubuntu
,
没有对/etc/salt/master
进行修改
我明白了:
vagrant@markvagrant:/etc/salt$ sudo salt-master -l all
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Configuration file path: /etc/salt/master
[TRACE ] Trying pysss.getgrouplist for 'root'
[TRACE ] Trying generic group list for 'root'
[TRACE ] Group list for user 'root': []
[INFO ] Setting up the Salt Master
[WARNING ] Unable to bind socket, error: [Errno 98] Address already in use
The ports are not available to bind
我的Vagrantfile:
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.2.2"
config.vm.network "public_network"
config.vm.hostname = "markvagrant"
config.vm.synced_folder "./data", "/vagrant_data"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
end
答案 0 :(得分:0)
你遇到的错误:
[WARNING ] Unable to bind socket, error: [Errno 98] Address already in use
The ports are not available to bind
表示salt-master守护程序已在运行。这就是为什么当你执行sudo salt-master -l all
它失败时。
如果你想在终端中的前台运行salt-master,就像在你的例子中一样,那么首先像这样停止salt-master守护进程:
sudo service salt-master stop
然后你可以像你想的那样启动它:
sudo salt-master -l all
答案 1 :(得分:0)
我在使用Ubuntu 16.04 LTS。我正在运行盐大师2015.8.8(铍)。 service salt-master stop
或service salt-master restart
都不适合我。现有的salt主进程继续运行并保持端口打开,阻止新实例启动。为了重新启动salt master,我需要:
pkill salt-master;
service salt-master start;