如何将 GlassFish 放到网上?
我正在尝试使 GlassFish 可以在线访问,但没有取得任何成功。我禁用了 Windows 防火墙,只是为了确保它不会造成任何影响。我已按以下方式在 domain.xml
中设置了
:
<network-listeners>
<network-listener port="8080" protocol="http-listener-1" address="-IPcomeshere" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
<network-listener port="8181" protocol="http-listener-2" address="-IPcomeshere" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
<network-listener port="4848" protocol="admin-listener" address="-IPcomeshere" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
我已使用一堆端口尝试了上述操作,但没有成功。我有一个 D-link DIR-655 路由器,我这样设置虚拟服务器列表:
这样配置我得到以下异常:
java.net.BindException:范围内没有可用端口:8181=com.sun.enterprise.v3.services.impl.monitor.MonitorableSSLSelectorHandler@334e9cde 严重:由于启动异常而关闭 v3:范围内没有可用端口:8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@29bb22a0
我做错了什么?任何帮助将不胜感激!
I'm trying make GlassFish accessible online, but didn't had any success with it. I disabled Windows firewall, just to be sure it doesn't bother anything. I've set up <network-listeners>
in domain.xml
the following way:
<network-listeners>
<network-listener port="8080" protocol="http-listener-1" address="-IPcomeshere" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
<network-listener port="8181" protocol="http-listener-2" address="-IPcomeshere" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
<network-listener port="4848" protocol="admin-listener" address="-IPcomeshere" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
I've tried the above with a bunch of ports, but no success. I have a D-link DIR-655 router, I set up the virtual servers list this way:
With this configuration I get the following exception:
java.net.BindException: No free port within range: 8181=com.sun.enterprise.v3.services.impl.monitor.MonitorableSSLSelectorHandler@334e9cde
SEVERE: Shutting down v3 due to startup exception : No free port within range: 8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@29bb22a0
What am I doing wrong? Any help will be appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为,您应该尝试
端口转发
。不是虚拟服务器
。基本上,它会打开路由器上的这些端口,并将发送到这些端口的数据包重定向到本地计算机服务器的端口。
I think, you should try
Port Forwarding
. notvirtual server
.Basicly it will open those port on you router and redirect the packet send to those ports into your local machine server's port.
你的IP好像不太可能,可能是本地的? http://www.whatismyip.com/ 提供您的 IP。
Your IP seems unprobable, maybe local one? http://www.whatismyip.com/ gives your IP.