NGINX: ONLYOFFICE cannot be reached. Please contact admin

I’m really unsure when it comes to Onlyoffice, is it the log from Nextcloud or Onlyoffice? And if Onlyoffice, where can i find it or what is the name of it?

While you try to access Onlyoffice from the Nextcloud GUI check the NC logs first. I would check every log:
nextcloud.log (in NC data folder by default)
error.log (from NC web server)
syslog (maybe journalctl)

The logs don’t really say anything. no errors or anything

I have been looking in:

NC:
error.log
nextcloud.log
syslog

Onlyoffice:
syslog

While inspecting the site I saw that api.js is failing to respond:

Please make sure that the link to the /web-apps/apps/api/documents/api.js is available under different accounts.
Try opening this link from different browsers. The issue may be in some extra access settings

The whole nextcloud folder is under www-data at the moment.

I got the same problem with Microsoft Edge, Firefox, Opera and Google Chrome (my main browser) and I think that my Co-worker is using Safari and same there.

EDIT:
I’m not sure if I stated that in my first post… But I can access onlyoffice with whatever account I want in my nextcloud IF I’m on my login to my Google account on Google Chrome. I have been trying with 3 nextcloud accounts and all of them have been working. But as soon as I change browser or Google Account. That error message appears.

But as soon as I change browser or Google Account. That error message appears.

It means that you only have access to the .int domain (shown on your screenshot) if you are logged in under you google account. Please try opening the https:///web-apps/apps/api/documents/api.js in the browser (just copy and paste the link to the address bar)

Server not found

Firefox can’t find the server at web-apps.

Check the address for typing errors such as ww.example.com instead of www.example.com
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

I can add now that it seems like the nextcloud / onlyoffice integration works for Google Chrome now somehow, without me doing anything… But still doesn’t work for any browser outside of Chrome…

EDIT:
ONe co-worker did get it to work on Firefox somehow… but no one else get it to work.

Do they have access to https://onlyoffice.xxx.xxx/ ?

They should have it yes. Becasue it’s an internal network, and I’m on the same network as they are.

As I said before. I can access it on chrome but not on Firefox. and with “but no one else get it to work.” I meant get it to work on firefox.

ibnpetr20m
Just ask them to open the link https://onlyoffice.xxx.xxx/web-apps/apps/api/documents/api.js in FF or Edge
This link is not available from my side for example, it means that I cannot use your ONLYOFFICE

This worked and i’m no able to access Onlyoffice with Chrome, Firefox and Edge. Thanks alot! :smiley:

EDIT: Only I had to do it to get it to work for everyone somehome… Not sure if a bug or anything, but if it doesn’t work for everyone when you are doing it… I guess they will have to enter that site too.

Hi rojz,

I have the same inconvenience, and if I can access the link that decides. But when I want to edit or create a new document, I get this message:

I can not save this document. Please check the connection settings or contact the admin.
Clicking accept will ask you to download the document.

I set the https pointing to port 8843, will have something to do?

Thank

The issue is that the DocumentServer cannot access Nextcloud and download the file from the storage.
One of the possible solutions for CentOS and derivatives is the firewall exception:
(do not forget to change the port)
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --reload

I have it under UBUNTU and the UFW I have it in an inactive state.

Do I have to activate and configure which ports?

Thank

@Martin_Remersaro
Could you please send us log files of the nextcloud (/data/nextcloud.log)

good day

I pass the image of the logs they find on the server, because I can not see any file with the name you indicated.

Thank you very much

onlyoffice logs

Please send the log files from the nextcloud admin>>logging section.
btw please provide any additional information about the environment, i.e. are you using docker version of the document server? what is the address you use in the onlyoffice connector?
Make sure that the nextcloud server is accessible from the document server container/server.

Dear ibnpetr
Here I send the link where I put the problem and which version of onlyoffice I am using to see if that information is useful to see the problem?

Hello,

I have the same problem under UBUNTU and OnlyOffice in a docker image.

Could you resolve that?

Regards.

As far as I know the OnlyOffice server must be accessible for both the Browser Client and Nextcloud Server (using the URL given).

If you guys have both NC and OO at the same network (or same server), you may want to configure your server host file so it looks for localhost/local IP when your.office.domain is called.

In my VM with the servers I edited the /etc/hosts file to resolve the domain to 127.0.0.1 ( localhost ).
On my machine I have also changed C:/Windows/System32/drivers/etc/hosts to point to the VM’s IP inside my network.

I have then used a valid letsencrypt certificate for the domain. I can create certs using DNS (dynu.com), so I already had a test domain cert created.

I have changed the OnlyOffice default por to 9988 BEFORE INSTALLING (as per instructions), but also changed the SSL port from 443 to 4443 at the onlyoffice-documentserver-ssl.conf.template copy.

And it worked fine (quite fast actually).

So if your local network does not have NAT fallback enabled, your external domain will not get resolved to the correct local IP and it wont be accessible for the Nextcloud server, even though it may accessible for you at the client side.

So clients from outside the network would resolve to external ports and IPs, while clients inside the LAN would need to resolve to the corresponding local ports and IPs.

I have a situation where my router redirects mydomain to an internal IP (eg. 10.0.10.10) so people can still use the server from inside the LAN correctly (just an example). So check what IP your office domain resolves to and also if each point can access it (only one is not enough).

Also, you may be able to use everything at the default ports IF you use separate domains for nextcloud and onlyoffice (you will need to add it as server name for each config file).

Cheers!
Gus