Skip to content

6. Troubleshooting

Eli Holmes edited this page Dec 3, 2021 · 2 revisions

A diary of misery.

First off you need to be able to ssh into your instance to troubleshoot it.

  1. Open a terminal on your computer
  2. cd into the diretory where you saved the SSH tokens that you made for your instances (when setting up your first instance)
  3. Use this code to ssh in. Replace rs-workshop.cer with whatever you named your key. Replace ec2... with the similar public DNS address you see for your instance (on the EC2 instance dashboard)
ssh -i rs-workshop.cer ubuntu@ec2-34-214-164-213.us-west-2.compute.amazonaws.com

I filled up all the memory and now my hub is locked.

Ref this stackoverflow post

  1. From EC2 dashboard, go to the volume for your instance and make it bigger.
  2. ssh into the instance (see instructions above)
  3. Run df -h to verify that it's 100% full
  4. Run lsblk and find the device and partition that is not at the new bigger size. It'll be something like `\dev\x
  5. Create some space.

delete cache and unnecessary files

sudo apt-get autoclean
sudo apt-get autoremove

clear the tmp files

sudo mount -o size=10M,rw,nodev,nosuid -t tmpfs tmpfs /tmp
  1. Grow the partition sudo growpart /dev/xvda 1 Replace the device id (here \dev\xvda with your device id. The # at end is the partition that needs to grow.
  2. Resize sudo resize2fs /dev/xvda1
  3. Unmount sudo umount /tmp
  4. Reboot sudo reboot

You might still have to reboot from the AWS dashboard. 4.