learnweb / moodle-mod_collabora

:memo: :globe_with_meridians: An activity for live document editing in Moodle, powered by Collabora Online
GNU General Public License v3.0
8 stars 8 forks source link

Not working with Collabora/LOOL 7.x #23

Closed mmaridev closed 3 years ago

mmaridev commented 3 years ago

Currently testing with version 7.0 and apparently not working.

That's the log from Docker:

wsd-00006-00036 2020-09-04 10:29:35.888793 [ websrv_poll ] ERR  Unknown resource: /lool/https%3A%2F%2Fmoodle.domain.tld%2Fmod%2Fcollabora%2Fcallback.php%2Fwopi%2Ffiles%2F69_0%3Faccess_token%3D902cd64bdc99%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https://moodle.domain.tld/mod/collabora/callback.php/wopi/files/69_0&compat=/ws GWebSocket path: 10 'lool' 'https%3A%2F%2Fmoodle.domain.tld%2Fmod%2Fcollabora%2Fcallback.php%2Fwopi%2Ffiles%2F69_0%3Faccess_token%3D902cd64bdc99%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https:' 'moodle.domain.tld' 'mod' 'collabora' 'callback.php' 'wopi' 'files' '69_0&compat=' 'ws'| wsd/LOOLWSD.cpp:2412
wsd-00006-00036 2020-09-04 10:29:36.763142 [ websrv_poll ] ERR  Unknown resource: /lool/https%3A%2F%2Fmoodle.domain.tld%2Fmod%2Fcollabora%2Fcallback.php%2Fwopi%2Ffiles%2F69_0%3Faccess_token%3D902cd64bdc99%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https://moodle.domain.tld/mod/collabora/callback.php/wopi/files/69_0&compat=/ws GWebSocket path: 10 'lool' 'https%3A%2F%2Fmoodle.domain.tld%2Fmod%2Fcollabora%2Fcallback.php%2Fwopi%2Ffiles%2F69_0%3Faccess_token%3D902cd64bdc99%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https:' 'moodle.domain.tld' 'mod' 'collabora' 'callback.php' 'wopi' 'files' '69_0&compat=' 'ws'| wsd/LOOLWSD.cpp:2412
wsd-00006-00036 2020-09-04 10:29:52.081939 [ websrv_poll ] ERR  Unknown resource: /lool/https%3A%2F%2Fmoodle.domain.tld%2Fmod%2Fcollabora%2Fcallback.php%2Fwopi%2Ffiles%2F69_0%3Faccess_token%3D902cd64bdc99%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https://moodle.domain.tld/mod/collabora/callback.php/wopi/files/69_0&compat=/ws GWebSocket path: 10 'lool' 'https%3A%2F%2Fmoodle.domain.tld%2Fmod%2Fcollabora%2Fcallback.php%2Fwopi%2Ffiles%2F69_0%3Faccess_token%3D902cd64bdc99%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https:' 'moodle.domain.tld' 'mod' 'collabora' 'callback.php' 'wopi' 'files' '69_0&compat=' 'ws'| wsd/LOOLWSD.cpp:2412
wsd-00006-00036 2020-09-04 10:30:46.153221 [ websrv_poll ] ERR  Unknown resource: /lool/https%3A%2F%2Fmoodle.domain.tld%2Fmod%2Fcollabora%2Fcallback.php%2Fwopi%2Ffiles%2F69_0%3Faccess_token%3D902cd64bdc99%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https://moodle.domain.tld/mod/collabora/callback.php/wopi/files/69_0&compat=/ws GWebSocket path: 10 'lool' 'https%3A%2F%2Fmoodle.domain.tld%2Fmod%2Fcollabora%2Fcallback.php%2Fwopi%2Ffiles%2F69_0%3Faccess_token%3D902cd64bdc99%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https:' 'moodle.domain.tld' 'mod' 'collabora' 'callback.php' 'wopi' 'files' '69_0&compat=' 'ws'| wsd/LOOLWSD.cpp:2412
kratzersmz commented 3 years ago

@mmaridev : are there any news on this?

same issue here. Using dockered version too

greets

Dagefoerde commented 3 years ago

Thanks for reporting this issue. The logs report something in wsd/LOOLWSD.cpp:2412, so that is Collabora/LibreOffice and not Moodle. I suppose that the people over there will be able to provide more help.

Anyway, what is Collabora/LOOL 7.x? Where did you get the Docker image from, and which one did you use specifically? After all, I believe Collabora celebrated the launch of 4.2 only recently (https://twitter.com/CollaboraOffice/status/1314120873520005120) and LibreOffice Online seems to be at 6.2 (https://hub.docker.com/r/cibsoftware/libreoffice-online/tags). Any details on your setup would be greatly appreciated in order to narrow it down! Thanks :)

kratzersmz commented 3 years ago

@Dagefoerde thanx for responding....

here you see my docker-compose.yml ---> this is working with several nexcloud instances fine....but moodle not ehh

That's the image for libreoffice 7.0, docker image is based on work of https://wiki.documentfoundation.org/Development/BuildingOnline

services:
  frontproxy:
    restart: always
    image: jwilder/nginx-proxy
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "/var/run/docker.sock:/tmp/docker.sock:ro"
      - "certs-volume:/etc/nginx/certs:ro"
      - "/etc/nginx/vhost.d"
      - "/usr/share/nginx/html"

  nginx-letsencrypt-companion:
    restart: always
    image: jrcs/letsencrypt-nginx-proxy-companion
    volumes:
      - "certs-volume:/etc/nginx/certs"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    volumes_from:
      - "frontproxy"

  collabora:
    image: kratzersmz/libreoffice-online:7-0-2020-08-18
    restart: unless-stopped
    hostname: office.domain.de
    environment:
      - username=admin1
      - password=MenschMeier
      - domain=cloud.domain.de|cloud.domain2.de|cloud.domain3.de
      - VIRTUAL_HOST=office.domain.de
      - LETSENCRYPT_HOST=office.domain.de
      - LETSENCRYPT_EMAIL=webmaster@office.domain.de
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
    networks:
      - frontproxy_default
      - default

networks:
  frontproxy_default:
    external: true

volumes:
  certs-volume:
Dagefoerde commented 3 years ago

Well, perhaps it's an issue with the development build of LibreOffice 7.0, but that's hard to tell. LibreOffice developers would probably know more. As a start you could try building a more recent version of LibreOffice Online and test against that.

I notice one other thing. The error log of the original post states this URL (excerpt): ERR Unknown resource: /lool/https%3A%2F%2Fmoodle.domain.tld%2Fmod%2Fcollabora%2Fcallback.php%2Fwopi

Note how a LibreOffice Online URL is mixed with an (encoded) Moodle URL. So perhaps LibreOffice Online misinterprets the callback URL and uses it as a relative one instead of as an absolute one? Or maybe the callback URLs are not defined well; you could check the plugin settings in Moodle.

Dagefoerde commented 3 years ago

... if you are as curious as I am, could you please try the following (before following up on my other ideas):

in /mod/collabora/classes/collabora.php, could you please change this line:

https://github.com/learnweb/moodle-mod_collabora/blob/5604c44d9bb11c48b5ef80978231b50c85ae2d3a/classes/collabora.php#L388

to this line (the only change is adding false):

$wopisrc = $callbackurl->out(false).'/wopi/files/'.$fileid;

And then let us know whether something changes, and whether these errors still appear in the log? Thanks!

kratzersmz commented 3 years ago

@Dagefoerde : Thanks for your reply. I'm using the hosted version of moodle by belwue. I do not have access to files of collabora moodle plugin....

I'm try to compile lool 6.4, and telling you if its working or not......

mmaridev commented 3 years ago

@kratzersmz 6.4 should work, we're currently using it in prod. I'll answer tomorrow about the PHP part, sorry.

grabs commented 3 years ago

@kratzersmz What image is your docker image based on? Recently I tried the official image libreoffice/online:master without any problems.

kratzersmz commented 3 years ago

@grabs: based on lool 7, removed some limitations.....I'll grab the official images and give it a try...

thanks for replying

mmaridev commented 3 years ago

@kratzersmz got it working with online a9d8a533 and LOKit bc99794 compiled 8/10/2020. Upgraded the Collaborative document mod to the latest version and it's now working.

grabs commented 3 years ago

@mmaridev good to read that 👍 May there are other users with the same problem. Could you be a bit more specific on what docker-images (name, version) you took to get it running? Thank you very much!

mmaridev commented 3 years ago

The build is done via the procedure mentioned here https://wiki.documentfoundation.org/Development/BuildingOnline . My build was executed on October, 8 so any later version should work too. If not, let me know. I'll check with online dev team the commits that came after that date.

kratzersmz commented 3 years ago

@mmaridev : thanks for sharing your knowledge...is your build of lool 7.x as docker container online available?

grabs commented 3 years ago

I'm closing this now because there doesn't seem to be a problem with the plugin itself.