无法使用本地IP地址访问jetty服务器 [英] Unable to access jetty server with local IP address
问题描述
我已将 jetty-我的eclipse Mars中的maven-plugin
,我可以使用jetty启动和停止目标来运行服务器。我可以使用 http:// localhost:8080 / myapp
访问该网站,但不能使用本地IP地址(即 http://192.168 .0.5:8080 / myapp
)从我自己的电脑或通过LAN和Wi-Fi连接在同一网络中的其他计算机。
I have configured jetty-maven-plugin
in my eclipse Mars and I can run the server using jetty start and stop goals. I can able to access the website using http://localhost:8080/myapp
but not using local IP address(i.e., http://192.168.0.5:8080/myapp
) from my own computer or other computers connected in the same network via LAN and Wi-Fi.
作为这些帖子中的解决方案,
As mentioned as a solution in these posts,
我将服务器主机配置为 0.0.0.0
从 localhost
来监听所有主机。使用此设置,我可以在服务器启动日志中看到
I configured the server host to 0.0.0.0
from localhost
to listen on all hosts. With this setting I can see on server start log,
INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080
,它只适用于 http:// localhost:8080
但不能从 http://192.168.0.5:8080
访问。
and it works only on http://localhost:8080
but it's not accessible from http://192.168.0.5:8080
.
我也尝试运行,如果该接口可以使用网络接口列表来自lan#comment15911165_11909810>这个评论,我得到了,
I also tried running that if the interface is accessible using the Networks Interface Listing as mentioned in this comment. and I got,
Display name: NETGEAR WNA1000M N150 Wireless USB Micro Adapter
Name: wlan4
InetAddress: /192.168.0.5
我也尝试关闭我的Windows防火墙/防病毒,但不帮助。我的码头版本是< jetty.version> 9.3.0.M1< /jetty.version>
和JDK 1.7。可能是什么问题呢?任何帮助都不胜感激。
I also tried turning off my Windows Firewall/antivirus but din't help. My jetty version is <jetty.version>9.3.0.M1</jetty.version>
and JDK 1.7. What could be the problem? Any help is appreciated.
推荐答案
McAfee Endpoint Security是这里的罪魁祸首。它正在阻止来自我自己的计算机的IP地址的请求。关闭防毒软体内的防火墙,我可以从浏览器和通过网络连接的其他设备访问网站,网址为 http://192.168.0.5:8080/mysite
。
McAfee Endpoint Security was the culprit here. It was blocking the requests with IP addresses from my very own computer. Turned off the firewall inside the Antivirus and I was able to access the site with http://192.168.0.5:8080/mysite
from the browser and other devices connected through the network.
这篇关于无法使用本地IP地址访问jetty服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!