# Issues with Tutor AMI

**URL:** <https://discuss.openedx.org/t/issues-with-tutor-ami/10468>\
**Category:** Site Operations Help\
**Tags:** tutor\
**Created:** [June 19, 2023, 3:53pm UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468 "2023-06-19T15:53:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![aas](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/aas/32/5417_2.png) [@aas](https://discuss.openedx.org/u/aas)\
**Post date:** [June 19, 2023, 3:53pm UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/1 "2023-06-19T15:53:29Z")

</div>

I ran into several issues after trying to get started with the Tutor AMI. I just want to report on my experience to get feedback about whether this is surprising or not since the documentation seems to suggest that I shouldn’t have had these problems. I’d also like to get some reassurance that things will be stable going forward, or suggestions for how I can either avoid problems in the future or recover from the problems I ran into without having to terminate the EC2 instance and start over again. Based on my experience so far, I’m a little worried about using this in production. Here’s a list of the issues I ran into:

### 4 GB RAM was not enough

- The build never got past the Django migrations.
- This is the free memory on EC2 after launching tutor:

```bash
tutor@ip-172-31-4-25:/root$ free -h
              total used free shared buff/cache available
Mem: 7.7Gi 3.6Gi 1.1Gi 2.0Mi 3.0Gi 3.6Gi
Swap: 0B 0B 0B

```

#### Questions

- Is it the case that 4 GB is sufficient to run tutor but not enough to build it?

### Default EBS volume size of 25 GB was not enough

> **20 GB storage was used up after the build**
>
> ```auto
> tutor@ip-172-31-4-25:/root$ df -H
> Filesystem Size Used Avail Use% Mounted on
> /dev/root 67G 20G 48G 30% /
> devtmpfs 4.2G 0 4.2G 0% /dev
> tmpfs 4.2G 0 4.2G 0% /dev/shm
> tmpfs 826M 2.0M 824M 1% /run
> tmpfs 5.3M 0 5.3M 0% /run/lock
> tmpfs 4.2G 0 4.2G 0% /sys/fs/cgroup
> /dev/loop0 59M 59M 0 100% /snap/core18/1885
> /dev/loop2 75M 75M 0 100% /snap/lxd/16922
> /dev/loop3 30M 30M 0 100% /snap/amazon-ssm-agent/2012
> /dev/loop4 59M 59M 0 100% /snap/core18/2785
> /dev/loop5 123M 123M 0 100% /snap/core/14946
> /dev/loop6 67M 67M 0 100% /snap/core20/1891
> /dev/loop7 27M 27M 0 100% /snap/amazon-ssm-agent/6563
> /dev/loop8 97M 97M 0 100% /snap/lxd/24061
> /dev/loop1 67M 67M 0 100% /snap/core20/1950
> tmpfs 826M 0 826M 0% /run/user/0
> tutor@ip-172-31-4-25:/root$ docker system df
> TYPE TOTAL ACTIVE SIZE RECLAIMABLE
> Images 43 12 10.13GB 3.716GB (36%)
> Containers 22 15 11.14MB 0B (0%)
> Local Volumes 6 6 2.444GB 0B (0%)
> Build Cache 0 0 0B 0B
> 
> ```

- This caused the site to become unavailable from a web browser. I also observed the following errors after accessing the EC2 instance via ssh:
  - `Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?`
  - `sudo: unable to resolve host ip-172-31-4-157: Temporary failure in name resolution`
  - `Job for docker.service failed because the control process exited with error code.`

This was the state after

- Doing an initial build
- Importing the demo course
- Trying to install the indigo theme and rebuild

### Solutions

After realizing that my failed deployments were due to inadequate memory and storage requirements, I took the following steps:

- I launched the AMI with a `t3a.large` instance (8 GB RAM)
- After that, I resized the EBS volume to 64 GB
  - This also required following this guide to extend the filesystem: [Extend the file system after resizing an Amazon EBS volume - Amazon EBS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html)
    - I’m not sure if there’s a better way to handle this. When launching the AMI, it doesn’t look like there’s a way to select the volume size. This is unfortunate because it seems like the default volume size is inadequate.

---

<div class="post-metadata">

**Author:** ![regis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/regis/32/2640_2.png) [@regis](https://discuss.openedx.org/u/regis)\
**Post date:** [June 20, 2023, 8:38am UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/2 "2023-06-20T08:38:35Z")

</div>

> [@aas](#):
>
> Is it the case that 4 GB is sufficient to run tutor but not enough to build it?

We would need to run some minimal hardward requirement tests again. It’s quite possible that more than 4GB is now required. Note that the recommended configuration to run the [Tutor AMI](https://aws.amazon.com/marketplace/pp/prodview-iji6gmbfbpi3o) is a t3a.large instance.  
Those 8GB of RAM should only be strictly required to run migrations. Thus, you should get along just fine by creating a swap file for cheap extra memory.

> [@aas](#):
>
> Default EBS volume size of 25 GB was not enough

Did you rebuild all images? You should only have to rebuild the openedx Docker image, which should use less disk space.

Extending the filesystem, like you did, was the right solution to your problem. Alternatively, you could have added an EBS when you launched your EC2 instance – though I agree it’s not obvious for new users.

---

<div class="post-metadata">

**Author:** ![aas](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/aas/32/5417_2.png) [@aas](https://discuss.openedx.org/u/aas)\
**Post date:** [June 23, 2023, 8:04pm UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/3 "2023-06-23T20:04:22Z")

</div>

Thanks so much for the response, @regis.

> [@regis](#):
>
> Did you rebuild all images? You should only have to rebuild the openedx Docker image, which should use less disk space.

I believe I ran `tutor images build openedx`, but I’m not totally sure.

It looks like everything has been fine since using `t3a.large` with a larger volume.

---

<div class="post-metadata">

**Author:** ![aas](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/aas/32/5417_2.png) [@aas](https://discuss.openedx.org/u/aas)\
**Post date:** [June 23, 2023, 9:23pm UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/4 "2023-06-23T21:23:03Z")

</div>

There are two other issues I noticed with the AMI.

- `tutor` was not up to date.  
I assumed that the docs were outdated because the available CLI commands did not much up with the docs. But it was `tutor` that was outdated.
- Docker and the Docker Compose Plugin were outdated.  
After noticing the first issue, I tried updating `tutor`, but ran into some of the issues mentioned in [Upgrading tutor to Palm](https://discuss.openedx.org/t/upgrading-tutor-to-palm/10194). Luckily, just upgrading `docker` and the compose plugin were sufficient to upgrade `tutor`.

---

<div class="post-metadata">

**Author:** ![regis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/regis/32/2640_2.png) [@regis](https://discuss.openedx.org/u/regis)\
**Post date:** [September 11, 2023, 8:00am UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/5 "2023-09-11T08:00:18Z")

</div>

Sorry for my very late response. I was absolutely convinced that v16.0.0 had been released to the marketplace, but it turns out that my request was rejected because of a security issue in Ubuntu 22.04. I do not believe I received any notification whatsoever about that, so I assumed that the new version had been published and forgot about it. I’ll publish 16.1.1 ASAP.

---

<div class="post-metadata">

**Author:** ![kst](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/kst/32/6188_2.png) [@kst](https://discuss.openedx.org/u/kst)\
**Post date:** [November 21, 2023, 8:39pm UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/6 "2023-11-21T20:39:38Z")

</div>

My issue with installing the Tutor AMI is that there is no “Choose Action” heading with a “Launch from Website” option that I can choose. If there is one, I can’t find it. And because of that, I can’t seem to launch the website even after setting up the DNS records.

---

<div class="post-metadata">

**Author:** ![Biomechman](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/biomechman/32/6220_2.png) [@Biomechman](https://discuss.openedx.org/u/Biomechman)\
**Post date:** [November 29, 2023, 5:07am UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/7 "2023-11-29T05:07:36Z")

</div>

I am having this exact same issue while following the tutorial on YouTube.

---

<div class="post-metadata">

**Author:** ![kst](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/kst/32/6188_2.png) [@kst](https://discuss.openedx.org/u/kst)\
**Post date:** [December 2, 2023, 8:02pm UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/8 "2023-12-02T20:02:03Z")

</div>

I ended up creating a whole new fake gmail account, used that to set up a new AWS Console account, followed the directions and got an instance up. I’m using the current fake one as a proof of concept for my managers but eventually will need to go back our production account and I will not be able to set up the Tutor AMI over there bc only the first attempt gives you the right options.

---

<div class="post-metadata">

**Author:** ![kst](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/kst/32/6188_2.png) [@kst](https://discuss.openedx.org/u/kst)\
**Post date:** [December 7, 2023, 11:19pm UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/9 "2023-12-07T23:19:26Z")

</div>

I figured out that I needed to delete my AWS AMI Subscription in order to start over. Once I did that, I had access to the Launch page again and was able to get a new instance up and running.

Two modifications to the otherwise excellent video:

At [5:22] - Don’t type [local quickstart] , type [local launch] (then return to following the video)  
At [8:31] - Don’t type [local createuser], type [local do createuser] (then add the --superuser and other text as shown.)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/e/e0015f89e879bc75925b71fd11133ab15fe98297.png) [@system](https://discuss.openedx.org/u/system)\
**Post date:** [March 6, 2024, 11:19pm UTC](https://discuss.openedx.org/t/issues-with-tutor-ami/10468/10 "2024-03-06T23:19:34Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
