diff --git a/lib/cli.py b/lib/cli.py
index 2a70aefc386ed156880d6f54376948c6cc1a351b..879fe9b8ed39f8e176da63f82b00c69dea2cc5a2 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -539,7 +539,7 @@ def FormatError(err):
     obuf.write("Unhandled Ganeti error: %s" % msg)
   elif isinstance(err, luxi.NoMasterError):
     obuf.write("Cannot communicate with the master daemon.\nIs it running"
-               " and listening on '%s'?" % err.args[0])
+               " and listening for connections?")
   elif isinstance(err, luxi.TimeoutError):
     obuf.write("Timeout while talking to the master daemon. Error:\n"
                "%s" % msg)
diff --git a/lib/luxi.py b/lib/luxi.py
index 2faa8e8293a581e9138ac33dee4e577dbcbe809b..5c48dd56e9e80fed6d906da395b3c52228432b64 100644
--- a/lib/luxi.py
+++ b/lib/luxi.py
@@ -154,7 +154,7 @@ class Transport:
       except socket.timeout, err:
         raise TimeoutError("Connect timed out: %s" % str(err))
       except socket.error, err:
-        if err.args[0] == errno.ENOENT:
+        if err.args[0] in (errno.ENOENT, errno.ECONNREFUSED):
           raise NoMasterError((address,))
         raise
       self.socket.settimeout(self._rwtimeout)