How do I connect OnlyOffice to Alfresco Community server? Here is my current setup:
Alfresco 7.3 on Debian in QEMU VM, from Bitnami image.
OnlyOffice Docs 7.4 on Ubuntu in QEMU VM, installed by snap.
Both VMs on the same machine. VMs have separate IP addresses, assigned by DHCP.
ALfresco has the plugins installed, and the OnlyOffice configuration page has the Docs server IP address set, and the IP address is also set in the Advanced settings.
Alfresco has a Word doc in it, and the “Edit in OnlyOffice” link is displayed.
When I click on it, I see the following error messages:
“Warning The document could not be saved. Please check connection settings or contact your administrator. When you click the ‘OK’ button you will be prompted to download the document.”
After a few seconds this is overlaid with:
“Download failed. Press ‘OK’ to return to the document list.”
I was hoping that by using preconfigured installs of the two systems (the Bitnami image of Alfresco and the Snap install of OnlyOffice) I could get around configuration issues but obviously I’ve missed something. Could someone please tell me where to look to find the problem. Bear in mind this is the Snap install, so the directories are non-standard.
I noticed the JWT Error in the error.log, so I changed the field on the connector settings to match the local.json, but that threw this error:
“The document security token is not correctly formed. Please contact your document server administrator. Press ‘OK’ to return to the document list.”
So now I’m more confused about how the JWT should be configured. Is it just a plain text string in both places?
Thanks,
Ah ha! So running sudo snap get onlyoffice-ds onlyoffice.jwt-secret and pasting the result into the ‘secret key’ field gets me further, but I’m still getting the first two error messages.
out.log now contains this: [2023-09-26T17:42:07.233] [ERROR] [null] [null] [null] nodeJS - (node:1912) [DEP0118] DeprecationWarning: The provided hostname "" is not a valid hostname, and is supported in the dns module solely for compatibility. (Use node --trace-deprecation … to show where the warning was created) [2023-09-26T17:42:07.673] [ERROR] [localhost] [a07fd3f1-03f1-48af-8cc8-0b5d12af80f0_1.1] [admin] nodeJS - postData error: url = http:///%27192.168.0.135%27;:8080/alfresco/s/parashift/onlyoffice/callback?nodeRef=workspace://SpacesStore/a07fd3f1-03f1-48af-8cc8-0b5d12af80f0&cb_key=7Gd99K8xxYOg5MKxaKahufGJLTl5PLLG-4Y9louLdvs;data = {"key":"a07fd3f1-03f1-48af-8cc8-0b5d12af80f0_1.1","status":1,"users":["admin"],"actions":[{"type":1,"userid":"admin"}],"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJhMDdmZDNmMS0wM2YxLTQ4YWYtOGNjOC0wYjVkMTJhZjgwZjBfMS4xIiwic3RhdHVzIjoxLCJ1c2VycyI6WyJhZG1pbiJdLCJhY3Rpb25zIjpbeyJ0eXBlIjoxLCJ1c2VyaWQiOiJhZG1pbiJ9XSwiaWF0IjoxNjk1NzUwMTI3LCJleHAiOjE2OTU3NTA0Mjd9.C2Yh3ylgd2EHlKpFJvL-ixJ7q6ueWAUp3EU9fBxdQfo"} Error: Invalid URI "http:///%27192.168.0.135%27;:8080/alfresco/s/parashift/onlyoffice/callback?nodeRef=workspace://SpacesStore/a07fd3f1-03f1-48af-8cc8-0b5d12af80f0&cb_key=7Gd99K8xxYOg5MKxaKahufGJLTl5PLLG-4Y9louLdvs" at Request.init (/snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:273:31) at new Request (/snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:127:8) at request (/snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/Common/node_modules/request/index.js:53:10) at /snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/Common/node_modules/request/index.js:61:12 at Function.post (/snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/Common/node_modules/request/index.js:100:12) at /snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:370:26 at new Promise (<anonymous>) at Object.postRequestPromise (/snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:351:10) at sendServerRequest (/snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/DocService/sources/DocsCoServer.js:602:29) at sendServerRequest.next (<anonymous>) at sendStatusDocument (/snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/DocService/sources/DocsCoServer.js:886:24) at sendStatusDocument.next (<anonymous>) at endAuth (/snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/DocService/sources/DocsCoServer.js:2289:29) at endAuth.next (<anonymous>) at auth (/snap/onlyoffice-ds/171/var/www/onlyoffice/documentserver/server/DocService/sources/DocsCoServer.js:2253:35) at auth.next (<anonymous>)
Document Editing Service address for internal requests from the Alfresco server - specify the address that is used to access Document Editing Service from Alfresco server.
Alfresco server address for internal requests from the Document Editing Service - specify the address that is used to access Alfresco server from Document Editing Service.
And you still haven’t sent a screenshot of a successful connection check after pressing the ‘save’ button).
This is strange. I added the URLs to the advanced section, and it seems to be working now, but I still don’t see a ‘Success’ on the configuration page. And there are no more errors in the log file. Does this mean it’s working properly?
Update:
With these settings I see ‘Success’ at the top for about five seconds (It’s just under the Alfresco logo) but I still can’t edit or save and I get the same error messages as originally reported. I set the secret to ‘secret’ on the configuration page and in the local.json file.
Please check the availability of both machines to each other using curl command, like this
On your server with alfresco installed execute curl http://ip-ds
On your server with document server installed execute curl http://ip-alfreslo
Okay, curl http://192.168.0.135 (from Alfresco to OnlyOffice) returns: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="http://192.168.0.135/share">here</a>.</p>
And curl http:\\192.168.0.154 (from OnlyOffice to Alfresco) returns: <html> <head><title>302 Found</title></head> <body> <center><h1>302 Found</h1></center> <hr><center>nginx</center> </body> </html>
This suggests to me that the two machines can talk to each other. Does this help?
This might be useful: when I try to visit the local example (http://192.168.0.154/example) I get a page back with the message “Error 502 Bad Gateway” from nginx.
Sorry I haven’t been there for so long, I lost the message…
No, ds-example does not work because it is not enabled. That’s how it should be if you didn’t turn it on). This is an example.
Can I ask you personally to send me alfresco-global.properties and local.json in private messages
Hi Nikolas,
We seem to have it working now. It just seems to take a long time for both systems to load and initialize. The errors appear the first time we test it, but after a few minutes the whole thing works perfectly. Also, allocating the right number of CPUs and RAM to the VMs helps, too.
Thank you for your assistance with this, you certainly put us on the right track.