users@glassfish.java.net

Re: remote EJB client: org.omg.CORBA.ORBInitialHost ignored?

From: Kristian Rink <kr_at_zimmer428.net>
Date: Tue, 13 Nov 2012 11:27:44 +0100

Harshad, all;

Am Dienstag, 13. November 2012, 09:47:13 schrieb Kristian Rink:

> Am Montag, 12. November 2012, 12:49:07 schrieb Harshad Vilekar:
> > In place of the hostname, try using the ip address of the remote host
> > -Dorg.omg.CORBA.ORBInitialHost=xxx.xxx.xxx.xxx". If that works, then
> > check your hosts file. Adding hostname to ip address mapping to the
> > hosts file on your system may help.

Well, sometimes it helps to actually write, debug a bit and think twice. Used
the Eclipse debugger to dive into things and see what happens. Repeatedly
ended up seeing the client actually initially connects to the "right" host
("testbed" server) searching and resolving the remote EJB but always and again
falls back to "127.0.0.1" for trying to actually connect.

Eventually figured out that, on the testbed / Glassfish host, its local
hostname ("testbed") was wired to 127.0.0.1 in /etc/hosts.

Changed that, restarted the domain. Problem solved. Something learnt again.
*facepalm*

Cheers,
Kristian