else currentAttempt.compareAndSet(handlerFuture, null); } catch (AuthenticationException e) { logger.error(e.getMessage()); long nextDelay = schedule.nextDelayMs(); if (onAuthenticationException(e, nextDelay)) { logger.error( "Retries against {} have been suspended. It won't be retried unless the node is restarted.", e.getHost()); currentAttempt.compareAndSet(handlerFuture, null);
@Override public DriverException copy() { return new AuthenticationException(address, getMessage(), this); } }
@Override public Authenticator newAuthenticator(InetSocketAddress host, String authenticator) { throw new AuthenticationException( host, String.format( "Host %s requires authentication, but no authenticator found in Cluster configuration", host)); } };
logger.error( "Authentication error while creating additional connection (error is: {})", e.getMessage()); return false; } catch (UnsupportedProtocolVersionException e) {
return new CassandraAuthenticationException(((AuthenticationException) exception).getHost(), exception.getMessage(), exception);
public Boolean call() { logger.debug("Adding {} to list of queried hosts", host); try { HostConnectionPool previous = pools.put(host, new HostConnectionPool(host, distance, SessionManager.this)); if (previous != null) previous.closeAsync(); // The previous was probably already shutdown but that's ok return true; } catch (AuthenticationException e) { logger.error("Error creating pool to {} ({})", host, e.getMessage()); cluster.manager.signalConnectionFailure(host, new ConnectionException(e.getAddress(), e.getMessage()), isHostAddition); return false; } catch (UnsupportedProtocolVersionException e) { logger.error("Error creating pool to {} ({})", host, e.getMessage()); cluster.manager.signalConnectionFailure(host, new ConnectionException(e.address, e.getMessage()), isHostAddition); return false; } catch (ConnectionException e) { logger.debug("Error creating pool to {} ({})", host, e.getMessage()); cluster.manager.signalConnectionFailure(host, e, isHostAddition); return false; } } });
authenticator); incrementAuthErrorMetric(); throw new AuthenticationException(address, message); default: throw new TransportException(
logger.error("Authentication error while creating additional connection (error is: {})", e.getMessage()); return false; } catch (UnsupportedProtocolVersionException e) {
return new CassandraAuthenticationException(((AuthenticationException) exception).getHost(), message, exception);
currentAttempt.compareAndSet(handlerFuture, null); } catch (AuthenticationException e) { logger.error(e.getMessage()); long nextDelay = schedule.nextDelayMs(); if (onAuthenticationException(e, nextDelay)) { reschedule(nextDelay); } else { logger.error("Retries against {} have been suspended. It won't be retried unless the node is restarted.", e.getHost()); currentAttempt.compareAndSet(handlerFuture, null);
@Override public DriverException copy() { return new AuthenticationException(address, getMessage(), this); } }
@Override public Authenticator newAuthenticator(InetSocketAddress host, String authenticator) { throw new AuthenticationException(host, String.format("Host %s requires authentication, but no authenticator found in Cluster configuration", host)); } };
logger.error("Authentication error while creating additional connection (error is: {})", e.getMessage()); closeAsync(); return false;
currentAttempt.compareAndSet(handlerFuture, null); } catch (AuthenticationException e) { logger.error(e.getMessage()); long nextDelay = schedule.nextDelayMs(); if (onAuthenticationException(e, nextDelay)) { reschedule(nextDelay); } else { logger.error("Retries against {} have been suspended. It won't be retried unless the node is restarted.", e.getHost()); currentAttempt.compareAndSet(handlerFuture, null);
@Override public DriverException copy() { return new AuthenticationException(address, getMessage(), this); } }
@Override public Authenticator newAuthenticator(InetSocketAddress host, String authenticator) { throw new AuthenticationException(host, String.format("Host %s requires authentication, but no authenticator found in Cluster configuration", host)); } };
logger.error("Authentication error while creating additional connection (error is: {})", e.getMessage()); return false; } catch (UnsupportedProtocolVersionException e) {
currentAttempt.compareAndSet(localFuture, null); } catch (AuthenticationException e) { logger.error(e.getMessage()); long nextDelay = schedule.nextDelayMs(); if (onAuthenticationException(e, nextDelay)) { reschedule(nextDelay); } else { logger.error("Retry against {} have been suspended. It won't be retried unless the node is restarted.", e.getHost()); currentAttempt.compareAndSet(localFuture, null);
@Override public DriverException copy() { return new AuthenticationException(address, getMessage(), this); } }
@Override public Authenticator newAuthenticator(InetSocketAddress host, String authenticator) { throw new AuthenticationException(host, String.format("Host %s requires authentication, but no authenticator found in Cluster configuration", host)); } };