Starting salt-master on Vagrant: [Errno 98]

1.6k views Asked by At

Trying to run salt-master on Vagrant running Ubuntu,

no edits to /etc/salt/master

I get:

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

My 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
2

There are 2 answers

0
Utah_Dave On

The error you got there:

[WARNING ] Unable to bind socket, error: [Errno 98] Address already in use
The ports are not available to bind

is indicating that the salt-master daemon is already running. That's why when you're executing sudo salt-master -l all it's failing.

If you want to run the salt-master in the foreground in your terminal like in your example, then stop the salt-master daemon first like this:

sudo service salt-master stop

Then you can start it up like you wanted to:

sudo salt-master -l all
0
John Elliot V On

I'm on Ubuntu 16.04 LTS. I'm running salt-master 2015.8.8 (Beryllium). Neither service salt-master stop or service salt-master restart work for me. The existing salt master process continues to run and holds the port open blocking a new instance from starting. In order to restart the salt master I need to:

pkill salt-master;
service salt-master start;