Skip to main content

Cant run EJB swing client over the internet

8 replies [Last post]
pablopina
Offline
Joined: 2008-07-13

I hava a swing EJB client also with JMS, it works fine if the client is in the same computer as the Server, or in the same local network, when i try to start the client on Java Web Start over the internet, I get the following exception below.

83.54.103.207 is the routers IP on the internet

and

192.168.1.34 is the IP of the server on the LAN

What can I do?

do you know what is going on?

13-jul-2008 20:55:05 com.sun.enterprise.appclient.MainWithModuleSupport prepareSecurity
INFO: Security Manager is ON.
13-jul-2008 20:55:05 com.sun.enterprise.appclient.MainWithModuleSupport setTargetServerProperties
INFO: ACC001:Using ClientContainer file: [C:\DOCUME~1\usuario\CONFIG~1\Temp\sunacc58164.xml].
13-jul-2008 20:55:05 com.sun.enterprise.appclient.MainWithModuleSupport
INFO: ACC024: IIOP endpoint(s) = 83.54.103.207:3700
13-jul-2008 20:55:44 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl
ADVERTENCIA: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 192.168.1.34; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(Unknown Source)
at org.omg.CosNaming.NamingContextHelper.narrow(Unknown Source)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getCachedProvider(SerialContext.java:247)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:205)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.sun.enterprise.util.Utility.lookupObject(Utility.java:145)
at com.sun.enterprise.ServerConfiguration.(ServerConfiguration.java:96)
at com.sun.enterprise.ServerConfiguration.getConfiguration(ServerConfiguration.java:80)
at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.createTransactionManager(J2EETransactionManagerImpl.java:294)
at com.sun.enterprise.appclient.AppContainer.initializeNaming(AppContainer.java:204)
at com.sun.enterprise.appclient.MainWithModuleSupport.(MainWithModuleSupport.java:364)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.sun.enterprise.appclient.jws.boot.JWSACCMain.run(JWSACCMain.java:221)
at com.sun.enterprise.appclient.jws.boot.JWSACCMain.main(JWSACCMain.java:182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection timed out: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:244)
... 34 more
Caused by: java.net.ConnectException: Connection timed out: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 35 more

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mihirkumarpaulatsya
Offline
Joined: 2010-07-17

Hi,

I have the same issue.

If you might have noticed in the error it shows the ip of lan which it has resolved after going through router.

But Glassfish tries it to through back directly to the requested machine which is not possible.

There must be some configuration available in Glassfish to do so.

If you have any idea please let me know.

Thanks in advance.

Regards,
Mihir Paulatsya (+919879526585)

aperezymadrid
Offline
Joined: 2008-01-16

Be sure there is not a firewall blocking that port or doing PNAT.

Aniceto Perez

pablopina
Offline
Joined: 2008-07-13

I´ve been googeling trying to find the difference between Nat and Pnat but i guess it is the same.

I am not a router expert but I always thought that if I am on a lan with only one public internet IP (on the router), it is needed to do NAT translation so my applications can get through the router onto the internet... I am missing anything?

tjquinn
Offline
Joined: 2005-03-30

Sorry, I misread one piece of the stack trace. The line numbers in your error do seem to be up-to-date.

A little background may help understand this. For Java Web Start launches the server sends the IIOP endpoint address or addresses which the client should use as part of the generated JNLP document. The app client container (ACC) uses that information to contact an ORB on the server. That is what is displayed in the fhird INFO message in your original post:

INFO: ACC024: IIOP endpoint(s) = 83.54.103.207:3700

Although I am not positive, I believe that this first contact succeeds based on the stack trace. After that, name lookups should return the host and port where the named resource can be contacted. And it seems something is not quite right with how that address is being handled.

Is it possible that your client might have a hosts file that maps the server's host name to the LAN address?

- Tim

pablopina
Offline
Joined: 2008-07-13

I´ve set up that version of glassfish on two different LANs, routers are ADSL routers provided by the phone company

I had never heared of PNAT but I always heared of NAT

this is a copy paste of the page on my router NAT config called "Port Forwarding":
------------------------------------------------

Port Forwarding Help
Create the port forwarding rules to allow certain applications or server software to work on your computers if the Internet connection uses NAT.

Application Name External Packet Internal Host Delete
Protocol Port IP Address Port

ppp-0
Glassfish TCP 7676-8686 192.168.1.33 7676-8686
Glassfish UDP 7676-8686 192.168.1.33 7676-8686
Glassfish TCP 3700-4848 192.168.1.33 3700-4848
Glassfish UDP 3700-4848 192.168.1.33 3700-4848

pablopina
Offline
Joined: 2008-07-13

It can´t be the hosts file because I´ve tried it from different client on different servers and it is always the same

tjquinn
Offline
Joined: 2005-03-30

Please tell us which exact version of GlassFish you are using.

The errors and the line numbers in the stack trace do not match up with the latest v2 update release 1 or v2 update release 2 sources. The problem you are having may have been addressed in one of those updates.

- Tim

pablopina
Offline
Joined: 2008-07-13

Sun Java System Application Server 9.1_02 (build b04-fcs)]