@Kanishka Kartikeya
It seems that this might be an issue with your Network Security Group for your VM. Please verify you have inbound port TCP 8400 allowed for your VM. You can also utilize the portal to diagnose your issue.
If the port is reachable through the NSG please check that the program is reachable by testing locally on the VM.
Hope this helps! Let me know if you are still facing issues or need further assistance.
-------------------------------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.