By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,886 Members | 1,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,886 IT Pros & Developers. It's quick & easy.

XP-> linux socket (XMLRPC) connection errors

P: 1
Hello everyone,

We have a linux server (Fedora core 7, default install, firewall turned off) and a bunch of windows XP machines on network/domain.

All machines are visible and I can get to both windows and linux by various methods.

We are trying to resolve a problem of not being able to connect to the linux box from the xp machines using python XMLRPC. (This is the module used in the software I am trying to set up)

Python is at 2.4 and 2.5 on windows machines and 2.5 on Linux.

Using this sample code from
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81549/index_txt
Expand|Select|Wrap|Line Numbers
  1. # Server code
  2.  
  3. import SimpleXMLRPCServer
  4.  
  5. class StringFunctions:
  6.     def __init__(self):
  7.         # Make all of the Python string functions available through
  8.         # python_string.func_name
  9.         import string
  10.         self.python_string = string
  11.  
  12.     def _privateFunction(self):
  13.         # This function cannot be called through XML-RPC because it
  14.         # starts with an '_'
  15.         pass
  16.  
  17.     def chop_in_half(self, astr):
  18.         return astr[:len(astr)/2]
  19.  
  20.     def repeat(self, astr, times):
  21.         return astr * times
  22.  
  23. server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost", 8000))
  24. server.register_instance(StringFunctions())
  25. server.register_function(lambda astr: '_' + astr, '_string')
  26. server.serve_forever()
  27.  
Expand|Select|Wrap|Line Numbers
  1. # Client code
  2.  
  3. import xmlrpclib
  4.  
  5. server = xmlrpclib.Server('http://localhost:8000')
  6. print server.chop_in_half('I am a confidant guy')
  7. print server.repeat('Repetition is the key to learning!\n', 5)
  8. print server._string('<= underscore')
  9. print server.python_string.join(['I', 'like it!'], " don't ")
  10. print server._privateFunction() # Will throw an exception
  11.  
I can get XP machines to talk to each other and if I run it on the linux server it connects to itself, but if I try and get XP->Linux or Linux->XP I get connection errors such as

socket.error: (10061, 'connection refused')
or
socket.error: (10060, 'Operation timed out')

If I try and run the server on a port on the linux box and then from xp try to telnet to it, I get
Connecting To Linux-Server...Could not open connection to the host, on port 55670: Connect failed

But if I try to telnet from XP to the server running on a port on another XP machine, I can connect and when I type garbage I get a response, in the form of an error and the server prints out what I typed..
eg response = Message: Bad request syntax ('ssdsadsdasdasdasdasdasdasd')
server message = <my computer> - - [30/Oct/2007 17:06:50] code 400, message Bad request syntax ('ssdsadsdasdasdasdasdasdasd')

So what I need help with is what is going on with the connection between the two different operating systems? Is there anything I can try/read/look at to get this stuff working, as we/I am really stumped here.

I hope I have explained this properly, and someone out there can help.

Getafixx
Oct 30 '07 #1
Share this Question
Share on Google+
1 Reply


bartonc
Expert 5K+
P: 6,596
This really makes me wish that I had a linux box to test this on. The project that I am currently working on may soon need to cross this platform barrier and I'm looking forward to setting one up. But it's crunch time at the moment so that will have to wait a while.
Oct 30 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.