LRS Endpoint never sees any api requests from logstore_xapi-plugin/moodle
Version
v4.7.0 (2022101800) on Moodle 4.2.1 (Build: 20230612)
Steps to reproduce the bug
Setup Plugin Config
Trigger Events to be sent to LRS
Expected behaviour
My LRS (Learning Locker) has a reverse proxy nginx. In its logs I can see every single request that is made to the api. When I curl http://learninglocker it logs GET / HTTP/1.1" 200 618 "-" "curl/7.74.0"
I expect there to be incoming requests whenever the logstore_xapi plugin attempts to send events to the LRS
Actual behaviour
There are no incoming requests to be logged
Cron log tells me "X event(s) have failed to send to the LRS."
Additional information
The obvious: Is this a problem with the Moodle version being more recent than what the plugin is specified to support?
First I needed to make sure my moodle-container (moodle-apache-php) can talk to the endpoint.
In the terminal of the moodle container I can curl the endpoint and get the expected response (HTML with "Cannot GET /data/xAPI") that I also get in my browser. When I do this, nginx registers a http request.
Then I go to the plugin config and type the exact same URL into the endpoint field. Whenever the cronjob executes it tells me "X event(s) have failed to send to the LRS." yet nginx does not register requests, not even bad/failed ones.
I tried to understand some of the source code of the plugin and saw it basically also just makes a request using curl
Thanks for any help
I found out there is a default curl blocked hosts list in moodle. Also only ports 80 and 443 are allowed by default. This took me wayy too long to figure out.
Description
Version
Steps to reproduce the bug
Expected behaviour
GET / HTTP/1.1" 200 618 "-" "curl/7.74.0"
Actual behaviour
Server information
Client information
Additional information The obvious: Is this a problem with the Moodle version being more recent than what the plugin is specified to support?
First I needed to make sure my moodle-container (moodle-apache-php) can talk to the endpoint. In the terminal of the moodle container I can curl the endpoint and get the expected response (HTML with "Cannot GET /data/xAPI") that I also get in my browser. When I do this, nginx registers a http request. Then I go to the plugin config and type the exact same URL into the endpoint field. Whenever the cronjob executes it tells me "X event(s) have failed to send to the LRS." yet nginx does not register requests, not even bad/failed ones. I tried to understand some of the source code of the plugin and saw it basically also just makes a request using curl Thanks for any help