prestodb/presto · critical · PrestoException

UNEXPECTED_ACCUMULO_ERROR

UNEXPECTED_ACCUMULO_ERROR

Error message

Failed to get connector to Accumulo

What it means

AccumuloModule's provider builds a ZooKeeperInstance and requests a Connector using configured instance name, ZooKeepers, username, and password. Any AccumuloException or AccumuloSecurityException during this is wrapped as UNEXPECTED_ACCUMULO_ERROR 'Failed to get connector to Accumulo', meaning the client could not authenticate or reach the instance.

Source

Thrown at presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloModule.java:159

        {
            requireNonNull(config, "config is null");
            this.instance = config.getInstance();
            this.zooKeepers = config.getZooKeepers();
            this.username = config.getUsername();
            this.password = config.getPassword();
        }

        @Override
        public Connector get()
        {
            try {
                Instance inst = new ZooKeeperInstance(instance, zooKeepers);
                Connector connector = inst.getConnector(username, new PasswordToken(password.getBytes(UTF_8)));
                LOG.info("Connection to instance %s at %s established, user %s", instance, zooKeepers, username);
                return connector;
            }
            catch (AccumuloException | AccumuloSecurityException e) {
                throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Failed to get connector to Accumulo", e);
            }
        }
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Verify catalog properties (instance, zookeepers, username, password) match the Accumulo cluster exactly.
  2. Test connectivity to ZooKeeper (nc/zkCli to zookeeper:2181) and confirm the instance name via 'accumulo info' or the monitor.
  3. Validate credentials with the Accumulo shell using the same username/password; reset the password if changed.
  4. Check Accumulo monitor/server logs for authentication or availability errors during the attempt.

Example fix

// before (catalog properties)
accumulo.instance=old-prod-instance
// after
accumulo.instance=prod-instance
accumulo.zookeepers=zk1:2181,zk2:2181,zk3:2181
accumulo.username=presto
accumulo.password=<correct-password>
Defensive patterns

Strategy: validation

Validate before calling

// Pre-flight check of config and connectivity before obtaining the connector:
Properties p = loadCatalogProperties("accumulo.properties");
assertPresent(p, "accumulo.instance", "accumulo.zookeepers", "accumulo.username", "accumulo.password");
try (Socket s = new Socket()) {
  s.connect(new InetSocketAddress(zkHost, 2181), 3000); // ZooKeeper reachable
}

Try / catch

try {
  Connector c = connectorSupplier.get();
} catch (PrestoException e) {
  if (e.getErrorCode().getName().equals("UNEXPECTED_ACCUMULO_ERROR")) {
    // verify instance name, ZooKeeper reachability, and credentials, then retry
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling the Supplier.get() that establishes the connector when the Accumulo instance name is wrong, ZooKeepers are unreachable, credentials are invalid, or Accumulo throws a security exception during getConnector.

Common situations: Misconfigured accumulo.instance/zookeepers/username/password in catalog properties; ZooKeeper quorum down or firewalled; Accumulo user password changed; instance name typo after cluster migration.

Understand the failure class

Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/8a19c024827cac68. Report an issue: GitHub.