471,602 Members | 1,325 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,602 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 1238
"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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by sashan | last post: by
2 posts views Thread by p2esp | last post: by
1 post views Thread by Gabriel PASTOR | last post: by
3 posts views Thread by Rune Froysa | last post: by
reply views Thread by Willi Langenberger | last post: by
5 posts views Thread by Jonathan Ballet | last post: by
2 posts views Thread by squid | last post: by
reply views Thread by Arno Stienen | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

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.