[RTFACT-18524] When loginBlockDelay is set to 0, upgrades since version 6.7 will fail Created: 15/Feb/19  Updated: 18/Feb/19  Resolved: 17/Feb/19

Status: Resolved
Project: Artifactory Binary Repository
Component/s: None
Affects Version/s: 6.7.0, 6.7.3
Fix Version/s: 6.8.1

Type: Bug Priority: Blocker
Reporter: Angello Maggio Assignee: Nadav Yogev
Resolution: Fixed Votes: 0
Labels: None
Environment:

Both test Postgres DB 9.6.2

One one RPM installation and one Zip installation.

RPM was ugpraded 6.4.0 to 6.7.3, Zip was upgraded 6.6 to 6.7.3.

 


Issue Links:
Duplicate
duplicates RTFACT-18533 if security.loginBlockDelay is set to... Resolved
Assigned QA: Andrey Tashlitsky

 Description   

The bug doesn’t affect new installations, only those that have changed the system properties to have artifactory.security.loginBlockDelay=0

Previously to workaround a different JIRA (RTFACT-18301) we recommended to set this value. However to fix that same JIRA, the formula to calculate was delayed, adding a division into the equation. When this value is set to 0 this division will be undefined (division by zero).

After boot the upgrade will output the following:

2019-02-14 20:09:17,444 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:96) - Application could not be initialized: / by zero

...

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userLockInMemoryServiceImpl' defined in URL [jar:file:/opt/jfrog/artifactory/tomcat/webapps/artifactory/WEB-INF/lib/artifactory-storage-db-6.7.3.jar!/org/artifactory/storage/db/security/service/UserLockInMemoryServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.artifactory.storage.db.security.service.UserLockInMemoryServiceImpl]: Constructor threw exception; nested exception is java.lang.ArithmeticException: / by zero

 

After setting artifactory.security.loginBlockDelay=2, we were able to restart and fix the issue.

 

 


Generated at Tue Oct 22 23:41:20 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.