Originally posted by Masoud Kalali:
There could be several reason for this problem.
1-there are some firewall or something between you and the machine running glassfish.
There is no firewall between the client machine and the server(Glassfish) machine. I explicitly ran a back-to-back
test in the same collision domain instead of through a router.
Meanwhile, I have another Apache Http server on port 80 running on the same machine as Glassfish resides. The client machine is able to connect to the apache server on port 80 but not Glassfish on port 8080.
2-By any chance which is small possibility, glassfish http listener is listening on loopback address instead of your network interface.
At the beginning I also thought it was the problem but it seems not. see my following comments.
solutions:
1-Ping the server and see whether you can see the server from remote host. if you can not access the remote computer as your network adminstrator to take a look.
ping from my client machine works fine, also the Apache server working on port 80 works fine too.
2-From local computer open glassfish adminstration console by pointing you browser to http://localhost:4848 . by default you can use admin/adminadmin for authentication. You can see the configuration node in left side tree.
Then take a look at Configuration> HTTP Service> HTTP Listeners> http-listener-1 and check whether it is binded to 0.0.0.0 , 127.0.0.1 or your network interface. If the IP address is not your netwrork interface address or 0.0.0.0 Change the ip address to your network interface address or 0.0.0.0.
Restart the glassfish using
glassfish_home/bin/asadmin stop-domain
glassfish_home/bin/asadmin start-domain
I think it should resolve your problem, let me know the outcome if it does not resolve your problem.
http-listener-1 is bound with the network address "0.0.0.0" by default. You said Change the ip address to your network interface address or 0.0.0.0. You mean I need to change to the network interface address(then what is the network interface address? (0.0.0.0? or the server's IP address?).
Also I see that "0.0.0.0, any, or ANY or INADDR_ANY" seems options to the network address, I tried INADDR_ANY, the Glassfish cannot even be started now, and got the following exception.
rgetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
Caused by: java.lang.Error: Untranslated exception
at sun.nio.ch.Net.translateToSocketException(Net.java:63)
at sun.nio.ch.Net.translateException(Net.java:79)
at sun.nio.ch.Net.translateException(Net.java:85)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:61)
at com.sun.enterprise.server.ss.provider.ASServerSocket.bind(ASServerSocket.java:292)
at com.sun.enterprise.server.ss.provider.ASServerSocket.bind(ASServerSocket.java:263)
at com.sun.enterprise.server.ss.ASSocketService._initializeService(ASSocketService.java:154)
at com.sun.enterprise.server.ss.ASSocketService.start(ASSocketService.java:98)
at com.sun.enterprise.server.ss.ASLazyKernel.startService(ASLazyKernel.java:169)
at com.sun.enterprise.server.ss.ASLazyKernel.setupSocketListeners(ASLazyKernel.java:120)
at com.sun.enterprise.server.ss.ASLazyKernel.startASSocketServices(ASLazyKernel.java:81)
at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(OnDemandServer.java:84)
at com.sun.enterprise.server.PEMain.run(PEMain.java:316)
at com.sun.enterprise.server.PEMain.main(PEMain.java:260)
... 5 more
Caused by: java.net.SocketException: Unresolved address
at sun.nio.ch.Net.translateToSocketException(Net.java:55)
... 18 more
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:30)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:115)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
... 15 more
Thanks,
Jiafan
[ August 20, 2007: Message edited by: Jiafan Zhou ]
[ August 20, 2007: Message edited by: Jiafan Zhou ]