Hi Shreyes,
A couple of things to check.
1. The serverUrl or the admin url that is registered with the portal may be invalid. When unfederating use fiddler or firebug to check the request that is failing.
2. the servers security settings may have been changed and it is no longer federated with portal. If the serverInfo resource (http://serverurl/arcgis/rest/info?f=pjson) reports a owningSystemUrl property, that would indicate the server is federated with this portal listed in the owningSystemUrl.
you can manually unfederate the server by following these two steps.
1. sign into portal api (portalurl/arcgis/sharing/rest) as a portal admin
2. go to http://portalurl/arcgis/sharing/rest/portals/self/servers and click on the server that should be unregistered and unregister the server.
3. Sign into ArcGIS Server Manager (http://serverurl/arcgis/manager) and change the security settings back to arcgis server authentication.
This is very helpful. I had a federated server to the portal. Which is corrupted, I could not remove or unfederate it. This is exactly the way to unregister the server.
That process works but you may also have to return to the federated server and reset the AGS authentication to "GIS_Server" .