简体   繁体   中英

How to put GlassFish online?

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!

I think, you should try Port Forwarding . not virtual 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.

Your IP seems unprobable, maybe local one? http://www.whatismyip.com/ gives your IP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM