0

I'm trying to use dispy to distribute work to ec2 instances.

I've followed:

Using dispy with port forwarding via ssh tunnel

http://dispy.sourceforge.net/dispy.html#cloud

but it's not going anywhere, the client script is hung and the server node doesn't receive anything .

what i have right now is:

from my machine:

ssh -i mypemfile.pem -R 51347:localhost:51347 ubuntu@ec2-52-30-185-175.eu-west-1.compute.amazonaws.com

then on remote machine:

sudo dispynode.py --ext_ip_addr ec2-52-30-185-175.eu-west-1.compute.amazonaws.com -d

and i get:

2016-02-03 18:38:39,410 - dispynode - dispynode version 4.6.7
2016-02-03 18:38:39,414 - asyncoro - poller: epoll
2016-02-03 18:38:39,417 - dispynode - serving 1 cpus at 172.31.26.18:51348
2016-02-03 18:38:39,417 - dispynode - tcp server at 172.31.26.18:51348
2016-02-03 18:38:39,422 - asyncoro - waiting for 2 coroutines to terminate
Enter "quit" or "exit" to terminate dispynode,
  "stop" to stop service, "start" to restart service,
  "cpus" to change CPUs used, anything else to get status:

on the client machine i run:

import dispy
def f(x):
    return 2*x
cluster = dispy.JobCluster(f,nodes=['ec2-52-30-185-175.eu-west-1.compute.amazonaws.com'],ext_ip_addr='localhost')
job = cluster.submit(2)
print('result: %s' % job())

and nothing happens, it's just stuck. thanks

Community
  • 1
  • 1
OMRY VOLK
  • 1,429
  • 11
  • 24
  • You may need to add a "Security Group" to open inbound ports 51347-51349 (default ports used by dispy) and use that security group when using dispy. – Giridhar Pemmasani Feb 06 '16 at 13:50
  • tried it and it didn't help, thanks anyway – OMRY VOLK Feb 08 '16 at 20:05
  • 1
    This forum may not be appropriate to continue this discussion, so edit/delete my comment if so. Are the IP address and host name above correct? I tested the example and it worked for me. I updated dispy cloud section with more details that may help. – Giridhar Pemmasani Feb 10 '16 at 04:40

0 Answers0