Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie: org.omg.CORBA.COMM_FAILURE

3 views
Skip to first unread message

Chris Farley

unread,
Feb 23, 2002, 2:41:42 PM2/23/02
to
I'm trying to learn about CORBA, and am having trouble with Sun's famous
tutorial at http://java.sun.com/j2se/1.3/docs/guide/idl/tutorial/GSserver.html

The client and server programs compile fine. But when I start tnameserv
on port 1050, then start the server with a `java HelloServer
-ORBInitialPort 1050`, the program returns the attached stack trace
after a minute or two. (The client program fails in a similar way.)

The server is failing at the final line in the code snippet below:

// Create and initialize the ORB
ORB orb = ORB.init(args, null);

// Create the servant and register it with the ORB
HelloServant helloRef = new HelloServant();
orb.connect(helloRef);

// Get the root naming context (FAILS AT THIS NEXT LINE)
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");

I am using jdk1.3 on a Linux platform, with Sun's Java IDL ORB.

Does anybody know what I'm doing wrong, or have any general tips on
debugging these newbie CORBA communication problems? Thanks!

-- STACK TRACE BELOW --

ERROR: org.omg.CORBA.COMM_FAILURE: minor code: 1398079490 completed: No
org.omg.CORBA.COMM_FAILURE: minor code: 1398079490 completed: No
at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(IIOPConnection.java:919)
at com.sun.corba.se.internal.iiop.IIOPConnection.send(IIOPConnection.java:980)
at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(IIOPOutputStream.java:76)
at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(ClientRequestImpl.java:87)
at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:158)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:200)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:265)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:188)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:1461)
at HelloServer.main(HelloServer.java:14)

Chris Farley

unread,
Feb 24, 2002, 3:32:45 AM2/24/02
to
Chris Farley <nbr...@visi.com> wrote:

> The client and server programs compile fine. But when I start tnameserv
> on port 1050, then start the server with a `java HelloServer
> -ORBInitialPort 1050`, the program returns the attached stack trace
> after a minute or two. (The client program fails in a similar way.)

Just a quick follow-up for the Deja archives, in case anybody else has
this problem (and it seems to be a common one).

I have determined that my problem is absolutely DNS related. I put my
DNS server into debug mode and watched some very unexpected behavior
from the ORB. It seems as if the ORB uses DNS to resolve all addresses.
Even if you specify -ORBInitialHost 127.0.0.1, the ORB makes DNS queries
for my fully-qualified hostname (why??). Because I'm behind a router
that uses NAT, my DNS setup is not as simple as it could be.

After I disconnected my computer from the Internet and temporarily
modified my DNS records (to simplify things), I found that I was able to
run my little "Hello Corba" application.

I still do not know how I'm going to fix the situation; I'm explicity
setting IP addresses for the ORB host, but that still results in DNS
lookups.

I suppose those expencive commercial ORBs handle this kind of thing
better??

--
Christopher Farley
www.northernbrewer.com

0 new messages