title: Ray cluster launch with yaml aws AttributeError: 'Worker' object has no attribute 'worker_id'
body: <p>I cant figure out where this is coming from, or why this error is occurring:</p>
  <p>the cluster launches fine with the yaml but when I look into the logs there is this error.</p>
  <p>is it working still despite the error? how do I check the print out from my docker image?</p>
  <p>Ray does not seem to have any &quot;working &quot; examples to follow. I am trying to launch the simplest version of an aws docker cluster launch possible for a proof of principle.</p>
  <pre><code> ray exec /home/user/unit/aws_docker_simple/simple.yaml 'tail -n 100 -f /tmp/ray/session_latest/logs/monitor*'
  
  Fetched IP: xxxxxxxxx
  Warning: Permanently added 'xxxxxxxxx' (ECDSA) to the list of known hosts.
  ==&gt; /tmp/ray/session_latest/logs/monitor.err &lt;==
  Error in sys.excepthook:
  Traceback (most recent call last):
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/worker.py&quot;, line 854, in custom_excepthook
      worker_id = global_worker.worker_id
  AttributeError: 'Worker' object has no attribute 'worker_id'
  
  Original exception was:
  Traceback (most recent call last):
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/monitor.py&quot;, line 390, in &lt;module&gt;
      redis_password=args.redis_password)
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/monitor.py&quot;, line 111, in __init__
      self.load_metrics)
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/autoscaler/_private/autoscaler.py&quot;, line 76, in __init__
      self.reset(errors_fatal=True)
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/autoscaler/_private/autoscaler.py&quot;, line 490, in reset
      raise e
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/autoscaler/_private/autoscaler.py&quot;, line 452, in reset
      self.available_node_types = self.config[&quot;available_node_types&quot;]
  KeyError: 'available_node_types'
  
  ==&gt; /tmp/ray/session_latest/logs/monitor.log &lt;==
  
  ==&gt; /tmp/ray/session_latest/logs/monitor.out &lt;==
  Shared connection to 18.130.107.42 closed.
  Error: Command failed:
  
    ssh -tt -i /home/joe/.ssh/aws_ubuntu_test.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ExitOnForwardFailure=yes -o ServerAliveInterval=5 -o ServerAliveCountMax=3 -o ControlMaster=auto -o ControlPath=/tmp/ray_ssh_8ff32489f9/8dbdda48fb/%C -o ControlPersist=10s -o ConnectTimeout=120s ubuntu@xxxxxxxx bash --login -c -i ''&quot;'&quot;'true &amp;&amp; source ~/.bashrc &amp;&amp; export OMP_NUM_THREADS=1 PYTHONWARNINGS=ignore &amp;&amp; (docker exec -it  my_simple_docker_container /bin/bash -c '&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'bash --login -c -i '&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'true &amp;&amp; source ~/.bashrc &amp;&amp; export OMP_NUM_THREADS=1 PYTHONWARNINGS=ignore &amp;&amp; (tail -n 100 -f /tmp/ray/session_latest/logs/monitor*)'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;''&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;' )'&quot;'&quot;''
  
  (base) xxxxx:~/RAY_AWS_DOCKER/3xxxxx/aws_docker_simple$  ray exec /home/xxxxxxxxx/unit/aws_docker_simple/simple.yaml 'tail -n 100 -f /tmp/ray/session_latest/logs/monitor*'
  Loaded cached provider configuration
  If you experience issues with the cloud provider, try re-running the command with --no-config-cache.
  Fetched IP: xxxxxx
  Warning: Permanently added 'xxxxxxxx' (ECDSA) to the list of known hosts.
  
  
  
  ==&gt; /tmp/ray/session_latest/logs/monitor.err &lt;==
  Error in sys.excepthook:
  Traceback (most recent call last):
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/worker.py&quot;, line 854, in custom_excepthook
      worker_id = global_worker.worker_id
  AttributeError: 'Worker' object has no attribute 'worker_id'
  
  Original exception was:
  Traceback (most recent call last):
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/monitor.py&quot;, line 390, in &lt;module&gt;
      redis_password=args.redis_password)
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/monitor.py&quot;, line 111, in __init__
      self.load_metrics)
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/autoscaler/_private/autoscaler.py&quot;, line 76, in __init__
      self.reset(errors_fatal=True)
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/autoscaler/_private/autoscaler.py&quot;, line 490, in reset
      raise e
    File &quot;/opt/conda/lib/python3.7/site-packages/ray/autoscaler/_private/autoscaler.py&quot;, line 452, in reset
      self.available_node_types = self.config[&quot;available_node_types&quot;]
  KeyError: 'available_node_types'
  </code></pre>
  <p>Dockerfile:</p>
  <pre><code>FROM continuumio/miniconda3:4.7.10
  CMD [&quot;mkdir&quot;, &quot;hello_folder&quot;]
  CMD [&quot;echo&quot;, &quot;Hello StackOverflow!&quot;]
  </code></pre>
  <p>yaml:</p>
  <pre><code>cluster_name: simple
  
  min_workers: 0
  
  max_workers: 2
  
  docker:
      image: &quot;xxxxxx/simple &quot;
      container_name: &quot;my_simple_docker_container&quot;
      pull_before_run: True
  
  idle_timeout_minutes: 5
  
  initialization_commands:
  
  #    - curl https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh --output anaconda.sh
  #    - bash anaconda.sh
  #    - conda install python=3.8
  
      - sudo apt-get update
      - sudo apt-get upgrade
      - sudo apt-get install -y python-setuptools
      - sudo apt-get install -y build-essential curl unzip psmisc
      - pip install --upgrade pip
      - pip install discord
  
      - curl -fsSL https://get.docker.com -o get-docker.sh
      - sudo sh get-docker.sh
      - sudo usermod -aG docker $USER
      - sudo systemctl restart docker -f
  
  
  provider:
      type: aws
      region: eu-west-2
      availability_zone: eu-west-2a
  
  file_mounts_sync_continuously: False
  
  
  
  auth:
      ssh_user: ubuntu
      ssh_private_key: /home/user/.ssh/aws_ubuntu_test.pem
  head_node:
      InstanceType: c5.2xlarge
      ImageId: ami-xxxxxxxxfd2c
      KeyName: aws_ubuntu_test
  
      BlockDeviceMappings:
        - DeviceName: /dev/sda1
          Ebs:
            VolumeSize: 200
  
  worker_nodes:
     InstanceType: c5.2xlarge
     ImageId: ami-xxxxxxxxfd2c
     KeyName: aws_ubuntu_test
     InstanceMarketOptions:
          MarketType: spot
  
  file_mounts: {
  #    &quot;/path1/on/remote/machine&quot;: &quot;/path1/on/local/machine&quot;,
  #    &quot;/path2/on/remote/machine&quot;: &quot;/path2/on/local/machine&quot;,
  }
  
  setup_commands:
      - conda install python=3.7
      - conda create --name ray
      - conda activate ray
      - conda install --name ray pip
      - pip install --upgrade pip
      - pip install discord
      - pip install ray
  
  head_setup_commands:
      - pip install boto3==1.4.8
  
  worker_setup_commands:  []
  
  head_start_ray_commands:
      - ray stop
      - ulimit -n 65536; ray start --head --port=6379 --object-manager-port=8076 --autoscaling-config=~/ray_bootstrap_config.yaml
  
  worker_start_ray_commands:
      - ray stop
      - ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076
  </code></pre>