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
-
# Server code
-
-
import SimpleXMLRPCServer
-
-
class StringFunctions:
-
def __init__(self):
-
# Make all of the Python string functions available through
-
# python_string.func_name
-
import string
-
self.python_string = string
-
-
def _privateFunction(self):
-
# This function cannot be called through XML-RPC because it
-
# starts with an '_'
-
pass
-
-
def chop_in_half(self, astr):
-
return astr[:len(astr)/2]
-
-
def repeat(self, astr, times):
-
return astr * times
-
-
server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost", 8000))
-
server.register_instance(StringFunctions())
-
server.register_function(lambda astr: '_' + astr, '_string')
-
server.serve_forever()
-
-
# Client code
-
-
import xmlrpclib
-
-
server = xmlrpclib.Server('http://localhost:8000')
-
print server.chop_in_half('I am a confidant guy')
-
print server.repeat('Repetition is the key to learning!\n', 5)
-
print server._string('<= underscore')
-
print server.python_string.join(['I', 'like it!'], " don't ")
-
print server._privateFunction() # Will throw an exception
-
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