cancel
Showing results for 
Search instead for 
Did you mean: 

Trashcan cleaner not working

art
Champ on-the-rise
Champ on-the-rise

Hello!

I have installed Alfresco Community 5.2, and I tryind to enable Trashcan cleaner, by this instruction, but it not working. When I watch log - there is no errors about trashcan, but there is errors about ldap-syncronization.

Tell me please, can this somehow depend?

In attachment my alfresco.log

1 ACCEPTED ANSWER

cesarista
World-Class Innovator
World-Class Innovator

Hi:

Deleting trash does not imply "to delete content from disk". Then it starts a 14-day retention period, and after it, the deleted content is moved to contentstore.deleted. Then content may be removed from contentstore.deleted safely. The retention period is managed with the next property:

system.content.orphanProtectDays=14

You may change this parameter to 1 in alfresco-global.properties and restart Alfresco. After 1 day, you should see "the deleted content" in contentstore.deleted. Then you can remove content content safely.

Some links about Alfresco content lifecycle:

https://blyx.com/wp-content/uploads/2014/08/Slide1.png 

https://blog.dbi-services.com/understand-the-lifecycle-of-alfresco-nodes/ 

Regards.

--C.

View answer in original post

4 REPLIES 4

cesarista
World-Class Innovator
World-Class Innovator

Hi Artem:

The link that you provided is for Alfresco Content Services 5.2.1. It is somehow related, but not exactly the same for Alfresco Community (e.x. the Admin Console). For example, to be sure about the module is installed you should see something like this in catalina.out during startup.

 2017-08-02 18:13:50,002  INFO  [repo.module.ModuleServiceImpl] [localhost-startStop-1] Starting module 'alfresco-trashcan-cleaner' version 2.2.

AFAIK, the trashcan cronjob is not enabled by default in Alfresco Community and the default period or retention days in trash is 28 days. You can check the trashcan config with OOTB Support Tools addon inspecting System Information page. There, you may search for trashcan related properties such as trashcan-cleaner.cron and trashcan-cleaner.keepPeriod. If the cronjob is disabled, you will see the trashcan cronjob in scheduled jobs section of this module for being executed in 2099.

You need to specify in alfresco-global.properties the next two properties:

trashcan-cleaner.cron=0 30 * * * ?
trashcan-cleaner.keepPeriod=P1D

Besides, you may configure log4j for getting more details (if you have OOTB Support Tools installed, you may even configure it from log4j section). Edit /opt/alfresco52g/tomcat/shared/classes/alfresco/extension/custom-log4j.properties

log4j.logger.org.alfresco.trashcan=debug

And then restart Alfresco service, Once restarted, you may check your logs (catalina.out) at each hour at the middle of the hour, or even force trashcan to do the job (once again with OOTB Support Tools addon). The retention in this case is for one day, so you should wait a day for these nodes to be considered in the cronjob. Once the job is executed, you should see something like this in catalina.out:

2017-08-02 18:37:32,430 DEBUG [alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-6] Running TrashcanCleaner
2017-08-02 18:37:32,483 DEBUG [alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-6] Found 0 nodes on trashcan
2017-08-02 18:37:32,484 DEBUG [alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-6] Number of nodes to delete: 0
2017-08-02 18:37:32,486 DEBUG [alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-6] Nodes deleted
2017-08-02 18:37:32,488 DEBUG [alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-6] TrashcanCleaner finished

 

Hope this helps to set up trashcan. I would say that the other problem (ldap sync) is not related with it.

Regards.

--C.

art
Champ on-the-rise
Champ on-the-rise

Hi!
Maybe I wrong describe this. Trashcan is really working, I see it in alfresco.log, but free space at local hard drive on my server is ending, despite the fact that the trash is empty. In Community I readin that trashcan-cleaner must erase old data from the alfresco-base, but it is not so. How I can free the space on my hard disk, if trashcan-cleaner don't do it?

cesarista
World-Class Innovator
World-Class Innovator

Hi:

Deleting trash does not imply "to delete content from disk". Then it starts a 14-day retention period, and after it, the deleted content is moved to contentstore.deleted. Then content may be removed from contentstore.deleted safely. The retention period is managed with the next property:

system.content.orphanProtectDays=14

You may change this parameter to 1 in alfresco-global.properties and restart Alfresco. After 1 day, you should see "the deleted content" in contentstore.deleted. Then you can remove content content safely.

Some links about Alfresco content lifecycle:

https://blyx.com/wp-content/uploads/2014/08/Slide1.png 

https://blog.dbi-services.com/understand-the-lifecycle-of-alfresco-nodes/ 

Regards.

--C.

art
Champ on-the-rise
Champ on-the-rise

Yeh! Thanks! It is Exactly what I was looking for! Actualy I not found this information earlyer, about contentstore.deleted. Thank you very much Smiley Happy