473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

xmlrpclib question

Hi,
I tried the xmlrpclib examples from the Python Cookbook and had a
problem. The example works fine so long as the server and client are on
the same machine. But as soon as I try to run the client from another
machine (all linux machines on the same network) I get a socket.error
111, connection refused. I've tried some different things to get past
this, different ports, put machines in /etc/hosts, but to no avail.
Does anyone have any suggestions about what I'm doing wrong? Is there
something I have to enable external access to the server?
Thanks in advance,
Doug Farrell

Jul 18 '05 #1
3 1290
"writeson" <wr******@charter.net> wrote:
I tried the xmlrpclib examples from the Python Cookbook and had a
problem. The example works fine so long as the server and client are on
the same machine. But as soon as I try to run the client from another
machine (all linux machines on the same network) I get a socket.error
111, connection refused. I've tried some different things to get past
this, different ports, put machines in /etc/hosts, but to no avail.


the xmlrpclib client library doesn't need any special configuration to access a
remote host -- all you need is being able to connect to the host via a TCP/IP
socket, and having someone at the other end that accepts the connection.

if you're 100% sure that there's a HTTP server running at the remote end, it
looks like the server (or firewalls/routers in your network) doesn't accept TCP/IP
connections from the machine you're running the client on.

what happens if you point an unproxied web browser to the same address?

what happens if you telnet to the machine? (make sure you telnet to the right port)

$ telnet somemachine someport
Trying 123.456.789...
Connected to somemachine.
Escape character is '^]'.
HELP
<html><head>
<title>501 Method Not Implemented</title>
</head><body>
<h1>Method Not Implemented</h1>
<p>HELP to / not supported.<br />
</p>
...

</F>

Jul 18 '05 #2
Have you left localhost/127.0.0.1 in the server command?
try replacing it with an empty string.

Jul 18 '05 #3
Thanks for the responses, you were both on the right track, I just
didn't provide enough of the right information. I solved the problem by
changing "localhost" in the server code to actually contain the name of
the machine, the same as it appears in our DNS. This enabled the client
to connect to the server immediately. It's not clear in the example
code that this is necessary, but it makes sense that the server
wouldn't be able to 'listen' to anything on "localhost" other than same
machine applications because they would all use the lo interface.
Thanks!
Doug

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Larry | last post by:
I've had a production system running for a long time that uses xmlrpclib with timeoutsocket, and with my recent upgrade to 2.3 it's no longer able to use xmlrpclib with the xmlrpc servers I...
0
by: sashan | last post by:
Hi I'm having trouble using xmlrpclib. I register a function (or class) with the SimpleXMLRPCServer and initiate the server. I then create a ServerProxy object and connect to the xml-rpc...
2
by: p2esp | last post by:
Hello, I'm using the xmlrpclib module to contact an XMLRPC server that takes a long time to send results back. My client timeouts. The question is whether there is a way to have an xmlrpclib...
1
by: Gabriel PASTOR | last post by:
I'm trying to send object using xmlrpclib, but it seems that classes inheriting from object cannot be marshalled. Here is an example: -------- server.py -------- import xmlrpclib,...
3
by: Rune Froysa | last post by:
Trying something like:: import xmlrpclib svr = xmlrpclib.Server("http://127.0.0.1:8000") svr.test("\x1btest") Failes on the server with:: xml.parsers.expat.ExpatError: not well-formed (invalid...
0
by: Willi Langenberger | last post by:
Hi! We have an application server (Zope) and make heavy use of xml-rpc. One problem arised, when we tried to return a zope.DateTime instance. xmlrpclib (naturally) knows nothing about...
5
by: Jonathan Ballet | last post by:
Hello, I have developped a XMLRPC server, which runs under Gnu/Linux with python2.3. This server receives method calls from Windows client. The server got some parameters which are string,...
2
by: squid | last post by:
First off, I'm a python neophyte, but I'm fairly experienced with Java, C and PHP. I've been trying to use the xmlrpclib to perform remote calls against a service, and it works nicely. However,...
0
by: Arno Stienen | last post by:
Perhaps I should be a bit more specific. When using this code to connect to a remote XML-RPC server (C++, xmlrpc++0.7 library): import xmlrpclib server =...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.