python - Multiprocessing Remote Server and Socket Errors -


i'm using multiprocessing module create remote queue , i'm getting socket error: "[errno 10061] no connection made because target machine actively refused it"

my server code basic:

from multiprocessing.managers import basemanager import queue queue = queue.queue() class queuemanager(basemanager): pass queuemanager.register('get_queue', callable=lambda:queue) m = queuemanager(address=('127.0.0.1', 50000), authkey='test') s = m.get_server() s.serve_forever() 

all need server hold job, , pass let workers query queue , pull jobs process.

my client accessing machine such put job queue:

import uuid multiprocessing.managers import basemanager class queuemanager(basemanager): pass queuemanager.register('get_queue') m = queuemanager(address=('machine ip', 50000), authkey='test') m.connect() queue = m.get_queue() queue.put(r"%s" % uuid.uuid4().get_hex()) queue.put(r%s" % uuid.uuid4().get_hex()) 

it call get() item in queue.

when try access remote queue, following error: "[errno 10061] no connection made because target machine actively refused it" mentioned above. if run code on same machine works fine, when distribute among many machine, clients cannot hit server.

i can ping machine fine, first thought disable firewall. did still socket error.

i'm using right windows 7 development.

any suggestions?

your server code listening on loopback network interface 127.0.0.1. interface not available external networks such attached ethernet interface.

if want access server network interface, use empty host name in server.

m = queuemanager(address=('', 50000), authkey='test') 

Comments