Hello Pars,
What version of ESM are you using?
Open the ESM console and click on the drop down menu Help->About
Are you using a dynamic IP address?
Can the new server name be correctly resolved into new ip address?
How many endpoints are you managing?
You can also Add the new server name and the new IP to 'Server Network Address' of 'Main settings' tab in 'Configuration Tool'->click Apply ->ok and once the ESM service is stopped and restarted , you can redeploy the Esm agent on the endpoints ( remove the endpoints and redeploy the ESM agent) .
Before removing the endpoints and then redeploying the ESM agent, make sure you are able to add them again (the firewall is properly configured on the endpoint to allow the deployment).
Try first only with one endpoint and reply with the results.