You are unable to do an online preview of files on an end-user portal no matter what browser you use. You are encountering this issue if the web portal shows "SafeSync is opening your file" for a whole day.
To confirm existence of the problem:
- Log in to the customer's SSFE via SSH.
- Get the root permission using the following command:
$ sudo su
- Check the configuration of preview workers:
$ cat /etc/default/grunjobs | grep JOB_TYPES | cut -d',' -f11
$ DocPreviewGen:2:4Where: 2 is minimum workers, 4 is maximum workers, and the grunjobs adjust worker number dynamically.
- Check either of the following:
- If all the port numbers 2001 to 2004 are occupied and the nearest start time is earlier than one day ago. For example, refer to the figure below. It shows only port 2002 and 2004 are occupied and the nearest start day on June 17:
$ ps aux | grep unoconv
# show the current date
$ date - If the current preview worker number >= maximum worker configuration. For example, refer to the figure below. It shows 8 preview workers are running >= maximum worker number 4:
$ ps aux | grep unoconv | wc -l
If the check result meets one of the above conditions, proceed to the next instructions.
- If all the port numbers 2001 to 2004 are occupied and the nearest start time is earlier than one day ago. For example, refer to the figure below. It shows only port 2002 and 2004 are occupied and the nearest start day on June 17:
To restart online preview function, log in to the customer's SSFE via SSH and execute the following commands during the period of low usage traffic:
# get the root permission $ sudo su # stop the grunjobs service ps aux | grep -i grun | grep -v grep | awk '{print $2}' | xargs kill -9 # stop the gearman-job-server service service gearman-job-server stop # stop 4 libreoffice instances supervisorctl stop libreoffice200{1,2,3,4} # clean the preview jobs in gearman queue mysql -uroot -psafesync gearman -e "delete from appliance1_osdp where function_name='hjob-DocPreviewGen'" mysql -uroot -psafesync gearman -e "delete from appliance2_osdp where function_name='hjob-DocPreviewGen'" # start 4 libreoffice instances supervisorctl start libreoffice200{1,2,3,4} # start the gearman-job-server service service gearman-job-server start #start the grunjobs service service grunjobs start