无法访问 Microsoft Azure VM 中的休息服务

Not able to access a rest service in Microsoft Azure VM

我在访问部署在 ubuntu 虚拟机上的节点 js 休息服务时遇到问题。我可以使用 putty 访问 VM,但是我无法从命令行 ping 保留 ip。我已将日志放在其余服务中,因为当它被命中时它会打印日志,但不会打印日志。我想知道是否需要进行任何其他设置才能从虚拟机打开端口,或者它应该默认打开。如果我需要打开端口才能访问服务,我应该去哪里找。

感谢和问候

I want to know if there is any additional setting which needs to be done to open a port from the virtual machine or it is supposed to be open by default.

不,Azure默认不会开放其他端口,我们应该手动开放端口。

I am not able to ping the reserve ip from command line

这是一个经典 VM,我说得对吗?如果是这样,我们应该确保其余服务侦听哪个端口,并通过 Azure 门户添加端点:

有关创建端点的更多信息,请参阅此 link

如果你的VM在ARM模块,我们应该给NSG添加一个入站规则。

更多关于NSG的信息,请参考这篇link