cetra3/onlyoffice-alfresco

OnlyOffice gives "Download failed." on file opening

gunboxer opened this issue · 3 comments

Hello!

I have integrated amp to my Alfresco 4.2.e CE
On pressing "Edit in OnlyOffice" I successfuly redirects to only office, it rotates wheel and triggers error "Download failed." with filling page header with correct filename.
I have no errors on alfresco logs, access log looks like this:

127.0.0.1 - - [23/Dec/2015:18:52:47 +0500] "GET /alfresco/s/remoteadm/has/alfresco/site-data/pages/onlyoffice-edit.xml?s=sitestore&alf_ticket=TICKET_c830ed6ae3108aef6c1c494fc955261ae3bd2444 HTTP/1.1" 200 5
127.0.0.1 - - [23/Dec/2015:18:52:47 +0500] "GET /alfresco/s/remoteadm/has/alfresco/site-data/template-instances/onlyoffice-edit.xml?s=sitestore&alf_ticket=TICKET_c830ed6ae3108aef6c1c494fc955261ae3bd2444 HTTP/1.1" 200 5
127.0.0.1 - - [23/Dec/2015:18:52:47 +0500] "GET /alfresco/s/remoteadm/has/alfresco/site-data/template-types/com/parashift/onlyoffice-edit.xml?s=sitestore&alf_ticket=TICKET_c830ed6ae3108aef6c1c494fc955261ae3bd2444 HTTP/1.1" 200 5
127.0.0.1 - - [23/Dec/2015:18:52:47 +0500] "GET /alfresco/s/remoteadm/has/alfresco/site-data/components/template.onlyoffice-edit.onlyoffice-edit.xml?s=sitestore&alf_ticket=TICKET_c830ed6ae3108aef6c1c494fc955261ae3bd2444 HTTP/1.1" 200 5
127.0.0.1 - - [23/Dec/2015:18:52:47 +0500] "GET /alfresco/s/parashift/onlyoffice/prepare?nodeRef=workspace://SpacesStore/5c0de0aa-171d-4b20-80ce-88ab3e551a68&alf_ticket=TICKET_c830ed6ae3108aef6c1c494fc955261ae3bd2444 HTTP/1.1" 200 549
127.0.0.1 - - [23/Dec/2015:18:52:47 +0500] "GET /share/page/onlyoffice-edit?nodeRef=workspace://SpacesStore/5c0de0aa-171d-4b20-80ce-88ab3e551a68 HTTP/1.1" 200 2475
127.0.0.1 - - [23/Dec/2015:18:52:47 +0500] "GET /share/res/components/onlyoffice/onlyoffice.css HTTP/1.1" 200 2102
127.0.0.1 - - [23/Dec/2015:18:52:47 +0500] "GET /share/res/components/onlyoffice/sha256.js HTTP/1.1" 200 6685
127.0.0.1 - - [23/Dec/2015:18:52:47 +0500] "GET /share/res/components/onlyoffice/onlyoffice.js HTTP/1.1" 200 599

What the issue could be? Is that the problem with onlyoffice config?
Currently I have no access to onlyoffice logs, it installed on separate server.
Should I configure some access params from alfresco or onlyoffice side?
Can you give me advice? Thank you!

Hi @gunboxer, this means that the OnlyOffice can't download the file from Alfresco. OnlyOffice will make the connection to Alfresco on behalf of the client, so OnlyOffice needs to be able to talk to Alfresco. In order for OnlyOffice to do this, Alfresco needs to generate what it thinks the external URL is. Make sure that the following properties are set correctly in alfresco-global.properties:

alfresco.protocol=http
alfresco.host=alfresco.yourcompany.local
alfresco.port=8080
alfresco.context=alfresco

Alfresco will provide a download URL for the document which uses UrlUtil which in turn uses SysAdminParams which in turn is driven by the above properties. The URL that is created is:

UrlUtil.getAlfrescoUrl(sysAdminParams) + "/s/api/node/content/workspace/SpacesStore/" + nodeRef.getId() + "?alf_ticket=" + authenticationService.getCurrentTicket();

Let me know if this sorts it out. If so I might add something in the readme so noone else gets tripped up.

Thank you for fast reply.
I have replaced
alfresco.host=127.0.0.1
with my external IP visible from onlyoffice server
alfresco.host=172.16.124.153

Now the wheel rotates much longer but after long timeout I still get "Download failed." error.
I'll try to continue investigation. I'll let you know if I'll handle my issue.

Well. I have installed separate onlyoffice instance using docker on a virtual machine and it works! Alfresco 4.2.e operability confirmed. Thanks for plugin.