Why agent version check is stuck?

When I'm trying to add agent this api is being hit from kibana.
http://localhost:5601/api/fleet/agents/available_versions
But is it getting stuck. In my local setup it is working fine, but on remote facing this issue.