[omniORB] No connection to Naming Service from omniORB client

RKOSS@Opto22.com RKOSS@Opto22.com
Mon Mar 10 17:06:01 2003


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C2E726.E8A90640
Content-Type: text/plain;
	charset="iso-8859-1"

Here is more info on the similar problem I had.

I created a DLL that was to act as an interface from a VB application to an
ORB running on an embedded device. In DLL_PROCESS_ATTACH I called ORB_Init()
passing the following:
	int _argc = 3;
	char * _argv[] = { "Orblib", "-ORBInitRef",
"NameService=corbaname::10.192.0.107:900", 0 };

The omniORB trace (level=40) would spit out the following:
	Current configuration is as follows:
	  ...
	  InitRef = NameService=corbaname::10.192.0.107:900
	  ...

Immediately after this I would try to get my initial naming context:
	CORBA::Object_var obj_var =
g_orb_var->resolve_initial_references("NameService");
	CosNaming::NamingContext_var inc_var =
CosNaming::NamingContext::_narrow(obj_var);

I would then see the same symptoms that Christoph sees. I think it is
related to timing.

Now, I no longer try to get the NamingContext object during
DLL_PROCESS_ATTACH. Instead I wait until the precise time that I need to get
an object reference from the embedded device. In fact, what I'm trying to do
now is use the corbaname mechanism instead:
	string sObjectURL =
