Fails to re-register my local Agent

For some reason my local agent shows disconnected in my machine and it fails to connect after restarting so I tried deleting my existing agent and register with a new name. But it fails to register even after I made sure my agent is active during registration but it still fails .Please Help.

Note : I’m working on a Mac and if there are unique steps to it . please mention them too.