473,241 Members | 1,558 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,241 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 1287
"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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.