After recently deploying and registering a NetScaler Console (formerly ADM) Agent and trying to add it as a license server on a NetScaler device you get the error "Registration of device failed [Sending request to mgmtserver failed]".
Wait at least 5 minutes after the agent is registered with the cloud before attempting to license a NetScaler using the agent.
If you wish to make sure that the agent is ready to receive license registration connections (TCP 27000), you can you the below from the agent shell prompt:
bash-3.2# sockstat | grep 27000
root mas_clouda 1010 135 tcp4 *:27000 *:*
Once you get the output above, the process is ready to accept license server registration requests.
After registration and boot-up of the agent, there are several processes and checks that must take place before the agent is ready to accept incoming connections as a license server (TCP 27000). We suggest waiting at least 5 minutes after registration or subsequent bootup of the agent.
Additional requirements for the registration to be successful include: