Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: EJBCA 6.9.0.6
-
Fix Version/s: EJBCA 6.9.0.6
-
Component/s: None
-
Labels:
-
Issue discovered during:Customer
-
Epic Link:
-
Sprint:EJBCA Sprint 1
Description
CAA Validator fails for a SocketTimeoutException. Since this can happen during standard operating procedure (due to rate limiting), EJBCA should be made far less fragile and instead retry. A customer has sent in the following patch:
while(connectionAttempts < maxConnectionAttempts) { connectionAttempts++; try { response = resolver.send(Message.newQuery(queryRecord)); if(response.getRcode() == Rcode.REFUSED || response.getRcode() == Rcode.SERVFAIL ) { //For these two options, give a few more attempts, with a slight delay. try { log.debug("Failed to lookup '"+recordName+"' with rcode: "+response.getRcode()+", trying 3 times. connectionAttempts="+connectionAttempts); Thread.sleep(500); } catch (InterruptedException e) { throw new IllegalStateException(e); } } else { break; } } catch (IOException e) { /* Patch to retry on SocketTimeoutException */ // *** patch removed //In spite of what the method spec states, it doesn't actually throw this // *** patch removed throw new IllegalStateException(e); log.info("IOException encountered in lookup '"+recordName+"', trying 3 times. connectionAttempts="+connectionAttempts); try { Thread.sleep(1000*connectionAttempts); } catch (InterruptedException int_e) { throw new IllegalStateException(int_e); } } }
It doesn't need to be solved exactly like this, but it's a good hint (and works for that customer).
Attachments
Issue Links
- is related to
-
ECA-6149 Fill in default CAA Validator timout in the UI
-
- Closed
-