moodlehu / moodle-mod_etherpadlite

This is a moodle plugin for etherpadlite, developed at the Humboldt Universität zu Berlin
20 stars 27 forks source link

Etherpad-lite integration crashes after working breafly #43

Open KepaUrzelai opened 3 years ago

KepaUrzelai commented 3 years ago

Hello,

I'm experiencing the following behaviour with the Etherpad-lite integration I configured for my Moodle:

After configuring the needed settings for the integration, it works as expected. Users with permissions can create new Etherpad activities and access to the resulting pads, but after few minutes (normally less than two hours) the result of creating a new module or accessing one previously created is a pad with the message: "You don't have permission to access this pad". After that, I can't access the old pads through the Etherpad-lite service admin page either (using the adminpads2 plugin).

I use NGINX, and Etherpad-lite (1.8.6 v) is accessed via HTTPS, which results in a correct functioning of the service; with the following non-default settings:

"requireSession": true,

"editOnly": true,

"abiword": "/usr/bin/abiword",

"trustProxy": true,

"cookie": {
  "sameSite": "None"
 },

In Moodle (3.10 v) settings, using example data for the explanation, I set the Cookie Domain to .example.com as my etherpad runs on the domain etherpad.example.com and my Moodle site on moodle.example.com/.

Once the integration crashes, there are not visible errors, not in the etherpad service logs nor in the nginx logs. The only weird thing is that in the nginx access log the first GET requests the /p/0 pad insted of the one with the name formed by: groupID$Padname for all instances.

Do you have any clue on where the error can be?

Thanks a lot.

Kepa

grabs commented 3 years ago

@KepaUrzelai thank you for reporting this. Once a etherpad instance is built in moodle a pad-id is created and stored in the database in _etherpadlite in the field "uri". Could you do the following steps?

  1. Create a new etherpadlite instance
  2. If this is working have a look in the database table and check whether or not a record exists and a uri is set.
  3. Wait till the etherpad isn't working anymore like your description.
  4. Check the database table again whether or not the record exists and a uri is set.

Best regards Andreas

KepaUrzelai commented 3 years ago

Good morning @grabs, and thanks for your fast reply!

When the integration is working, a record is generated by every new Etherpad instance that I create (with the correct uri).

After, when the integration crashes, every new instance that I try to create is recorded in the database also, but with value "0" in the uri. The resulting pad shows the "You don't have permission to access this pad" message.

I have noticed that changing the following setting I don't get that error, but the resulting pad is always the same (id: 0): "editOnly": false

I am very thankfull for your help. Kepa