Collabora Online Issues, can someone help me?

Hello Everyone,

yesterday i decided to upgrade my server and improve some things on it to make it more reliable and secure.

what i have:

  • debian 8.10 dedicated server
  • nginx and docker running on root.

What i did:

  • installed a nginx
  • installed php7
  • installed certbot to be able to use letsencrypt
  • installed nextcloud
  • configured nginx to work with my nextcloud installation (no problems as far as i can see)
  • configured nextcloud and activated collabora online
  • installed docker and made the collabora online server image running

– i used the following commandline
sudo docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=<mysubForNextcloud>\.<mywebsite>\.de' --restart always --cap-add MKNOD collabora/code

  • created a vhost for collabora online which looks like this
server {
    listen       443 ssl;
    server_name  < mysubForCollabora.<mywebsite>.de;

    include /etc/nginx/snippets/letsencrypt.conf;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/<mywebsite>.de/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/<mywebsite>.de/privkey.pem;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;

    # static files
    location ^~ /loleaflet {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

    # WOPI discovery URL
    location ^~ /hosting/discovery {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

   # main websocket
   location ~ ^/lool/(.*)/ws$ {
       proxy_pass https://localhost:9980;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "Upgrade";
       proxy_set_header Host $http_host;
       proxy_read_timeout 36000s;
   }

   # download, presentation and image upload
   location ~ ^/lool {
       proxy_pass https://localhost:9980;
       proxy_set_header Host $http_host;
   }

   # Admin Console websocket
   location ^~ /lool/adminws {
       proxy_pass https://localhost:9980;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "Upgrade";
       proxy_set_header Host $http_host;
       proxy_read_timeout 36000s;
   }
}


i created a simlink for the subdomain file ..de.conf and created a simlink from the sites-activated folder to the sites-enabled folder

after this i restarted nginx

  • when i now, wanna create a document or open one, i get the following error in nextcloud
GuzzleHttp\Exception\ServerException: Server error response [url] https://<mysubForCollabora>.<mywebsite>.de/hosting/discovery [status code] 502 [reason phrase] Bad Gateway

Note: the domain and sub domains have a valid lets encrypt certificate.

Could someone help me on this?

what give nc -v localhost 9980 ?

if time-out take a look to your iptables

what do you have in your ngnix log?

the command gives me

localhost.localdomain [127.0.0.1] 9980 (?) open

the logs say

***.***.***.*** - - [08/Jan/2018:13:36:38 +0100] "GET /hosting/discovery HTTP/1.1" 502 166 "-" "Nextcloud Server Crawler"
***.***.***.*** - - [08/Jan/2018:13:36:38 +0100] "POST /apps/richdocuments/ajax/documents/create HTTP/1.1" 500 6970 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"
***.***.***.*** - - [08/Jan/2018:13:36:52 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 603 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"

i have honestly no clue what could be wrong :confused: Collabora is really giving me headache

Do you have in loolwsd.xml the good host info?
no issue with your certificates?

is loolwsd running ? (seems yes your netcat is open)

you can add in each location on your nginx config:
proxy_ssl_server_name on;

Okay,

so i was able to solve my issue. super stupid mistake from me. because of some hickups on grabbing the pgp keys for docker. i only installed the client, not the server. so docker was never really able to boot up my instance of collabora.

now i fixed this, and instantly i am able to connect to the collabora server.

thanks :smiley: Super happy

@Gardosen can you put the thread in resolved state?
thank you

pra