title: TeamCity MSBuild agent: Agent has unregistered
body: <p>We've had a stable TeamCity install (version  9.0.3 (build 32334)) for some months. It has a single build agent, MSBuild, which is on the same box as TC.
  Now, without changing any of the configuration the build agent is showing as Disconnected with the Inactivity Reason: &quot;Agent has unregistered&quot;.</p>
  <p>I've restarted TC and the box a couple of times but it won't connect. I've left it way longer than <a href="https://confluence.jetbrains.com/display/TCD9/Common+Problems#CommonProblems-StartedBuildAgentisnotavailableontheservertorunbuilds" rel="nofollow noreferrer">ten minutes</a>.</p>
  <p>The <code>launcher.log</code> file doesn't show anything different to when it connected successfully:</p>
  <pre>[2016-04-25 15:18:59,318]  DEBUG - .buildServer.agent.JavaChooser - Current Java runtime version is 1.7 
  [2016-04-25 15:18:59,333]  DEBUG - dServer.agent.lock.LockManager - Lock file: C:\TeamCity\buildAgent\logs\buildAgent.properties.lock 
  [2016-04-25 15:18:59,333]  DEBUG - dServer.agent.lock.LockManager - Using no lock 
  [2016-04-25 15:19:02,344]  DEBUG - buildServer.agent.LauncherUtil - Deleting C:\TeamCity\buildAgent\update 
  [2016-04-25 15:19:02,344]  DEBUG - buildServer.agent.LauncherUtil - Deleting C:\TeamCity\buildAgent\update 
  [2016-04-25 15:19:02,344]  DEBUG - ldServer.agent.run.AgentRunner - Update folder deleted 
  [2016-04-25 15:19:02,344]  DEBUG - buildServer.agent.LauncherUtil - Deleting C:\TeamCity\buildAgent\backup 
  [2016-04-25 15:19:02,516]   INFO - dServer.agent.run.AgentProcess - Mon Apr 25 15:19:02 BST 2016 ==> Start launch 
  [2016-04-25 15:19:02,516]  DEBUG - .buildServer.agent.JavaChooser - Current Java runtime version is 1.7 
  [2016-04-25 15:19:02,516]   INFO - dServer.agent.run.AgentProcess - Launching agent with command:  c:\TeamCity\jre\bin\java -ea -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Xrs -Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml -Dteamcity_logs=../logs/ -classpath  {etc}
  </pre>
  <p>Is there something obvious I am missing?</p>
  <p>Thanks</p>