diff --git a/certmaster/utils.py b/certmaster/utils.py
index 6b79ce7..e72f47c 100644
--- a/certmaster/utils.py
+++ b/certmaster/utils.py
@@ -166,14 +166,19 @@ def create_minion_keys(hostname=None):
         raise codes.CMException, "Could not create local keypair or csr for session"
 
     result = False
-   
+
+    try_count = 0
     while not result:
         try:
             # print "DEBUG: submitting CSR to certmaster: %s" % master_uri
             log.debug("submitting CSR: %s  to certmaster %s" % (csr_file, master_uri))
             result, cert_string, ca_cert_string = submit_csr_to_master(csr_file, master_uri)
         except socket.gaierror, e:
-            raise codes.CMException, "Could not locate certmaster at %s" % master_uri
+            try_count += 1
+            if try_count > 10:
+                raise codes.CMException, "Could not locate certmaster at %s" % master_uri
+            else:
+                pass
 
         # logging here would be nice
         if not result:
