On Alfresco DMS application while previewing Office files(.docx, .xlsx, etc), "download failed" error occurs.
Cause for this error:
OnlyOffice downloads the DMS file( when DMS requesting the preview of a file ) inside the docker container using Alfresco API but the container somehow is not able to rectify DMS URL or is not known to the container. And shows certificate verification failed error and also shows download failed error in the container logs
To resolve this issue, follow the below steps:
First, check if the OnlyOffice Docker container is running, if not, use this link to run the docker container again.
After that, check if the /etc/hosts file inside the docker container has the DMS server entry, if not,
Go into the running docker container, type command:
docker exec -it <containerId> bash
open the /etc/hosts file, type command
check for the entry,
<<server IP ... 10.x.x.x>> <<dms.server.com>>
if the entry is not there, kindly write by changing the file into insert mode by type “ i ”, then add the above entry.
note:- always press tab after write the IP address then write DMS URL
Some basic docker commands that will be helpful while debugging:
1. list all containers(run / stop), type command
docker ps -a
2. stop running container, type command
docker stop <conateinerID>
3. attach with the logs of a running container, type command
docker logs -f <containerID>
4. remove all stopped containers, type command
docker system prune -a