Skip to main content

Problem - External connection between stand-alone application client and Glassfish server with EJB application

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
axbi_glassfish
Offline
Joined: 2013-05-22

Hello I am facing a problem with a client trying to connect to a module EJB that is hosted on a server Glassfish, I can connect locally, but when trying to use an external access by public IP or through an Amazon AWS instance in my application not can connect to the server glassfish. More detail below:

Firstly, the version used is: Glassfish Application Server Open Source Edition 3.1.1 (Tested with version 3.1.2 ).
The communication protocol used is IIOP (CORBA) whose listener is configured on port 3700. This setting is in the server console application in two groups of properties: default-config and server-config. Attached is the image of the same file print-print-1 and 2, respectively. Here also, the file print-3, the image of the General Information screen in the protocol ports are published in the Port item (s) IIOP.
In one of the tests, create a new IIOP listener configured p / port 1072, but it was not initiated by the server. Only native listeners of the installation is that boot.

With respect to our internet link in doubt check the external block was performed by the operator, create an instance on Amazon AWS with Windows Server 2008 and totally disabling the firewall and Amazon's own server, to leave no remnant blocking by the network. Even releasing the firewall completely unable establish connection between the application and the remote server. The doors were released and tested with telnet ports 3700, 3820, 3920 these ports were successful in connecting.

Regarding the IP settings available in Glassfish, configure the "orb-listener-1" with the listening IP 0.0.0.0 and port 3700 also configure the listening IP with the external and internal IP of the server, without success . We created a high port with the value 65000 without success too.

In the client application, in the lib folder of the JRE installation, there is a jndi.properties file, which is attached with a used setup w / access the services available on Amazon.

URL for images:
#print1 https://www.evernote.com/shard/s312/sh/1c4d4f52-3395-42f3-a217-8aa987436...
#print2 https://www.evernote.com/shard/s312/sh/f0f8af90-57fa-45c3-8b31-b862a4a73...
#print3 https://www.evernote.com/shard/s312/sh/26140a27-e9df-4e74-a6b3-1a9e41584...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miojo
Offline
Joined: 2003-06-10

If you try localhost, does it work?

If yes, could you try a remote server except AWS? Some other server?

axbi_glassfish
Offline
Joined: 2013-05-22

Yes, locally works, it works well in our local network. The glassfish server runs on another server (id: server_glassfish) on my local network and I access from my computer normally.
We also have an external IP when I access the server (server_glassfish) externally from another internet link, but also when there is no external access connection. The creation of this server on AWS would be to eliminate a problem with our external IP, but both trying to access external can not communicate with our application.
Did it have some other configuration to be done in Glassfish?

Tks

miojo
Offline
Joined: 2003-06-10

My guess is that it is a network issue, not related to GlassFish.

Please make sure your firewall and your router is properly configured, with all ports and/or forwarded ports are open.

axbi_glassfish
Offline
Joined: 2013-05-22

miojo,
I enabled logs ORB to see what could be causing the connection failure. When trying to connect the client application to the server I get the following error:

glassfish3.1.2 | javax.enterprise.system.o
rg.glassfish.enterprise.iiop.api | _ThreadID = 14; _ThreadName = Grizzly-kernel-thread (
1); | ORB initialization failed in lazy init
java.lang.RuntimeException: Orb initialization erorr

Tried solutions as posted here in the forum how to enable lazy-init, but no success. Did it have some other policy to be enabled on the server?

tks