I found a difference comparing the traces of my ubuntu box vs. the debian box. <br><br>On my ubuntu box (where it works as expected) I have<br><br>omniORB: AsyncInvoker: thread id = 3 has started. Total threads = 2<br>omniORB: Scavenger task execute.<br>
omniORB: Client attempt to connect to giop:tcp:localhost:2809<br>omniORB: Client opened connection to giop:tcp:<a href="http://127.0.0.1:2809" target="_blank">127.0.0.1:2809</a><br><br>but in the debian box<br><br>omniORB: Client attempt to connect to giop:tcp:<a href="http://127.0.0.1:2809" target="_blank">127.0.0.1:2809</a><br>
omniORB: Switch rope to use address giop:tcp:<a href="http://127.0.0.1:2809" target="_blank">127.0.0.1:2809</a><br>omniORB: AsyncInvoker: thread id = 3 has started. Total threads = 2<br>omniORB: Scavenger task execute.<br>
Traceback (most recent call last):<br>
File "adder.py", line 24, in <module><br> nameRoot = nameRoot._narrow(CosNaming.NamingContext)<br> File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 787, in _narrow<br> return _omnipy.narrow(self, repoId, 1)<br>
<br>I don't know what the Switch rope means.<br>It seems that for a good reason it can't establish a connection.<br><br><i>Michael wrote: <br><br>Did you try to change your nameservice uri from<br>
localhost to 127.0.0.1?<br><br></i>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.<br>
<br>I will really appreciate if someone have a clue about this problem.<br><br><br><br><br><div class="gmail_quote">
On Fri, Aug 21, 2009 at 5:30 PM, Manuel Iglesias <span dir="ltr"><<a href="mailto:mhanuel.usb@gmail.com" target="_blank">mhanuel.usb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I really will appreciate if someone could give some advice about this problem.<br><br>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.<br>
When I run my python application I get a problem with the NameService.<br><br>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<br>
nameRoot = nameRoot._narrow(CosNaming.NamingContext)<br><i><br>Traceback (most recent call last):<br> File "adder.py", line 24, in <module><br> nameRoot = nameRoot._narrow(CosNaming.NamingContext)<br>
File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 787, in _narrow<br>
return _omnipy.narrow(self, repoId, 1)<br>omniORB.CORBA.TRANSIENT: CORBA.TRANSIENT(omniORB.TRANSIENT_ConnectFailed, CORBA.COMPLETED_NO)</i><br><br>The complete trace is attached.<br>The server code is:<br><br><i>import sys, CORBA, CosNaming, Snake, Snake__POA<br>
<br>class Adder_i (Snake__POA.Adder):<br> def __init__(self):<br> self.value = 0<br> <br> def accumulate(self, a):<br> self.value = self.value + a<br> return self.value<br><br> def reset(self):<br>
self.value = 0<br><br>orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)<br>poa = orb.resolve_initial_references("RootPOA")<br><br>adderServant = Adder_i()<br><br>poa.activate_object(adderServant)<br>adderObjref = adderServant._this()<br>
<br>nameRoot = orb.resolve_initial_references("NameService")<br>nameRoot = nameRoot._narrow(CosNaming.NamingContext)<br>name = [CosNaming.NameComponent("adder", "obj")]<br>nameRoot.rebind(name, adderObjref)<br>
<br>poa._get_the_POAManager().activate()<br>orb.run()</i><br><br><br>I really don't know if I forgot something, because in my ubuntu box everything works.<br><br>Thank you in advance,<br><font color="#888888">Manuel<br>
<br>
</font></blockquote></div><br>