473,287 Members | 1,643 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,287 software developers and data experts.

Failure to connect in SimpleXMLRPCServer/xmlrpclib

iu2

Hi all,

I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC ("localhost") (I use
Windows)
it worked ok. But putting the server on a different PC raised the
error:

gaierror: (11001, 'getaddrinfo failed')
The error was raised upion accessing some function of the server,
i.e.,
print s.add_nums(1, 2, 3) # server registered function

PCs in our organization are accessed by "\\<name>" so I used

s = xmlrpclib.Server(r'http://\\pc_name:8000')
I got the same error when I put some non-existing name.
Trying to remove the double-backslash from the PC's name raised the
error:
error: (10061, 'Connection refused')

I'll appreciate your help on this.

Thanks
iu2

Oct 22 '07 #1
5 3901
iu2 wrote:
>
Hi all,

I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC ("localhost") (I use
Windows)
it worked ok. But putting the server on a different PC raised the
error:

gaierror: (11001, 'getaddrinfo failed')
The error was raised upion accessing some function of the server,
i.e.,
print s.add_nums(1, 2, 3) # server registered function

PCs in our organization are accessed by "\\<name>" so I used

s = xmlrpclib.Server(r'http://\\pc_name:8000')
I got the same error when I put some non-existing name.
Trying to remove the double-backslash from the PC's name raised the
error:
error: (10061, 'Connection refused')

I'll appreciate your help on this.
Maybe using the IP-address helps?

Diez
Oct 22 '07 #2
iu2
On Oct 22, 10:21 am, "Diez B. Roggisch" <de...@nospam.web.dewrote:
iu2 wrote:
Hi all,
I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC ("localhost") (I use
Windows)
it worked ok. But putting the server on a different PC raised the
error:
gaierror: (11001, 'getaddrinfo failed')
The error was raised upion accessing some function of the server,
i.e.,
print s.add_nums(1, 2, 3) # server registered function
PCs in our organization are accessed by "\\<name>" so I used
s = xmlrpclib.Server(r'http://\\pc_name:8000')
I got the same error when I put some non-existing name.
Trying to remove the double-backslash from the PC's name raised the
error:
error: (10061, 'Connection refused')
I'll appreciate your help on this.

Maybe using the IP-address helps?

Diez- Hide quoted text -

- Show quoted text -
No, that doesn't help either.
May be I don't use it right.
I tried "http://1.2.3.4:8000"
and
r"http://\\1.2.3.4:8000"

with no success.

Oct 22 '07 #3
>Maybe using the IP-address helps?
>>
Diez- Hide quoted text -

- Show quoted text -

No, that doesn't help either.
May be I don't use it right.
I tried "http://1.2.3.4:8000"
and
r"http://\\1.2.3.4:8000"

with no success.
The former should work. The latter is Windows-name-style and has nothing to
do here.

I'm not a windows-user, but there should be ways to determine which program
listens to which port on a machine.

And a common problem is that servers listen on 127.0.0.1 instead of the
ethernet interface.

Try putting the server's IP as argument to the listening XMLRPC-server, and
check with the windows-netstat-equivalent if it works out.

Diez
Oct 22 '07 #4
iu2 wrote:
Hi all,

I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC ("localhost") (I use
Windows)
it worked ok. But putting the server on a different PC raised the
error:

gaierror: (11001, 'getaddrinfo failed')
The error was raised upion accessing some function of the server,
i.e.,
print s.add_nums(1, 2, 3) # server registered function

PCs in our organization are accessed by "\\<name>" so I used

s = xmlrpclib.Server(r'http://\\pc_name:8000')
I got the same error when I put some non-existing name.
Trying to remove the double-backslash from the PC's name raised the
error:
error: (10061, 'Connection refused')

I'll appreciate your help on this.

Thanks
iu2

Don't use the \\. That's a windows networking convention, and it does
not apply if you are using http. Your error messages tell you this.
The first one (r'http://\\pc_name:8000') could not resolve the address.
The second one reached the server just fine, but the server rejected the
client's request. So now the issue is why is the request being
rejected? Did you check your firewall to see if it is blocking access
to port 8000 on the ethernet adapter?

Cheers,
Cliff
Oct 22 '07 #5
iu2
On Oct 22, 12:47 pm, "J. Cliff Dyer" <j...@sdf.lonestar.orgwrote:
iu2 wrote:
Hi all,
I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC ("localhost") (I use
Windows)
it worked ok. But putting the server on a different PC raised the
error:
gaierror: (11001, 'getaddrinfo failed')
The error was raised upion accessing some function of the server,
i.e.,
print s.add_nums(1, 2, 3) # server registered function
PCs in our organization are accessed by "\\<name>" so I used
s = xmlrpclib.Server(r'http://\\pc_name:8000')
I got the same error when I put some non-existing name.
Trying to remove the double-backslash from the PC's name raised the
error:
error: (10061, 'Connection refused')
I'll appreciate your help on this.
Thanks
iu2

Don't use the \\. That's a windows networking convention, and it does
not apply if you are using http. Your error messages tell you this.
The first one (r'http://\\pc_name:8000') could not resolve the address.
The second one reached the server just fine, but the server rejected the
client's request. So now the issue is why is the request being
rejected? Did you check your firewall to see if it is blocking access
to port 8000 on the ethernet adapter?

Cheers,
Cliff- Hide quoted text -

- Show quoted text -
Cliff and Diez, thanks. That helped. The server indeed was listening
on 127.0.0.1. I changed the hostname from "localhost" to
socket.gethostname() and it worked!

Oct 22 '07 #6

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: danu kusmana | last post by:
Hi Im trying to figure out why the same server script I use is running slower in Windows than in Linux. ServerTest.py: #! /usr/bin/env python import SocketServer
2
by: Skip Montanaro | last post by:
I decided to use SimpleXMLRPCServer for an xml-rpc server. As I understand it, if I register an instance like so: myserver.register_instance(MyStuff()) then it will call...
3
by: Daniel Crespo | last post by:
Hello, Does anyone know which methods do I have to override for allowing Nones to be accepted and sended from SimpleXMLRPCServer to the client? Thanks Daniel
2
by: Laszlo Nagy | last post by:
Hello, I ran in the same problem again. Many others have the same problem. Just Google for this: "SimpleXMLRPCServer allow_none site:python.org". Looks like the 'allow_none' patch was commited...
0
by: Rudy Schockaert | last post by:
After some Googling I found a post of someone who wanted to do exactly as what I want to do now. There is however a problem in his code that makes the service fails after the first connection. I...
3
by: Achim Domma | last post by:
Hi, is SimpleXMLRPCServer multithreaded or how does it handle multiple clients? I want to implement a simple server which will be queried by multiple processes for work to be done. The server...
3
by: Sean DiZazzo | last post by:
Why is the following not working? Is there any way to get keyword arguments working with exposed XMLRPC functions? ~~~~~~~~~~~~~~~~ server.py import SocketServer from SimpleXMLRPCServer import...
0
by: Russell Warren | last post by:
I'm running python 2.5.1 and it seems that SimpleXmlRpcServer is not setup to support the base datetime module in the same way xmlrpclib has been with "use_datetime". I see that someone (Virgil...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
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
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.