We have seen this sometimes when the agent process is still running on the server pointing at the master. Even though the definition is gone the agent process still has the master's IP/hostname.
Please go to the agent server and make sure the agent's java processes are killed.
Hopefully this helps.