"corbaname::10.192.0.107:900#NokiaANC/iorgen/csd;term123;1;IDL:File:1%2e0";
	try{
		CORBA::Object_var file_obj_var;
		file_obj_var =
g_orb_var->string_to_object(sObjectURL.c_str());

I sniff the network communication when I do this and find that my
application does make a connection to the naming service, it does acquire a
NamingContext, but when it tries to resolve my object
("#NokiaANC/iorgen/csd;term123;1;IDL:File:1%2e0"), it fails.

I'm trying to gather some more for info this problem so I can post a
reasonable question.

BTW, thank you Mr. Grisby for your response.

Ron

-----Original Message-----
From: Duncan Grisby [mailto:duncan@grisby.org]
Sent: Monday, March 10, 2003 3:54 AM
To: Christoph Thomalla
Cc: omniorb-list@omniorb-support.com
Subject: Re: [omniORB] No connection to Naming Service from omniORB
client 


On Friday 7 March, Christoph Thomalla wrote:

> it seems to me I encountered quite the same problem as Ron (Win2K,
VC++6.0).
> I tried tnameserv.exe (JDK 1.3) and omniORB name service at different 
> ports with the same result.

[...]
> omniORB: Client opened connection to giop:tcp:255.255.255.255:65535
> omniORB: sendChunk: to giop:tcp:255.255.255.255:65535 100 bytes

This means your OS is very confused about TCP. omniORB has tried to
make a connection to the address specified for the naming service, and
the OS has reported success in opening the connection. Then omniORB
has tried to ask the OS for the address of the endpoint with
getpeername(), and has received an error, hence its reporting the
address as 255.255.255.255. When it tries to send on the socket, that
fails. Does the network work on your machine?

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --

_______________________________________________
omniORB-list mailing list
omniORB-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list

------_=_NextPart_001_01C2E726.E8A90640
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [omniORB] No connection to Naming Service from omniORB =
client </TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Here is more info on the similar problem I =
had.</FONT>
</P>

<P><FONT SIZE=3D2>I created a DLL that was to act as an interface from =
a VB application to an ORB running on an embedded device. In =
DLL_PROCESS_ATTACH I called ORB_Init() passing the =
following:</FONT></P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>int _argc =
=3D 3;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>char * =
_argv[] =3D { &quot;Orblib&quot;, &quot;-ORBInitRef&quot;, =
&quot;NameService=3Dcorbaname::10.192.0.107:900&quot;, 0 };</FONT>
</P>

<P><FONT SIZE=3D2>The omniORB trace (level=3D40) would spit out the =
following:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Current =
configuration is as follows:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&nbsp; =
...</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&nbsp; =
InitRef =3D NameService=3Dcorbaname::10.192.0.107:900</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&nbsp; =
...</FONT>
</P>

<P><FONT SIZE=3D2>Immediately after this I would try to get my initial =
naming context:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>CORBA::Object_var obj_var =3D =
g_orb_var-&gt;resolve_initial_references(&quot;NameService&quot;);</FONT=
>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>CosNaming::NamingContext_var inc_var =3D =
CosNaming::NamingContext::_narrow(obj_var);</FONT>
</P>

<P><FONT SIZE=3D2>I would then see the same symptoms that Christoph =
sees. I think it is related to timing.</FONT>
</P>

<P><FONT SIZE=3D2>Now, I no longer try to get the NamingContext object =
during DLL_PROCESS_ATTACH. Instead I wait until the precise time that I =
need to get an object reference from the embedded device. In fact, what =
I'm trying to do now is use the corbaname mechanism instead:</FONT></P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>string =
sObjectURL =3D =
&quot;corbaname::10.192.0.107:900#NokiaANC/iorgen/csd;term123;1;IDL:<A =
HREF=3D"File:1%2e0" TARGET=3D"_blank">File:1%2e0</A>&quot;;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>try{</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>CORBA::Object_var file_obj_var;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>file_obj_var =
=3D g_orb_var-&gt;string_to_object(sObjectURL.c_str());</FONT>
</P>

<P><FONT SIZE=3D2>I sniff the network communication when I do this and =
find that my application does make a connection to the naming service, =
it does acquire a NamingContext, but when it tries to resolve my object =
(&quot;#NokiaANC/iorgen/csd;term123;1;IDL:<A HREF=3D"File:1%2e0" =
TARGET=3D"_blank">File:1%2e0</A>&quot;), it fails.</FONT></P>

<P><FONT SIZE=3D2>I'm trying to gather some more for info this problem =
so I can post a reasonable question.</FONT>
</P>

<P><FONT SIZE=3D2>BTW, thank you Mr. Grisby for your response.</FONT>
</P>

<P><FONT SIZE=3D2>Ron</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Duncan Grisby [<A =
HREF=3D"mailto:duncan@grisby.org">mailto:duncan@grisby.org</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, March 10, 2003 3:54 AM</FONT>
<BR><FONT SIZE=3D2>To: Christoph Thomalla</FONT>
<BR><FONT SIZE=3D2>Cc: omniorb-list@omniorb-support.com</FONT>
<BR><FONT SIZE=3D2>Subject: Re: [omniORB] No connection to Naming =
Service from omniORB</FONT>
<BR><FONT SIZE=3D2>client </FONT>
</P>
<BR>

<P><FONT SIZE=3D2>On Friday 7 March, Christoph Thomalla wrote:</FONT>
</P>

<P><FONT SIZE=3D2>&gt; it seems to me I encountered quite the same =
problem as Ron (Win2K, VC++6.0).</FONT>
<BR><FONT SIZE=3D2>&gt; I tried tnameserv.exe (JDK 1.3) and omniORB =
name service at different </FONT>
<BR><FONT SIZE=3D2>&gt; ports with the same result.</FONT>
</P>

<P><FONT SIZE=3D2>[...]</FONT>
<BR><FONT SIZE=3D2>&gt; omniORB: Client opened connection to =
giop:tcp:255.255.255.255:65535</FONT>
<BR><FONT SIZE=3D2>&gt; omniORB: sendChunk: to =
giop:tcp:255.255.255.255:65535 100 bytes</FONT>
</P>

<P><FONT SIZE=3D2>This means your OS is very confused about TCP. =
omniORB has tried to</FONT>
<BR><FONT SIZE=3D2>make a connection to the address specified for the =
naming service, and</FONT>
<BR><FONT SIZE=3D2>the OS has reported success in opening the =
connection. Then omniORB</FONT>
<BR><FONT SIZE=3D2>has tried to ask the OS for the address of the =
endpoint with</FONT>
<BR><FONT SIZE=3D2>getpeername(), and has received an error, hence its =
reporting the</FONT>
<BR><FONT SIZE=3D2>address as 255.255.255.255. When it tries to send on =
the socket, that</FONT>
<BR><FONT SIZE=3D2>fails. Does the network work on your machine?</FONT>
</P>

<P><FONT SIZE=3D2>Cheers,</FONT>
</P>

<P><FONT SIZE=3D2>Duncan.</FONT>
</P>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>&nbsp;-- Duncan =
Grisby&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --</FONT>
<BR><FONT SIZE=3D2>&nbsp; -- duncan@grisby.org&nbsp;&nbsp;&nbsp;&nbsp; =
--</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; -- <A HREF=3D"http://www.grisby.org" =
TARGET=3D"_blank">http://www.grisby.org</A> --</FONT>
</P>

<P><FONT =
SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>omniORB-list mailing list</FONT>
<BR><FONT SIZE=3D2>omniORB-list@omniorb-support.com</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://www.omniorb-support.com/mailman/listinfo/omniorb-list" =
TARGET=3D"_blank">http://www.omniorb-support.com/mailman/listinfo/omnior=
b-list</A></FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2E726.E8A90640--