Connecting to Web Service in VM from client in host

为君一笑 提交于 2020-01-06 05:35:13

问题


I'm running Ubuntu 10.10 in VirtualBox with Windows 7 as host. I have a java Web Service which I deploy onto a Glassfish3 server in Ubuntu and I want to be able to reach it from the host, according to the VBox documentation I should port forward port 8080 which is the port that my client application connects to on my host. To do this I do the following command in Windows VBoxManage modifyvm Ubuntu --natpf1 glassfish,tcp,,8080,,8080 which should forward my hosts 8080 port to my VM's 8080 port, but it doesn't seem to work when I try to reach it. Any ideas?


回答1:


Ensure 8080 is not already used by some other process in Windows. Install Guest Additions from the ISO inside Ubuntu. Ensure you are using NAT as the option for networking. Ensure the firewall in Ubuntu does not block incoming requests.



来源:https://stackoverflow.com/questions/4832712/connecting-to-web-service-in-vm-from-client-in-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!