# Ray quick start demo not working on AWS

**URL:** <https://discuss.ray.io/t/ray-quick-start-demo-not-working-on-aws/6697>\
**Category:** Ray Clusters\
**Created:** [July 1, 2022, 7:36pm UTC](https://discuss.ray.io/t/ray-quick-start-demo-not-working-on-aws/6697 "2022-07-01T19:36:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwikibm](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@cwikibm](https://discuss.ray.io/u/cwikibm)\
**Post date:** [July 1, 2022, 7:36pm UTC](https://discuss.ray.io/t/ray-quick-start-demo-not-working-on-aws/6697/1 "2022-07-01T19:36:42Z")

</div>

I am trying to deploy ray demo on AWS from my MAC as described here: [https://docs.ray.io/en/latest/cluster/quickstart.html](https://docs.ray.io/en/latest/cluster/quickstart.html)

I ran: ray up -y config.yaml to deploy ray cluster on AWS. I can ssh to the head node and see ray processes:

netstat -lntp

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name  
tcp 0 0 127.0.0.53:53 0.0.0.0:\* LISTEN -  
tcp 0 0 0.0.0.0:22 0.0.0.0:\* LISTEN -  
tcp 0 0 0.0.0.0:44217 0.0.0.0:\* LISTEN 3611/python  
tcp 0 0 0.0.0.0:111 0.0.0.0:\* LISTEN -  
tcp6 0 0 :::22 :::\* LISTEN -  
tcp6 0 0 :::6379 :::\* LISTEN 3594/gcs\_server  
tcp6 0 0 :::111 :::\* LISTEN -  
tcp6 0 0 :::10001 :::\* LISTEN 3618/python

Per demo instructions I’ve changed script.py to use  
import ray  
ray.init(address=‘auto’)

However when I run: ray submit config.yaml script.py, I get an error

2022-07-01 13:44:29,385 INFO util.py:335 – setting max workers for head node type to 0  
2022-07-01 13:44:29,385 INFO util.py:339 – setting max workers for ray.worker.default to 2  
Loaded cached provider configuration  
If you experience issues with the cloud provider, try re-running the command with --no-config-cache.  
Fetched IP: xx.xx.xx.xx  
2022-07-01 13:44:31,274 INFO util.py:335 – setting max workers for head node type to 0  
2022-07-01 13:44:31,274 INFO util.py:339 – setting max workers for ray.worker.default to 2  
Fetched IP: xx.xx.xx.xx  
Traceback (most recent call last):  
File “/home/ubuntu/script.py”, line 7, in   
ray.init(address=‘auto’)  
File “/home/ubuntu/anaconda3/envs/tensorflow2\_latest\_p37/lib/python3.7/site-packages/ray/\_private/client\_mode\_hook.py”, line 105, in wrapper  
return func(\*args, \*\*kwargs)  
File “/home/ubuntu/anaconda3/envs/tensorflow2\_latest\_p37/lib/python3.7/site-packages/ray/\_private/worker.py”, line 1278, in init  
bootstrap\_address = services.canonicalize\_bootstrap\_address(address)  
File “/home/ubuntu/anaconda3/envs/tensorflow2\_latest\_p37/lib/python3.7/site-packages/ray/\_private/services.py”, line 459, in canonicalize\_bootstrap\_address  
addr = get\_ray\_address\_from\_environment()  
File “/home/ubuntu/anaconda3/envs/tensorflow2\_latest\_p37/lib/python3.7/site-packages/ray/\_private/services.py”, line 358, in get\_ray\_address\_from\_environment  
addr = \_find\_gcs\_address\_or\_die()  
File “/home/ubuntu/anaconda3/envs/tensorflow2\_latest\_p37/lib/python3.7/site-packages/ray/\_private/services.py”, line 341, in \_find\_gcs\_address\_or\_die  
"Could not find any running Ray instance. "  
ConnectionError: Could not find any running Ray instance. Please specify the one to connect to by setting `--address` flag or `RAY_ADDRESS` environment variable.  
Shared connection to xx.xx.xx.xx closed.

Trying to address the above error I’ve modified script.py to use  
ray.init(address=‘ray://xx.xx.xx.xx:10001’), where xx.xx.xx.xx=head node ip

That change produces a different error:  
File “/home/ubuntu/anaconda3/envs/tensorflow2\_latest\_p37/lib/python3.7/site-packages/ray/util/client/worker.py”, line 260, in \_connect\_channel  
raise ConnectionError(“ray client connection timeout”)  
ConnectionError: ray client connection timeout

The original source for script.py:

from collections import Counter  
import socket  
import time

import ray

ray.init(address=‘auto’)

print(‘’‘This cluster consists of  
{} nodes in total  
{} CPU resources in total  
‘’’.format(len(ray.nodes()), ray.cluster\_resources()[‘CPU’]))

@ray.remote  
def f():  
time.sleep(0.001)  
# Return IP address.  
return socket.gethostbyname(socket.gethostname())

object\_ids = [f.remote() for \_ in range(10000)]  
ip\_addresses = ray.get(object\_ids)

print(‘Tasks executed’)  
for ip\_address, num\_tasks in Counter(ip\_addresses).items():  
print(’ {} tasks on {}'.format(num\_tasks, ip\_address))

* * *

cluster config file:

# An unique identifier for the head node and workers of this cluster.

cluster\_name: minimal

# Cloud-provider specific configuration.

provider:  
type: aws  
region: us-east-1

Any ideas how to get this demo running on AWS?

Thanks  
Jerry

---

<div class="post-metadata">

**Author:** ![Dmitri](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dmitri/32/657_2.png) [@Dmitri](https://discuss.ray.io/u/Dmitri)\
**Post date:** [July 6, 2022, 5:04pm UTC](https://discuss.ray.io/t/ray-quick-start-demo-not-working-on-aws/6697/2 "2022-07-06T17:04:52Z")

</div>

We’ve noted the bug and will look into it early next week.

---

<div class="post-metadata">

**Author:** ![Dmitri](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dmitri/32/657_2.png) [@Dmitri](https://discuss.ray.io/u/Dmitri)\
**Post date:** [July 7, 2022, 9:02pm UTC](https://discuss.ray.io/t/ray-quick-start-demo-not-working-on-aws/6697/3 "2022-07-07T21:02:45Z")

</div>

Let’s continue the discussion on GitHub. Feel free to add additional details there.

> <https://github.com/ray-project/ray/issues/26368>
>
> \### What happened + What you expected to happen
> 
> The AWS quickstart example appe…ars not to work. Assignees to fill in the details.
> See the discussion here:
> https://discuss.ray.io/t/ray-quick-start-demo-not-working-on-aws/6697 
> 
> \### Versions / Dependencies
> 
> Ray master?
> 
> \### Reproduction script
> 
> \`ray up aws/example-minimal.yaml\`
> 
> \### Issue Severity
> 
> High: It blocks me from completing my task.
