Book Image

Salt Cookbook

By : Anirban Saha
Book Image

Salt Cookbook

By: Anirban Saha

Overview of this book

Table of Contents (18 chapters)
Salt Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Connectivity, DNS, and ports


In this recipe, you will learn about the network and network-service-related problems, which can affect both master and minions in Salt.

How to do it...

  1. When communication between the Salt master and the minion fails, the log file on the minion tells us about the suspected problem:

    2015-02-20 03:46:32,765 [salt.utils       ][ERROR   ] DNS lookup of 'salt-master' failed.
    2015-02-20 03:46:32,765 [salt.minion      ][ERROR   ] Master hostname: 'salt-master' not found. Retrying in 30 seconds
    
  2. Try to reach the Salt master:

    [root@salt-minion ~]# ping salt-master
    ping: unknown host salt-master
    
  3. Add a DNS entry for the Salt master. If it is already present, check the /etc/resolv.conf file to see if the DNS servers are properly set. Also, the problem can be solved with an entry in the /etc/hosts file as follows:

    192.168.0.2 salt-master
    
  4. If the Salt server is reachable, check the ports on the server as to whether or not they are up and listening:

    [root@salt-master ~]# netstat...