Tutor for 2u/OCM: FAQs and Debugging

  • Issue: tutor dev quickstart fails with

    ERROR 2003 (HY000): Can't connect to MySQL server on 'mysql' (111) [10/10] Waiting for MySQL service (this may take a while)... MySQL initialisation error
    • This sometimes just goes away if you wait a minute and try again

  • Issue: tutor dev stop doesn’t actually stop anything

    • Check your container names with docker ps. They should be of the form tutor_nightly_dev_myservice.

      • If they do not have the nightly suffix, you may be accidentally running the latest tutor release instead of tutor-nightly. You can check this by running tutor config printroot. If you are running the nightly version, the directory name will be /some/thing/tutor-nightly. Otherwise it will just be /some/thing/tutor

      • If they say local instead of dev, run tutor local stop

  • tutor images build --no-cache all seems to still be using cached layers

    • try using tutor dev dc build --no-cache instead

  • Possible code mounting issue?

    • Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./manage.py": stat ./manage.py: no such file or directory: unknown
    • Came up any time a command that used docker-compose ‘run’ under the hood. (eg tutor dev run lms bash)

    • Resolved by just doing a tutor stop tutor start with no mount

  • ⚠️ The current environment stored at /Users/username/Library/Application Support/tutor/env is not up-to-date: ...

    • If you had been running tutor-nightly and installed a non-nightly release brach of a plugin it may have updated your tutor-nightly install to the latest named release.

    • you can check your tutor and plugin versions with pip list

    • re-installing the nightly branch of tutor should resolve this

  • ERROR: for cms Cannot start service cms: Ports are not available: listen tcp 0.0.0.0:8001: bind: address already in use

    • This often pops up if you have been running minikube or otherwise using kubectl

      • Sometimes minikube delete will fix it

    • lsof -i:8001 will show you what’s running there. you can use ps -ef | grep <process> to find the process id and kill it