Hi, we have some issues with the CTS, maybe you can help us with some.
1. Permission issues after initial setup
We start from a completely clean system:
cd cts
sudo rm -rf var
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker system prune --all --force --volumes
Build the CTS as explained in the README:
# create .env file with the example content from the readme, then
docker-compose up --build -d
Then:
- open
http://localhost:63399/
- create a user
- login with the user
- Go to
New Course
and upload a file
=> This fails:
Failed to import course: Error: Request failed: Failed request to player import: An internal server error occurred (Failed to create course content directory (/usr/src/app/plugins/routes/v1/../../../var/content/1/3): Error: EACCES: permission denied, mkdir '/usr/src/app/plugins/routes/v1/../../../var/content/1/3') (400)
We currently manually fix it like this:
docker-compose down
docker-compose run --rm -u root player chown -R node:node var
docker-compose up -d
Guess this should be fixed in the repo by adjusting the volumes.
2. LRS_ENDPOINT .env example values
Using the provided LRS_ENDPOINT="http://host.docker.internal:8081/20.1.x/lrs/default/"
does not work on linux as this is windows only:
Failed to load learner preferences: Error: Request failed: An internal server error occurred (500 - Failed to request learner preferences from player (500): An internal server error occurred (Failed request to retrieve learner preferences: Error: Client request error: getaddrinfo ENOTFOUND host.docker.internal))
But as you are using docker-compose anyway we should be able to simply use docker-compose networking like this: LRS_ENDPOINT="http://player:3398"
but this also fails when we try to test any content:
Failed to create session: Error: Request failed: An internal server error occurred (500 - Failed to retrieve AU launch URL from player (500): An internal server error occurred (Failed to store LMS.LaunchData state document (404): [object Object]))
Changing this to LRS_ENDPOINT="http://player:3398/lrs/default/"
(as i guess this is the xapi base uri?) also does not work:
Failed to load learner preferences: Error: Request failed: An internal server error occurred (500 - Failed to request learner preferences from player (500): An internal server error occurred (Failed to retrieve learner preferences (401): [object Object]))
The error messages don't really help here. I guess right now the project is mostly lacking documentation (e.g. what are the routes of the player
? where even is the lrs xapi base endpoint?) and logging. All projects do not have any request/error logging at all (besides the startup messages visible via docker logs
) so debugging is really impossible right now.
Thanks!