I am using Python 2.6 and trying to start a manager for a given port and authkey
import multiprocessing
from multiprocessing.managers import SyncManager
def make_server_manager(port, authkey):
# ...
class JobQueueManager(SyncManager):
pass
# ...
manager = JobQueueManager(address=("127.0.0.1", port), authkey=authkey)
manager.start()
return manager
But I am getting the error message:
[hue@sandbox ~]$ python ####.py 5000 abc
Process JobQueueManager-1:
Traceback (most recent call last):
File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
self.run()
File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib64/python2.6/multiprocessing/managers.py", line 517, in _run_server
server = cls._Server(registry, address, authkey, serializer)
File "/usr/lib64/python2.6/multiprocessing/managers.py", line 136, in __init__
self.listener = Listener(address=address, backlog=5)
File "/usr/lib64/python2.6/multiprocessing/connection.py", line 106, in __init__
self._listener = SocketListener(address, family, backlog)
File "/usr/lib64/python2.6/multiprocessing/connection.py", line 227, in __init__
self._socket.bind(address)
File "<string>", line 1, in bind
TypeError: an integer is required
Traceback (most recent call last):
...
manager = make_server_manager(PORTNUM, AUTHKEY)
File "####.py", line 145, in make_server_manager
manager.start()
File "/usr/lib64/python2.6/multiprocessing/managers.py", line 499, in start
self._address = reader.recv()
EOFError
Can somebody suggest what to input in the address? It seems it is failing while trying to bind to the address. As the error suggests, how can the address be an integer? Or is it with the port 5000 that I have given at runtime?
A thread on multiprocessing with similar inputs are given for reference: