richdocumentscode icon indicating copy to clipboard operation
richdocumentscode copied to clipboard

can't select or can't connect to Collabora Online - Built-in CODE Server on collabora online settings

Open loso2255 opened this issue 3 years ago • 9 comments

OS: ubuntu 20.04 LTS nextcloud in docker container i have reverse proxy on traefik

i downloaded collabora online and Collabora Online - Built-in CODE Server and enable
 
after i go to office settings and select use Built-in CODE Server

response: the server is reachable,

but when i refresh the page the selector return to use your server

when i try to open a document is stuck in charging page

also important can i open xlsx file with this plugin?

loso2255 avatar Dec 31 '21 10:12 loso2255

update some how i fix the stuck page but i notice

with traefik v2.5 nextcloud v23

and latest plugin of Collabora Online and Collabora Online - Built-in CODE Server

when i get access from direct ip ex: 192.168.0.28:8082 i can select from settings of Collabora Online => Collabora Online - Built-in CODE Server and work proprerly

but

when i get access from proxy URL ex: nextcloud.try.top i can't select from settings of Collabora Online => Collabora Online - Built-in CODE Server and the plugin Collabora Online say to me " Collabora Online - Built-in CODE Server" unreachable

and don't work at all

loso2255 avatar Jan 05 '22 12:01 loso2255

is there any solution to this problem? I'm having the same issue, but i'm using snap.

ohbob avatar Jan 09 '22 01:01 ohbob

+1

cjdg avatar Jan 12 '22 23:01 cjdg

Running into the same thing. Debian 11, Apache2 and nextcloud 22.2.3 The Collabora_Online.AppImage keeps restarting and seems to have issues connecting to port 9983, I've tried a variety of approaches and no go. Trying to run it manually with some arguments : sudo -u www-data /var/www/html/nextcloud/apps/richdocumentscode/collabora/Collabora_Online.AppImage --o:logging.file[@enable]=true --o:logging.file.property[0][@name]=path --o:logging.file.property[0]=logs/coolwsd5.log

Just gives me : Failed to listen on Server port(s) (9983-9983). Exiting. and nothing obvious in the log file.. Any suggestions?

Gandalfthegreybeard avatar Jan 21 '22 09:01 Gandalfthegreybeard

i think i have the same problem. when i change settings there and reload, they aren't saved. I'm also stuck with the loading page. The webconsole shows me a CSP error for the proxy (uses http instead of https). Changing the address in the settings doesn't do anything for me.

greenbourne277 avatar Feb 15 '22 12:02 greenbourne277

I believe I am having the same underlying problem. I am running Ubuntu 20.10 in an LXC container, behind a Caddy reverse proxy. I am unable to get CODE to run with Nextcloud 23.0.0 or 23.0.2. I also tried Ubuntu 20.04, aas well as PHP 7.3, 7.4, and 8.0. No change.

I suspect this has to do with the reverse proxy because as the OP found, if I connect directly to the IP of the Nextcloud instance I can select 'Use the built in CODE - Collabora Online Development Edition' option, it says 'Collabora Online is reachable', and I can go into a folder and create and edit documents in the browser and Collabora appears to work fine.

Unfortunately, when I return to normal usage via the URL through the reverse proxy it no longer works, and selecting 'Use the built in CODE - Collabora Online Development Edition' option on NC 23.0.0 locks up the site completely until I SSH in, delete the richdocumentscode folder, and restart apache, or on NC 23.0.2 it simply results in a 'Could not establish connection to the Collabora Online server' message.

However, if I browse to https://my.domain.net/apps/richdocumentscode/proxy.php?status I get a '{"status":"OK"}'

This implies that CODE is running, but Nextcloud has stopped communicating with it. I have also brought this up on the Nextcloud support forum and have not gotten any useful response there. There do not appear to be any relevant logs that I can use to trace what is happening and why.

If I select 'Use your own server' and manually change they URL from https to http I get a 'Collabora Online server is reachable.' and a green checkmark. Unfortunately this is either untrue or meaningless because if i attempt to actually open a file it sits on the loading page forever and never actually opens any files. If I return to the Office Settings tab it no longer has a green checkmark but instead has a red X again with this message: 'Collabora Online should use the same protocol as the server installation.'

I don't know how or where to play with the Collabora protocol to test further, and this really shouldn't be necessary. I would think that running behind a reverse proxy should be a fairly common use case.

kocherjj avatar Feb 16 '22 22:02 kocherjj

This is exactly same problem i have. Wonder if there is something that should be added to reverse proxy configs. I'm running NC as standalone VM so this doesn't seem to be container related problem.

ikcode avatar Feb 17 '22 11:02 ikcode

