Nexus uses wrong "local" time for cleanup policies

Hi!

Could please someone suggest a fix for such issue
I noticed that Nexus cleaned one artefact and after checking logs it seems that nexus thinks it’s September 2020 now

nexus-2022-08-11.log.gz

2022-08-11 03:00:27,578+0200 INFO  [quartz-13-thread-18]  *SYSTEM org.sonatype.nexus.internal.script.ScriptTask - Releases_solo previous: com.company.webapp
2022-08-11 03:00:27,578+0200 INFO  [quartz-13-thread-18]  *SYSTEM org.sonatype.nexus.internal.script.ScriptTask - Releases_solo ComCount: 13, ReteCount: 10
2022-08-11 03:00:27,578+0200 INFO  [quartz-13-thread-18]  *SYSTEM org.sonatype.nexus.internal.script.ScriptTask - Releases_solo CompDate: 2020-09-09T11:17:18.523+02:00 RetDate: 2020-09-10T00:00:00.000+02:00
2022-08-11 03:00:27,579+0200 INFO  [quartz-13-thread-18]  *SYSTEM org.sonatype.nexus.internal.script.ScriptTask - Releases_solo compDate after retentionDate: 2020-09-09T11:17:18.523+02:00 isAfter 2020-09-10T00:00:00.000+02:00
2022-08-11 03:00:27,579+0200 INFO  [quartz-13-thread-18]  *SYSTEM org.sonatype.nexus.internal.script.ScriptTask - Releases_solo deleting com.company.webapp, my-webapp, version: 1.23.0
2022-08-11 03:00:28,063+0200 INFO  [quartz-13-thread-18]  *SYSTEM org.sonatype.nexus.internal.script.ScriptTask - Releases_solo component deleted

File itself was accessible the day before without issues
request-2022-08-10.log.gz

10.1.2.3 - - [10/aug/2022:13:39:00 +0200] "GET /repository/releases/com/company/webapp/my-webapp/1.23.0/my-webapp-1.23.0.war HTTP/1.1" 200 - 327609007 531 "Chef Client/14.10.9 (ruby-2.5.3-p105; ohai-14.8.10; x86_64-linux; +https://chef.io)" [qtp1578812745-3074436]

Nexus 3.32.0-03

Those log lines appear to be from a custom script, not our built-in cleanup policies (which is a licensed feature). Please contact the author of the script.

1 Like

Hi Mmartz, thanks for hint!
Found custom clean-up under
GET /v1/tasks