pgiri / dispy

Distributed and Parallel Computing Framework with / for Python
https://dispy.org
Other
260 stars 55 forks source link

Ignoring node $correct_node_ip due to "secret" mismatch #199

Closed odo2063 closed 4 years ago

odo2063 commented 4 years ago

Hi!

I get "Ignoring node $correct_node_ip due to "secret" mismatch"

at first I start the node in dockercontainer(network_mode: host) with /usr/local/bin/dispynode.py --clean

then I start dispyscheduler.py -n $correct_node_ip on my machine

then this:

def calcByDegree(degrees, radii):
    import dispy as dis
    cluster = dis.JobCluster(calcByRadius, depends=[pol2cart, calcByRadius])
    raster = []

    for deg in degrees:
        coordByDegree = []
        coordByDegree = cluster.submit(deg, radii)
        raster.append( coordByDegree )
    return raster

will be executed my main machine.

from python I get :

dispy - Port 61590 seems to be used by another program ...

and from the scheduler I get:

dispyscheduler - Ignoring node $correct_node_ip due to "secret" mismatch

What do I miss here?

dispyscheduler version 4.11.0 dispynode version: 4.11.0

odo2063 commented 4 years ago

same happens with following setup on my machine only:

dispynode.py --secret=geheim
dispyscheduler.py --node_secret geheim
cluster = dis.JobCluster(calcByRadius, depends=[pol2cart, calcByRadius], secret='geheim')
pgiri commented 4 years ago

With your setup, you need to specify cluster_secret with dispyscheduler, which, if you wish, can be different from node_secret. Or, you can drop secret= from JobCluster since you are not using cluster secret with dispyscheduler.

odo2063 commented 4 years ago

Same happens when i remove all "secrets"

dispynode.py
dispyscheduler.py
cluster = dis.JobCluster(calcByRadius, depends=[pol2cart, calcByRadius])
pgiri commented 4 years ago

With dispyscheduler, you need to use dispy.SharedJobCluster, instead of dispy.JobCluster.

If that doesn't work, try without dispyscheduler and make sure that Python version is same; it may be better to start with python3 dispynode.py and python3 client_prog.py etc.

odo2063 commented 4 years ago

OK, so just dispy.JobCluster plus dispynode.py it is...

dispy.SharedJobCluster, gives socket.gaierror: [Errno -2] Name or service not known....

Now i need to find out how to get my list[] instead of <dispy.DispyJob object at 0x7f0da4ca5228>...any hinds? edit: may i use multiprocessing.Manager() for the list?

pgiri commented 4 years ago

cluster.submit returns DispyJob instances. You can use them as functions to get the results, e.g., with job(), or once job is finished, with job.result. See sample.py and other examples in the package or in documentation.

odo2063 commented 4 years ago

just asking...could you provide sample_for_dummies.py with just send computation(e.g.x= i +i), store result on client x= some.result and print (x)?

odo2063 commented 4 years ago

ok...the example.py here is much more useful for noobs like me. I think i got it working. One last Question. If i use the "path attribute", can I put my modules, additional files in that directory on the client and it will just import the stuff?

odo2063 commented 4 years ago

close while no further awnser...