title: MongoDB MMS Agent stuck in error loop
body: <p>I've tried several deployments with MMS (on my own servers, all clean 64-bit Ubuntu 14.04), but for some reason the agent always seems to end up in an endless error state/loop, no matter what I do.</p>
  
  <p>My current deployment is a simple replica set of 2, with everything set up correctly and it was working fine at one point yesterday.</p>
  
  <p>I added a few users to a few databases, deployed changes, waited, seemed to be working.
  Continued adding new users, boom, suddenly it's error time and I have no idea on how to remedy or even approach this, plus getting any kind of support with this issue seems next to impossible, unless of course someone responds to this here.</p>
  
  <p>Here's a few lines from the agent logs, so you get a feel for the loop that's happening (been happening for the past 17 hours straight):</p>
  
  <pre><code>All 1 Mongo processes are in goal state, Monitoring agent in goal state, Backup agent in goal state
  Attempting to restore cluster config from local backup...
  Backing up cluster config to /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json
  clusterConfig changed! New edition: &lt;nil&gt;
  Received new cluster config!
  Computing state
  </code></pre>
  
  <p>There's some variation to the what the log's spitting out, but it does seem to be repeating, especially when it comes to the cluster config part, as it would seem like the configuration file or response is undefined and it doesn't know what to do, I don't know.</p>
  
  <p><strong>UPDATE</strong>: I've done a few reinstalls and no matter what I do, once I enable authentication and add at least one user, I get the following error (which then disappears if I remove the user):</p>
  
  <pre><code>%!v(MISSING)Expected ROOT.auth.usersDeleted.*.dbs to be an array of strings
  </code></pre>
  
  <p><strong>UPDATE 2</strong>: I figured out a temporary solution to the above error, which was to use a completely different user identifier when creating the users. I can't believe that you would have to create a completely new user ID each time you wish to start from fresh?!</p>
  
  <p>It almost seems like the MMS-side of things is clinging to old data, even though I'm using fresh servers with different hostnames and everything.</p>
  
  <p>Please, someone, help me. :-(</p>
  
  <p><strong>UPDATE 3</strong>: Ran in to more problems using a replica set, so decided to go with a standalone install only.
  Now, as long as I don't use previously used usernames for any DB users, or users like "admin", but something like "my-admin" or "myAdmin", I don't run in to any issues.
  So far it's working, but clearly something's also broken.</p>