apache/flink · error · IllegalConfigurationException

s3.entropy.length must be > 0

Error message

s3.entropy.length must be > 0

What it means

Error "s3.entropy.length must be > 0" thrown in apache/flink.

Source

Thrown at flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/NativeS3FileSystemFactory.java:490

        }

        S3EncryptionConfig encryptionConfig =
                S3EncryptionConfig.fromConfig(
                        sseType,
                        sseKmsKeyId,
                        config.getOptional(SSE_KMS_ENCRYPTION_CONTEXT)
                                .orElse(Collections.emptyMap()));

        String entropyInjectionKey = config.get(ENTROPY_INJECT_KEY_OPTION);
        int numEntropyChars = -1;
        if (entropyInjectionKey != null) {
            if (entropyInjectionKey.matches(INVALID_ENTROPY_KEY_CHARS)) {
                throw new IllegalConfigurationException(
                        "Invalid character in entropy injection key: " + entropyInjectionKey);
            }
            numEntropyChars = config.get(ENTROPY_INJECT_LENGTH_OPTION);
            if (numEntropyChars <= 0) {
                throw new IllegalConfigurationException(
                        ENTROPY_INJECT_LENGTH_OPTION.key() + " must be > 0");
            }
        }

        final String[] localTmpDirectories = ConfigurationUtils.parseTempDirectories(config);
        Preconditions.checkArgument(
                localTmpDirectories.length > 0,
                "No temporary directories configured. "
                        + "Please configure at least one temp directory via 'io.tmp.dirs' or similar.");
        final String localTmpDirectory = localTmpDirectories[0];

        final long s3minPartSize = config.get(PART_UPLOAD_MIN_SIZE);
        final int maxConcurrentUploads = config.get(MAX_CONCURRENT_UPLOADS);

        // Validate part size: S3 requires minimum 5MB and maximum 5GB per part
        Preconditions.checkArgument(
                s3minPartSize >= S3_MULTIPART_MIN_PART_SIZE,
                "%s must be at least 5MB (5242880 bytes), but was %s bytes",

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Address the cause reported by the error message: s3.entropy.length must be > 0
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("s3.entropy.length must be > 0") and rerun the job or command.

When it happens

Trigger: Triggered at runtime when the operation fails because: s3.entropy.length must be > 0.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: s3.entropy.length must be > 0.


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/499b150b1f8c4b47. Report an issue: GitHub.