Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with CTS setup #15

Open
cars10 opened this issue Oct 18, 2021 · 3 comments
Open

Issues with CTS setup #15

cars10 opened this issue Oct 18, 2021 · 3 comments

Comments

@cars10
Copy link

cars10 commented Oct 18, 2021

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:

image

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:

image

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:

image

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!

@darshanhurix
Copy link

Hi Cars, I have setup local LRS and for me now its working.

Steps followed are

  1. Install mongodb ,
  2. Install Open Source LRS : Veracity
  3. You need to login to LRS and then create an XAPI Credentails which are to be used in env
  4. Change the env file of CATAPULT
    HOST_PORT=63398
    CONTENT_URL=http://localhost:63398/content
    API_KEY="apikey"
    API_SECRET="APIsecret"
    TOKEN_SECRET="asdasdasdasd"
    LRS_ENDPOINT="http://local.veracity.it/testlrs/xapi/"
    LRS_USERNAME="darshan"
    LRS_PASSWORD="password"
  5. Run docker compose command

@ysrn
Copy link

ysrn commented Nov 3, 2021

2. LRS_ENDPOINT .env example values

[...]
Changing this to LRS_ENDPOINT="http://player:3398/lrs/default/" (as i guess this is the xapi base uri?) also does not work:
[...]

This project doesn't come with an actual LRS. The local badly named "LRS" service is only a proxy between the player and a real LRS endpoint. As long as you provide an endpoint pointing to an actual LRS (any one of the free ones on the web will do), it should work.

The error messages don't really help here. I guess right now the project is mostly lacking documentation

Couldn't agree more.

@cars10
Copy link
Author

cars10 commented Nov 3, 2021

This project doesn't come with an actual LRS. The local badly named "LRS" service is only a proxy between the player and a real LRS endpoint.

Wow, talk about confusing documentation. Thanks for the clarification! This should really be fixed. Why would you name it "LRS" (in dhe docs, env and the images) if it is not an LRS.

Using an actual LRS will probably fix my issue then, i will check this later. Still does not solve the permission issues tough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants