CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.82k stars 697 forks source link

Docker container keeps restarting after setting up fonts in coolwsd.xml #7442

Closed sebastiaanveld closed 3 months ago

sebastiaanveld commented 1 year ago

Describe the Bug

Docker container keeps restarting after setting up fonts in coolwsd.xml

Steps to Reproduce

  1. In nextckloud Administration> Office, check the suggested settings to add to the coolwds.xml file. Mind I've not uploaded any fonts here in NC yet (for testing), even if I do upload a font the result is the same.
  2. In the Linux server running the docker container copy the coolwsd.xml from the running cool container to /etc/coolwds/coolwsd.xml
  3. Ajust the /etc/coolwsd/coolwsd.xml font section as found in the NC admin console
  4. Stop the CODE docker container
  5. Start the container by adding -v /etc/coolwsd/coolwsd.xml:/etc/coolwsd/coolwsd.xml so it should pickup the ajusted config file.
  6. Container keeps restarting

Starting the container (without the -v section): docker run -t -d -p 127.0.0.1:9980:9980 --add-host="www.myserver.nl:10.10.10.10" --add-host="code.myserver.nl:10.10.10.11" -e aliasgroup1=https://www.myserver.nl:443 -e "username=admin" -e "password=mypassword" -e server_name=code.myserver.nl --restart=unless-stopped collabora/code:latest Mind --add-host="www.myserver.nl:10.10.10.10" makes sure the container can resolve NC locally as there is no local DNS server for the VM's to use, else the record would resolve to the external internet IP address.

Same problem happens if I copy the coolwsd.xml into the container itself and publish it as a new version. On starting the container keeps restarting as well.

Expected Behavior

Container shoud pick up the ajusted config and download fonts from NC if available.

Actual Behavior

Container keeps restarting.

Screenshots

-

Environment

Docker running openSUSE LEAP 15.4, latest patches COOLWSD version: 23.05.5.1 (git hash: 1fea227 (E)) LOKit version: Collabora Office 23.05.5.1 (git hash: c8d84f5) Served by: Debian GNU/Linux 12 (bookworm) Server ID: 16832339

Nextcloud 27.1.2 running op Ubuntu.

Both VM's run behind a HAproxy VM.

Additional Context

Fonts.json {"kind":"fontconfiguration","server":"MyServer (https:\/\/www.myserver.nl)","fonts":[]}

Or if I upload a fonts for testing into NC fonts.json get into containing: {"kind":"fontconfiguration","server":"MyServer (https:\/\/www.myserver.nl)","fonts":[{"uri":"https:\/\/www.myserver.nl\/apps\/richdocuments\/settings\/fonts\/tahoma.ttf","stamp":"c7fba35618f2406097db8702aeaea5a4"}]}

coolwds.xml as in /etc/coolwds/coolwsd/xml `

false de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru false true 1 4 5 false 96 3600 30 300 false 0 8000 0 0 100 5 100 500 5000 10000 60 300 3072 85 120 true 120 900 true warning trace notice fatal false -INFO-WARN /var/log/coolwsd.log never timestamp true 10 days 10 true false false 82589933 false false /var/log/coolwsd.trace.json false false all any 192\.168\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:192\.168\.[0-9]{1,3}\.[0-9]{1,3} 127\.0\.0\.1 ::ffff:127\.0\.0\.1 ::1 172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} 172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} 172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} 10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ::ffff:10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} true false /etc/coolwsd/cert.pem /etc/coolwsd/key.pem /etc/coolwsd/ca-chain.cert.pem 1000 false 31536000 true true 1800 false 1 false false default true 0 900 true true false false https://www.myserver.nl/apps/richdocuments/settings/fonts.json false log true https://help.collaboraoffice.com/help.html?

`

sebastiaanveld commented 1 year ago

Anyone know how to troubleshoot this in the docker container?

Ezinnem commented 1 year ago

@Rash419 please would you like to share some thoughts?

Rash419 commented 1 year ago

Hello, Thanks for reporting

How to get logs from container?

You can get the logs of container by running the following command:

  1. Find out the container name of collabora/code: sudo docker ps
  2. Create file containing logs: docker logs <container_name> > ./code.log This command will create file in your current working directory please share it with us

Suspecting problem:

I suspect the coolwsd.xml that you are copying to container doesn't have enough permission If so you will see this log entry Failed to initialize COOLWSD: Access to file denied: /etc/coolwsd/coolwsd.xml

To fix this please do chmod 644 path/to/coolwsd.xml

sebastiaanveld commented 1 year ago

Thanks @Rash419 for the follow up. Other rights were not set on /etc/coolwsd/coolwds.xml as you expected. This solves the restarting issue of the container.

After starting the container: Within the container I see coolwsd.cfg is now replaced with the file I mount starting the container. But I cannot find the tahoma font in the container and it's not listed in /var/log/fontconfig.log, I guess is should correct?

Additionally when I now edit a document the Fontmenu dropdown is gone for a while in the menubar before it appears after opening a document.

image

When it appears the tahoma font is not listed:

image

Here is the code.log: code.log

sebastiaanveld commented 3 months ago

Not seen this issue in recent builds, closing for now.