[omniORB] Re: omniorbpy narrow problem (NameService Problem?)

Manuel Iglesias mhanuel at ieee.org
Fri Aug 21 19:34:26 BST 2009


I found a difference comparing the traces of my ubuntu box vs. the debian
box.

On my ubuntu box (where it works as expected) I have

omniORB: AsyncInvoker: thread id = 3 has started. Total threads = 2
omniORB: Scavenger task execute.
omniORB: Client attempt to connect to giop:tcp:localhost:2809
omniORB: Client opened connection to giop:tcp:127.0.0.1:2809

but in the debian box

omniORB: Client attempt to connect to giop:tcp:127.0.0.1:2809
omniORB: Switch rope to use address giop:tcp:127.0.0.1:2809
omniORB: AsyncInvoker: thread id = 3 has started. Total threads = 2
omniORB: Scavenger task execute.
Traceback (most recent call last):
  File "adder.py", line 24, in <module>
    nameRoot = nameRoot._narrow(CosNaming.NamingContext)
  File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 787, in
_narrow
    return _omnipy.narrow(self, repoId, 1)

I don't know what the Switch rope means.
It seems that for a good reason it can't establish a connection.

*Michael wrote:

Did you try to change your nameservice uri from
localhost to 127.0.0.1?

*I suspect that it handles the localhost as 127.0.0.1 looking at the above
trace, but haven't try to change that as you suggest, could you point me how
to accomplish that? Thank you.

I will really appreciate if someone have a clue about this problem.




On Fri, Aug 21, 2009 at 5:30 PM, Manuel Iglesias <mhanuel.usb at gmail.com>wrote:

> I really will appreciate if someone could give some advice about this
> problem.
>
> Recently I was trying to re-create my application debian 5.0 box (I have
> already done some developing in my ubuntu box), after all the installation I
> copy the .py and .idl files of my server and run omniidl, so far everything
> works.
> When I run my python application I get a problem with the NameService.
>
> I went back to the example code adder of Dr Grisby tutorial, which use
> NameService. I am getting the same error, here is the exception I am getting
> after executing the instruction
> nameRoot = nameRoot._narrow(CosNaming.NamingContext)
> *
> Traceback (most recent call last):
>   File "adder.py", line 24, in <module>
>     nameRoot = nameRoot._narrow(CosNaming.NamingContext)
>   File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 787, in
> _narrow
>     return _omnipy.narrow(self, repoId, 1)
> omniORB.CORBA.TRANSIENT: CORBA.TRANSIENT(omniORB.TRANSIENT_ConnectFailed,
> CORBA.COMPLETED_NO)*
>
> The complete trace is attached.
> The server code is:
>
> *import sys, CORBA, CosNaming, Snake, Snake__POA
>
> class Adder_i (Snake__POA.Adder):
>     def __init__(self):
>            self.value = 0
>
>     def accumulate(self, a):
>         self.value = self.value + a
>         return self.value
>
>     def reset(self):
>         self.value = 0
>
> orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
> poa = orb.resolve_initial_references("RootPOA")
>
> adderServant = Adder_i()
>
> poa.activate_object(adderServant)
> adderObjref = adderServant._this()
>
> nameRoot = orb.resolve_initial_references("NameService")
> nameRoot = nameRoot._narrow(CosNaming.NamingContext)
> name      = [CosNaming.NameComponent("adder", "obj")]
> nameRoot.rebind(name, adderObjref)
>
> poa._get_the_POAManager().activate()
> orb.run()*
>
>
> I really don't know if I forgot something, because in my ubuntu box
> everything works.
>
> Thank you in advance,
> Manuel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090821/03b8db65/attachment.htm


More information about the omniORB-list mailing list