0

I am trying to run a simple application using Pyro4 in python2.7; there are two programs 1st is server.py which binds the object with its IP address and also runs the naming service, and 2nd is the client.py which is running in a remote pc in the same network. The code of the following are as follows:

I am starting the naming service with the following command:

python -Wignore -m Pyro4.naming --host 10.42.0.1 --port 9999

I checked my ip-address using the command ifconfig

server.py

 import Pyro4;

 class chat:
   def passMessage(self,msg):
       print(msg);
       return "Hello from the server....";

 def main():
   chatObj = chat();
   Pyro4.Daemon.serveSimple(
    {
        chatObj : "chatObject"
    },
    "10.42.0.1",10101,ns=True);

 main();

client.py

import Pyro4;

chatObj = Pyro4.Proxy("PYRONAME:chatObject");
chatObj.passMessage("Hello From the client....");

The naming server start without any problems, but when I run the server.py it shows the error as mentioned in the title.

When I tested the same application in Windows environment, it worked without any error but showing error in Ubuntu 13.04 Any suggestion??

sumitb.mdi
  • 1,010
  • 14
  • 17
  • I'm not an export of pyro but, the ports you have given in the command line and the code differs. Maybe it's the problem. – scriptmonster Nov 09 '13 at 11:13
  • @scriptmonster no, its not like that, one of the port (9999) is handling the naming service while the other (10101) is the one responsible for providing the object binded on 10.42.0.1, remotely. – sumitb.mdi Nov 09 '13 at 13:02

0 Answers0