Simple omniORBpy example throws exception with error 0x41540002

Diez B. Roggisch deets at nospam.web.de
Tue May 22 07:54:57 EDT 2007


Samuel wrote:

> Hi,
> 
> I am trying to get the files from this tutorial to work:
> http://www.grisby.org/presentations/py10code.html
> 
> Direct link to the files:
> http://www.grisby.org/presentations/py10code/adder.idl
> http://www.grisby.org/presentations/py10code/adderServer.py
> 
> It produces the following error:
> 
> $ omniidl -bpython adder.idl && python adderServer.py
> Traceback (most recent call last):
>   File "adderServer.py", line 23, in <module>
>     nameRoot = nameRoot._narrow(CosNaming.NamingContext)
>   File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 667,
> in _narrow
>     return _omnipy.narrow(self, dest._NP_RepositoryId)
> omniORB.CORBA.TRANSIENT: Minor: 0x41540002, COMPLETED_NO.
> 
> According to Google this might mean "Connect failed", however, I don't
> understand why the server would open a connection. I expected it to
> simply listen on a socket, but I probably just don't understand how it
> works.
> 
> Can anyone please explain this?

It indeed does open a connection - because it wants to register with a
NameServer.

This is basically a bootstrapping-problem. You have to somehow distribute
object references to connect clients to servers. You can do so by using
persistent IORs and configure these for the client. You can also place them
on a network-location somehow. 

Or you can configure a name-server for your ORB, and if that name-server is
the same for the server, you can look-up an object reference there. This is
what the example-code tries to do. 

So - the easiest solution for now would be to start the omniORB nameserver.
On my ubuntu, that's a matter of installing it via apt.

Diez



More information about the Python-list mailing list