Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. OnlyOffice
  3. Nextcloud not able to open documents using the Onlyoffice document viewer/editor

Nextcloud not able to open documents using the Onlyoffice document viewer/editor

Scheduled Pinned Locked Moved OnlyOffice
38 Posts 5 Posters 6.7k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nebulonN Offline
    nebulonN Offline
    nebulon
    Staff
    wrote on last edited by nebulon
    #18

    can you try again in the demo? Demo is already on 7.5 and hit the french translation bug

    1 Reply Last reply
    0
    • ChristopherMagC Offline
      ChristopherMagC Offline
      ChristopherMag
      wrote on last edited by
      #19

      @nebulon I have gone through the same steps above and they worked fine, with and without the disable certificate verification checkbox checked as your demo system gets valid SSL certs.

      Our internal cloudron is not able to be publicly accessible and so we use our own root ca with a wild card cert for cloudron apps that we have loaded into the root trust stores of our client computers and phones.

      It sounds like either we need to be on cloudron 7.5 instead of 7.4.3 or there is something that is now no longer working with locally managed certificates, even though we have the insecure option checked and the error message is different when it is blocked due to ssl certificate issues.

      Here is the error our current instance gets when the disable certificate verification checkbox is unchecked Error when trying to connect (cURL error 60: SSL certificate problem: unable to get local issuer certificate.

      Nothing shows up in the logs section of the nextcloud and onlyoffice cloudron apps that appears to be collrelated, is there other log locations I can check to try and see additional logs that might be generated when we try to save the setting and get the error Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version 7.3.3.49)?

      1 Reply Last reply
      0
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #20

        ahm the external reachability might be the issue. Both the browser (basically nextcloud UI) as well as the Nextcloud backend have to be able to reach the office app by domain. Depending on your router this may or may not work then if things are not publicly reachable.

        1 Reply Last reply
        0
        • ChristopherMagC Offline
          ChristopherMagC Offline
          ChristopherMag
          wrote on last edited by
          #21

          @nebulon All dns requests for any host in the subdomain of cloudron.ourtopdomain.com all return the same ip address.
          There is a feature of our DNS provider that basically allowed us to setup *.cloudron.ourtopdomain.com so that even requests for hosts we have never done anything specific to setup records for will respond with the same ip address as everything is hosted on one server.

          If DNS reachability was a problem in general I wouldn't have expected it to work for 8 months and also wouldn't expect that it would be able to give error messages that are different than the one that you receive when nextcloud can't reach the onlyoffice host via dns resolution.

          If I mess up the hostname intentionally we get the error Error when trying to connect (cURL error 6: Could not resolve host: testonlyoffice.cloudron.wrongrootdomain.com which is not the error Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version 7.3.3.49) we get when the domain name is corrected.

          The document service would need to be reachable to receive an error message from it about it having trouble downloading the document to be converted.

          In this case maybe it is Onlyoffice that is having trouble reaching out to nextcloud to pull the document that nextcloud requested Onlyoffice open.

          if I run dig testnextcloud.cloudron.ourtopdomain.com from the terminal of the testonlyoffice cloudron app it returns an A record with the correct ip address so dns reachability doesn't seem like the issue.

          1 Reply Last reply
          0
          • imc67I Offline
            imc67I Offline
            imc67
            translator
            wrote on last edited by imc67
            #22

            I'm on 7.5 and since the NC update to 27.0.1 the OnlyOffice integration gets stuck with:

            Fout bij het verbinden (Er is een fout opgetreden in de documentservice: Error while downloading the document file to be converted.) (versie 7.3.3.49)
            

            This error is shown while trying to save the settings in NC regarding OnlyOffice. I tried all the suggestions here but it still doesn't work.

            girishG 1 Reply Last reply
            0
            • imc67I imc67

              I'm on 7.5 and since the NC update to 27.0.1 the OnlyOffice integration gets stuck with:

              Fout bij het verbinden (Er is een fout opgetreden in de documentservice: Error while downloading the document file to be converted.) (versie 7.3.3.49)
              

              This error is shown while trying to save the settings in NC regarding OnlyOffice. I tried all the suggestions here but it still doesn't work.

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #23

              @imc67 do you also have any special setup you can think of? cloudflare/custom certs/reverse proxy in front etc?

              imc67I 1 Reply Last reply
              0
              • girishG girish

                @imc67 do you also have any special setup you can think of? cloudflare/custom certs/reverse proxy in front etc?

                imc67I Offline
                imc67I Offline
                imc67
                translator
                wrote on last edited by imc67
                #24

                @girish OUCH! My fault, after installation and all the updates I switched on Cloudflare DNS proxy because I’ve set up there “country whitelist”. I just switched proxy off and it works!

                How can I use Cloudflare proxy in this setup or even better would be to have on Cloudron per app geo blocking 😆

                imc67I 1 Reply Last reply
                0
                • girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #25

                  Interesting. I wonder why the proxy matters.

                  @imc67 Did you have to turn off the proxy for both apps or just onlyoffice?

                  1 Reply Last reply
                  1
                  • imc67I imc67

                    @girish OUCH! My fault, after installation and all the updates I switched on Cloudflare DNS proxy because I’ve set up there “country whitelist”. I just switched proxy off and it works!

                    How can I use Cloudflare proxy in this setup or even better would be to have on Cloudron per app geo blocking 😆

                    imc67I Offline
                    imc67I Offline
                    imc67
                    translator
                    wrote on last edited by imc67
                    #26

                    @imc67 @girish strange! On another Cloudron (not on 7.5) NC and OO are both proxied and there it works!

                    I switched on both proxies and now I get another error:

                    
                    Fout bij het verbinden (Client error: `GET https://oo.xxx.x/healthcheck` resulted in a `403 Forbidden` response:
                    
                    
                    1 Reply Last reply
                    0
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #27

                      I wonder if Cloudflare is blocking requests? Do you have some security or WAF stuff also enabled in Cloudflare as part of the proxying?

                      imc67I 1 Reply Last reply
                      0
                      • girishG girish

                        I wonder if Cloudflare is blocking requests? Do you have some security or WAF stuff also enabled in Cloudflare as part of the proxying?

                        imc67I Offline
                        imc67I Offline
                        imc67
                        translator
                        wrote on last edited by
                        #28

                        @girish yes, the only WAF rule I use is “block everything except NL + DE + AU” and I only proxy some subdomains where there might be sensitive information.

                        girishG 1 Reply Last reply
                        0
                        • imc67I imc67

                          @girish yes, the only WAF rule I use is “block everything except NL + DE + AU” and I only proxy some subdomains where there might be sensitive information.

                          girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by girish
                          #29

                          @imc67 Is there something in Cloudflare "logs" (if there is such a thing) as to why the healthcheck request was blocked? I wonder if Cloudflare is throwing some captcha or something and the server/browser request cannot handle this (since this is an API call)?

                          1 Reply Last reply
                          0
                          • imc67I Offline
                            imc67I Offline
                            imc67
                            translator
                            wrote on last edited by
                            #30

                            GOT IT! I recently moved my Cloudron from a Netcup VPS to a Netcup RS, it got a new IP. Just seconds ago (I didn’t saw you latest comment but it was the same direction) I discovered by the Cloudflare WAF logs that according to Cloudflare this IP is not in Germany (DE) but in the UK! Therefore all proxied domains where blocked by their own server! Bizar!

                            1 Reply Last reply
                            0
                            • ChristopherMagC Offline
                              ChristopherMagC Offline
                              ChristopherMag
                              wrote on last edited by ChristopherMag
                              #31

                              @girish I have emailed support on Tuesday as requested.

                              What would be my next step to get assistance in determining what is causing the issue we are seeing?

                              Happy to perform any additional troubleshooting steps, seems like possibly doing a packet capture from the nextcloud and onlyoffice containers on the Demo system where this works and on a system where it doesn't work would at least provide us the ability to pinpoint the differences between the failure and success states.

                              1 Reply Last reply
                              0
                              • girishG Offline
                                girishG Offline
                                girish
                                Staff
                                wrote on last edited by
                                #32

                                @ChristopherMag I replied a couple of days ago, but was waiting for your reply. Did it end up in spam or something?

                                1 Reply Last reply
                                0
                                • girishG Offline
                                  girishG Offline
                                  girish
                                  Staff
                                  wrote on last edited by girish
                                  #33

                                  OK, I tested this a bit.

                                  Installed nextcloud with a proper cert

                                  • Installed the onlyoffice app inside nextcloud.
                                  • With the "Demo server" setting, it says "you are using demo server" warning when opening files.
                                  • Installed onlyoffice app in cloudron with proper cert
                                    • With bad server name, the error is Error when trying to connect (cURL error 6: Could not resolve host: xxx
                                    • With bad password, the error is Error when trying to connect (Error occurred in the document service: Invalid token)
                                    • With good hostname and password, it says Settings have been successfully updated

                                  Installed nextcloud with self signed cert

                                  • Used the demo server.
                                  • When you open files, they just download and editor does not open. Meaning it's not working.
                                  • Configured with onlyoffice app in Cloudron with proper cert
                                    • Settings don't save at all - Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.)

                                  Installed nextcloud with propert cert again

                                  • Install onlyoffice in cloudron with self-signed cert
                                  • Without Disable certificate verification , error is Error when trying to connect (cURL error 60: SSL certificate problem: unable to get local issuer certificate
                                  • When Disable certificate verification is checked, settings save and documents open.

                                  So, to conclude: when nextcloud has self-signed certs, onlyoffice integration does not work.

                                  1 Reply Last reply
                                  0
                                  • girishG Offline
                                    girishG Offline
                                    girish
                                    Staff
                                    wrote on last edited by
                                    #34

                                    I found the magic incantation here - https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/4ae34b4d02822f68d661cca629083e1381d83612/run-document-server.sh#L340

                                    You have to add below under services.CoAuthoring and restart the app:

                                          "requestDefaults": {
                                            "rejectUnauthorized": false
                                          },
                                    

                                    image.png

                                    @ChristopherMag please try the above

                                    1 Reply Last reply
                                    3
                                    • ChristopherMagC Offline
                                      ChristopherMagC Offline
                                      ChristopherMag
                                      wrote on last edited by
                                      #35

                                      @girish That worked, thank you! My old onlyoffice app is still broken but with this setting I was able to make a new onlyoffice app install work as expected.

                                      I apologize as after you found this I searched the forum for requestDefaults and found that I had put in this feature request that would help resolve issues like these and in the request I mentioned an equivelant step of adding services.CoAuthoring.requestDefaults.rejectUnauthorized=false in the /etc/onlyoffice/documentserver/defaults.json file to accomplish the same thing.

                                      I still don't know why the original onlyoffice app stopped working but I was missing this step in my documentation to build a new one and just making a new one would have resolved the issue if I hadn't lost track of this step being needed.

                                      Thank you for your help and if there is any way we can bump up the priority of the other feature request it would help eliminate issues like this from occurring in the first place as custom root-ca certs would be implicitly trusted inside each container.

                                      girishG 1 Reply Last reply
                                      1
                                      • ChristopherMagC ChristopherMag

                                        @girish That worked, thank you! My old onlyoffice app is still broken but with this setting I was able to make a new onlyoffice app install work as expected.

                                        I apologize as after you found this I searched the forum for requestDefaults and found that I had put in this feature request that would help resolve issues like these and in the request I mentioned an equivelant step of adding services.CoAuthoring.requestDefaults.rejectUnauthorized=false in the /etc/onlyoffice/documentserver/defaults.json file to accomplish the same thing.

                                        I still don't know why the original onlyoffice app stopped working but I was missing this step in my documentation to build a new one and just making a new one would have resolved the issue if I hadn't lost track of this step being needed.

                                        Thank you for your help and if there is any way we can bump up the priority of the other feature request it would help eliminate issues like this from occurring in the first place as custom root-ca certs would be implicitly trusted inside each container.

                                        girishG Offline
                                        girishG Offline
                                        girish
                                        Staff
                                        wrote on last edited by
                                        #36

                                        @ChristopherMag said in Nextcloud not able to open documents using the Onlyoffice document viewer/editor:

                                        if there is any way we can bump up the priority of the other feature request

                                        sorry, I lost track. What is this other feature request?

                                        1 Reply Last reply
                                        0
                                        • ChristopherMagC Offline
                                          ChristopherMagC Offline
                                          ChristopherMag
                                          wrote on last edited by
                                          #37

                                          @girish Sorry, I hyper linked it but maybe that didn't work right, it is this one: https://forum.cloudron.io/topic/6381/if-the-custom-certificate-option-is-chosen-please-map-a-path-to-the-public-keys-into-each-container-s-ca-certificates-or-equivalent

                                          Esentially if cloudron domain is set to manual such that it is bieng provided a certificate and a key, at minimum, all apps that are loaded under that same domain should trust that certificate such that if you have cross app https connections, those connections will be trusted for all apps within that same domain at minimum.

                                          One might make an arguement for wanting to trust certs accross cloudron app domains but at least making everything within a single app domain trust each other would be a huge help and prevent a lot of issues we have hit when using apps that then need to communicate with other apps.

                                          1 Reply Last reply
                                          0
                                          • ChristopherMagC ChristopherMag referenced this topic on
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search