apache/rocketmq · error · AuthenticationException

Get user from RocksDB failed.

Error message

Get user from RocksDB failed.

What it means

Error "Get user from RocksDB failed." thrown in apache/rocketmq.

Source

Thrown at auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:172

    private static class UserCacheLoader implements CacheLoader<String, User> {
        private final ConfigRocksDBStorage storage;
        public static final User EMPTY_USER = new User();

        public UserCacheLoader(ConfigRocksDBStorage storage) {
            this.storage = storage;
        }

        @Override
        public User load(String username) {
            try {
                byte[] keyBytes = username.getBytes(StandardCharsets.UTF_8);
                byte[] valueBytes = storage.get(AUTH_METADATA_COLUMN_FAMILY, keyBytes);
                if (ArrayUtils.isEmpty(valueBytes)) {
                    return EMPTY_USER;
                }
                return JSON.parseObject(new String(valueBytes, StandardCharsets.UTF_8), User.class);
            } catch (Exception e) {
                throw new AuthenticationException("Get user from RocksDB failed.", e);
            }
        }
    }
}

View on GitHub (pinned to 293f588571)

Solutions

  1. Verify the username is correct and the user exists in the authentication metadata store.
  2. Check broker logs for RocksDB read errors (lock, corruption, missing directory) and resolve them.
  3. Restart the broker if the RocksDB instance failed to open, then retry the getUser operation.

When it happens

Trigger: Occurs when reading a user record from the local RocksDB-backed authentication metadata store fails.

Common situations: RocksDB read failure due to corrupted SST files, disk I/O errors, or deserialization failure of the stored user data.


AI-assisted analysis of apache/rocketmq@293f588571 (2026-08-14). Data as JSON: /api/errors/837cfea9b3ac1705. Report an issue: GitHub.