I believe I am having the same underlying problem. I am running Ubuntu 20.10 in an LXC container, behind a Caddy reverse proxy. I am unable to get CODE to run with Nextcloud 23.0.0 or 23.0.2. I also tried Ubuntu 20.04, aas well as PHP 7.3, 7.4, and 8.0. No change.

I suspect this has to do with the reverse proxy because as the OP found, if I connect directly to the IP of the Nextcloud instance I can select 'Use the built in CODE - Collabora Online Development Edition' option, it says 'Collabora Online is reachable', and I can go into a folder and create and edit documents in the browser and Collabora appears to work fine.

Unfortunately, when I return to normal usage via the URL through the reverse proxy it no longer works, and selecting 'Use the built in CODE - Collabora Online Development Edition' option on NC 23.0.0 locks up the site completely until I SSH in, delete the richdocumentscode folder, and restart apache, or on NC 23.0.2 it simply results in a 'Could not establish connection to the Collabora Online server' message.

However, if I browse to https://my.domain.net/apps/richdocumentscode/proxy.php?status I get a '{"status":"OK"}'

This implies that CODE is running, but Nextcloud has stopped communicating with it. I have also brought this up on the Nextcloud support forum and have not gotten any useful response there. There do not appear to be any relevant logs that I can use to trace what is happening and why.

If I select 'Use your own server' and manually change they URL from https to http I get a 'Collabora Online server is reachable.' and a green checkmark. Unfortunately this is either untrue or meaningless because if i attempt to actually open a file it sits on the loading page forever and never actually opens any files. If I return to the Office Settings tab it no longer has a green checkmark but instead has a red X again with this message: 'Collabora Online should use the same protocol as the server installation.'

I don't know how or where to play with the Collabora protocol to test further, and this really shouldn't be necessary. I would think that running behind a reverse proxy should be a fairly common use case.

I have had that problem now for a long time, but I finally got it to work. @kocherjj brought me on the right track. Thank you!!!

Short: For me, the problem was related to having my own certificates (I use my own CA which then signs custom server certificates), just adding my CA to the server made it work.

A bit more lengthy: Whenever trying to opening a file using Nextcloud Office, it just wanted to download the file instead. What I did to find the solutions was the following: Note, these are just my thoughts on why certain things did not work.

  • After a clean reboot
  • switching back and forth or changing URLs in the Nextcloud Office settings did not work. Always impossible to connect.
  • because until now, the Collabora_Online.AppImage is never started. And changing settings does not affect anything.
  • Therfore, lets start it "manually"
  • Browsing to https://my.domain.net/apps/richdocumentscode/proxy.php?status , the status is first "starting" and changes then to "OK" .
  • Now, on your server there should be now a Collabora_Online.AppImage process.
  • I think, not having Collabora_Online.AppImage started might prevented me a lot of people from finding the actual error, or getting different results.
  • However, I still cannot edit any documents.
  • If I now changed the URL to 127.0.0.1:9983 then I got a green checkmark. And a warning that the protocols differ (http and https). Opening documents did not work, but I got a continuous loading error, which then failed finally.
  • Just disabling certificate verification however did work.(Used URL was https://my.domain.net/apps/richdocumentscode/proxy.php?req= ).
  • Note, just disabling HTTPS on the server completely did also work for me. This is OK for troubleshooting and testing, but of course no solution in the long term. This is what brought me finally on the track that the problem might be related to certificate checks.
  • However, I think disabling certificate verification here is BAD. And should be avoided
  • For debian, just copy your CA to /usr/local/share/ca-certificates and run update-ca-certificates as root .
  • After that, I could just select "use the built-in ...." and it now works.
  • Reboots work fine too, and no need to manually start anything, just open the document and start editing.

I hope, this helps some other people there.

And thanks again to @kocherjj , your post was the key to finding a solution for me!

Note, I use Debian in an lxc container on Proxmox, Nextcloud Hub 3 (25.0.0), Nextcloud Office 7.0.0 and Collabora Online - Built-in CODE Server 22.5.702 . No Docker is used. As reverse proxy I used nginx. Not sure whether my solution works for other settings, too.

siberianhuskies avatar Oct 23 '22 13:10 siberianhuskies

I have a similar issue, but I'm running it with docker-compose. If I use CODE in a docker container, I can use CODE with my Nextcloud docker instance, but as I want, I want only to use CODE as app inside Nextcloud. I don't have any proxy installed then I tried to follow the install and usage instructions but... I'm getting the error Could not establish connection to the Collabora Online server. so my guess is, I have to use the CODE docker to use it.

neoacevedo avatar Nov 28 '22 20:11 neoacevedo