redis/jedis · error · JedisValidationException
Endpoint does not exist.
Error message
Endpoint does not exist.
What it means
MultiDbClient.getWeight looks up the Database registered for the given Endpoint in the MultiDbConnectionProvider. If no database is registered under that endpoint, it throws JedisValidationException "Endpoint <endpoint> does not exist."
Solutions
- List configured databases and confirm the exact endpoint (host and port) before calling getWeight
- Use the same Endpoint instance or an equal one that was passed to the builder/addDatabase
- Catch JedisValidationException if the endpoint may legitimately be absent
Example fix
// before
float w = client.getWeight(Endpoint.builder().host("localhost").port(6380).build()); // not registered
// after
Endpoint ep = Endpoint.builder().host("localhost").port(6379).build(); // endpoint actually added to the config
float w = client.getWeight(ep); Defensive patterns
Strategy: try-catch
Validate before calling
// Verify registration before reading a weight
Database db = provider.getDatabase(endpoint);
if (db == null) {
throw new IllegalArgumentException("Endpoint not registered: " + endpoint);
} Try / catch
try {
float w = client.getWeight(ep);
} catch (JedisValidationException e) {
logger.warn("Endpoint not configured: {}", ep);
} Prevention
- Store Endpoint objects you registered and reuse them instead of rebuilding by hand
- Check host and port equality carefully (same scheme/URI construction)
- Account for concurrent removeDatabase calls when reading weights
When it happens
Trigger: Calling getWeight(Endpoint) with an endpoint that was never added, was removed via removeDatabase, or an Endpoint instance that does not equal (host/port/URI semantics) any registered one.
Common situations: Typos or port mismatches when constructing the Endpoint; querying a weight after removing the database; using an Endpoint built with a different scheme/URI form than the one configured.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- failed to connect. Please check configuration and try again.
- It is not allowed to create Transaction from this
- DatabaseClientConfigs are required for…
- DatabaseClientConfigs must not contain null elements
- MultiDbConfig must not be NULL for MultiDbConnectionProvider
AI-assisted analysis of redis/jedis@6dac31d4c2 (2026-09-08).
Data as JSON: /api/errors/c836fa1773856f0c.
Report an issue: GitHub.
Appendix: source
Thrown at src/main/java/redis/clients/jedis/MultiDbClient.java:203
* @return the health status of the endpoint
*/
public boolean isHealthy(Endpoint endpoint) {
return getMultiDbConnectionProvider().isHealthy(endpoint);
}
/**
* Returns the weight of the specified database.
* <p>
* This method provides the current weight of a specific endpoint.
* </p>
* @param endpoint the endpoint to check
* @throws redis.clients.jedis.exceptions.JedisValidationException if the endpoint doesn't exist
* @return the weight of the endpoint
*/
public float getWeight(Endpoint endpoint) {
Database db = getMultiDbConnectionProvider().getDatabase(endpoint);
if (db == null) {
throw new JedisValidationException("Endpoint " + endpoint + " does not exist.");
}
return db.getWeight();
}
/**
* Sets the weight of the specified database.
* <p>
* This method allows changing the weight of a specific endpoint at runtime. The weight determines
* the priority of the endpoint during failover operations.
* </p>
* @param endpoint the endpoint to change
* @param weight the new weight for the endpoint
* @throws redis.clients.jedis.exceptions.JedisValidationException if the endpoint doesn't exist
*/
public void setWeight(Endpoint endpoint, float weight) {
Database db = getMultiDbConnectionProvider().getDatabase(endpoint);
if (db == null) {
throw new JedisValidationException("Endpoint " + endpoint + " does not exist.");View on GitHub (pinned to 6dac31d4c2)