OnlyOffice - Erreur durant la tentative de connexion (Statut de vérification d'intégrité incorrect)

I have searched the forum for similar issues

on

This category is for issues regarding specific apps, NOT general issues with YunoHost.

on

This form is written in English but feel free to write in French if you’re more comfortable!

on

What app is this about, and its version

OnlyOffice 9.4.0~ynh1

What YunoHost version are you running

12.1.41.2

What type of hardware are you using

VPS bought online

Describe your issue

:uk:/:us:

I have this issue since I updated YunoHost, NextCloud apps and YunoHost apps.

After that I first had the error “Erreur durant la tentative de connexion (Bad healthcheck status)”. I disabled then enabled back the OnlyOffice NextCloud connector and now I get the error “Erreur durant la tentative de connexion (Statut de vérification d’intégrité incorrect)”. However, https://onlyoffice.xxx.ynh.fr/healthcheck returns true (HTTP 200).

The Nextcloud log contains:

LocalServerException Host "127.0.0.1" (onlyoffice.xxx.ynh.fr:80) violates local access rules. Request to https://onlyoffice.xxx.ynh.fr/healthcheck failed

Files with extensions configured to open with ONLYOFFICE are downloaded instead of opening in the editor.

The ONLYOFFICE app page says:

Check that your application does not have any mechanism preventing local requests to 127.0.0.1. If it does, you can try deleting /etc/dsnmasq.d/onlyoffice.xxx.ynh.fr and restarting the dnsmasq service with systemctl restart dnsmasq.

Doing sudo rm /etc/dnsmasq.d/onlyoffice.xxx.ynh.fr and sudo systemctl restart dnsmasq did not prevent my files from being downloaded instead of opened.

Only Office (connector NextCloud) : 10.2.1
OnlyOffice (app yunohost) : 9.4.0~ynh1
Nextcloud (app yunohost) : 35.0.2~ynh1
Yunohost : 12.1.41.2 (stable)

This issue was also reported here : Connecteur Nextcloud : Erreur durant la tentative de connexion (Statut de vérification d'intégrité incorrect) · Issue #225 · YunoHost-Apps/onlyoffice_ynh · GitHub

:fr:

J’ai ce problème suite à une mise à jour de YunoHost, de mes applis NextCloud et des applis YunoHost.

J’avais au départ l’erreur “Erreur durant la tentative de connexion (Bad healthcheck status)”, j’ai désactivé et réactivé l’app connecteur dans nextcloud, et désormais j’ai comme vous
“Erreur durant la tentative de connexion (Statut de vérification d’intégrité incorrect)”. Pourtant, https://onlyoffice.xxx.ynh.fr/healthcheck renvoie true (HTTP 200).

Le log nextcloud contient LocalServerExceptionHost "127.0.0.1" (onlyoffice.xxx.ynh.fr:80) violates local access rules Request to ``https://onlyoffice.xxx.ynh.fr/healthcheck`` failed.

Les fichiers avec des extensions configurées pour s’ouvrir avec ONLYOFFICE sont téléchargés au lieu de s’ouvrir.

Dans la page de l’appli OnlyOffice il est indiqué : Vérifiez que votre application ne contient pas de mécanisme interdisant les requêtes locales sur 127.0.0.1. Si c'est le cas, vous pouvez essayer de supprimer rm /etc/dsnmasq.d/onlyoffice.xxx.ynh.fr et redémarrer le service dnsmasq systemctl restart dnsmasq.

Faire sudo rm /etc/dnsmasq.d/onlyoffice.xxx.ynh.fr et sudo systemctl restart dnsmasq n’empêche pas mes fichiers d’être téléchargés au lieu d’être ouverts avec OnlyOffice.

Only Office (connector NextCloud) : 10.2.1
OnlyOffice (app yunohost) : 9.4.0~ynh1
Nextcloud (app yunohost) : 35.0.2~ynh1
Yunohost : 12.1.41.2 (stable)

Le problème a également été reporté ici : Connecteur Nextcloud : Erreur durant la tentative de connexion (Statut de vérification d'intégrité incorrect) · Issue #225 · YunoHost-Apps/onlyoffice_ynh · GitHub

Share relevant logs or error messages

The web interface says that no logs are available, maybe because I reboot the server ?

Hi @elisa
Can you try this ?

yunohost app shell nextcloud
php occ config:system:set allow_local_remote_servers --value true

I ran these two commands and it seems that nothing has changed: I still get the error when I go to the NextCloud admin settings > OnlyOffice, and I still download the files instead of opening them with OnlyOffice.

J’ai fait ces deux commandes et a priori rien n’a changé : j’ai toujours l’erreur quand je vais dans les paramètres d’administration de NextCloud > OnlyOffice, et je télécharge toujours les fichiers au lieu de les ouvrir avec OnlyOffice.

Do you still get this error in nextcloud logs ?

LocalServerExceptionHost "127.0.0.1" (onlyoffice.xxx.ynh.fr:80) violates local access rules Request to ``https://onlyoffice.xxx.ynh.fr/healthcheck`` failed

No I don’t. Now I only have this one (that I also had yesterday) : Configuration Error (prefix s01): No LDAP Host given!

Ok. And do you still get this error when trying to save the OO settings in nextcloud ?

“Erreur durant la tentative de connexion (Statut de vérification d’intégrité incorrect)”. 

I had this error when going onto the page “admin settings > OnlyOffice”, but I tried to save as you suggested and it saved properly and now I don’t have this error anymore when going on this page.

Now when I try to open a xlsx document it doesn’t download, but it doesn’t open properly either : it’s blocked on the fake spreadsheet preview.

I only have this in my nextcloud logs when trying to open a file : Configuration Error (prefix s01): No LDAP Host given!

Do you use an adblocker ? If so, try deactivating it, there is a known issue with onlyoffice.

This may be helpful

I use UBlock Origin.

I added nextcloud.xxx.ynh.fr and onlyoffice.xxx.ynh.fr in UBlock Origin extension > dashboard > “trusted sites” tab.
Now it works !

Thank you for the quick resolution !

I don’t know why but I received answers by email that I don’t see here, so I’ll quote them:

ribodiwa:

The HTTP 200 only confirms the healthcheck works from your browser; Nextcloud’s PHP request is resolving the domain to 127.0.0.1, which its local-server check rejects. Check the server-side DNS result with getent ahosts onlyoffice.xxx.ynh.fr. If it resolves to loopback, review the dnsmasq override and OnlyOffice URL. Avoid enabling allow_local_remote_servers globally unless you understand the SSRF risk.

govinage :

The log points to Nextcloud’s local-server protection, not a failed OnlyOffice healthcheck. Check whether allow_local_remote_servers is disabled in Nextcloud’s system config; enabling it for the trusted OnlyOffice server should let the connector make that healthcheck request. The dnsmasq change affects name resolution, so it wouldn’t fix Nextcloud rejecting the request as local.

So if I understood well, doing:

yunohost app shell nextcloud
php occ config:system:set allow_local_remote_servers --value true

is insecure. What should I do instead to enable it only for OnlyOffice ?

See here

Instead of this, you can also try

yunohost app shell nextcloud
php occ config:app:set onlyoffice allow_local_address --value true

See here

Having both Nextcloud and OnlyOffice on the same domain, running these 2 commands fixed it for me. (To be precise I ran `sudo -u nextcloud php /var/www/nextcloud/occ config:system:set allow_local_remote_servers --value=true --type=boolean`, which is by all mean equivalent).

Thanks !

I ran:

yunohost app shell nextcloud
php occ config:system:set allow_local_remote_servers --value false
php occ config:app:set onlyoffice allow_local_address --value true

and it works fine.