Why the SDK can not find this plugin

Just to document the information Ellen was kind enough to provide to me, it looks like (somehow) the Docker image for SDK MySQL server got messed up. When she ran docker inspect openmrs-sdk-mysql-v3-2, it reported two mounts:

"Mounts": [
    {
        "Type": "volume",
        "Name": "7dab10d28a0b6b84a934b550f3565b82987b4d0b6a28e132a181f8409be4c771",
        "Source": "/var/lib/docker/volumes/7dab10d28a0b6b84a934b550f3565b82987b4d0b6a28e132a181f8409be4c771/_data",
        "Destination": "/var/lib/mysql",
        "Driver": "local",
        "Mode": "",
        "RW": true,
        "Propagation": ""
    },
    {
        "Type": "volume",
        "Name": "2a49060c829510be289e527317fb3c0ae59f6636e927c967429478561111f1e2",
        "Source": "/var/lib/docker/volumes/2a49060c829510be289e527317fb3c0ae59f6636e927c967429478561111f1e2/_data",
        "Destination": "openmrs-sdk-mysql-v3-2-data:/var/lib/mysql",
        "Driver": "local",
        "Mode": "",
        "RW": true,
        "Propagation": ""
    }
],

One of those (the first) is a correctly created anonymous mount for /var/lib/mysql (created because the image lists that directory as a volume). The other of which is a somehow messed-up version of the named volume the SDK tries to create (openmrs-sdk-mysql-v3-2-data) instead mounted as yet another anonymous volume. Since openmrs-sdk-mysql-v3-2-data:/var/lib/mysql is clearly not a valid file path, we get the error Ellen saw.

We were able to get Ellen running again by removing the existing SDK container (but not the volumes) using docker container rm openmrs-sdk-mysql-v3-2 and then creating a new container that used the “good” volume using this command:

docker run --name openmrs-sdk-mysql-v3-2 -e MYSQL_ROOT_PASSWORD=Admin123 -e MYSQL_USER=openmrs -e MYSQL_PASSWORD=Admin123 -p 3308:3306 --mount type=volume,source=7dab10d28a0b6b84a934b550f3565b82987b4d0b6a28e132a181f8409be4c771,destination=/var/lib/mysql --restart unless-stopped -d mysql:5.6 --character-set-server=utf8 --collation-server=utf8_unicode_ci

The important point of which is the --mount type=volume,source=<identifier for volume we want to keep>,destination=/var/lib/mysql which mounts the volume from the previously working container to the /var/lib/mysql directory of the new MySQL container.

1 Like