{"record":{"id":"501d6c1e6f5722fd","repo":"apache/dolphinscheduler","slug":"bucketname-bucketname-is-not-exists-you-need-t-501d6c","errorCode":null,"errorMessage":"bucketName: <bucketName> is not exists, you need to create them by yourself","messagePattern":"bucketName: <bucketName> is not exists, you need to create them by yourself","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/S3RemoteLogHandler.java","lineNumber":115,"sourceCode":"                }\n            }\n        } catch (Exception e) {\n            log.error(\"error while getting remote log on S3 {} to {}\", objectName, logPath, e);\n        }\n    }\n\n    protected String readBucketName() {\n        return PropertyUtils.getString(Constants.AWS_S3_BUCKET_NAME);\n    }\n\n    public void checkBucketNameExists(String bucketName) {\n        if (StringUtils.isBlank(bucketName)) {\n            throw new IllegalArgumentException(\"remote.logging.s3.bucket.name is blank\");\n        }\n\n        boolean existsBucket = s3Client.doesBucketExistV2(bucketName);\n        if (!existsBucket) {\n            throw new IllegalArgumentException(\n                    \"bucketName: \" + bucketName + \" is not exists, you need to create them by yourself\");\n        }\n\n        log.info(\"bucketName: {} has been found, the current regionName is {}\", bucketName,\n                s3Client.getRegionName());\n    }\n}\n","sourceCodeStart":97,"sourceCodeEnd":123,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/log/remote/S3RemoteLogHandler.java#L97-L123","documentation":"When the S3 bucket name is non-blank, S3RemoteLogHandler.checkBucketNameExists calls s3Client.doesBucketExistV2(bucketName). If AWS S3 reports the bucket does not exist (or is inaccessible to the credentials, since head-bucket style checks also fail on permission errors), this IllegalArgumentException is thrown.","triggerScenarios":"checkBucketNameExists is called with a valid non-blank name that doesBucketExistV2 cannot find: bucket never created, wrong region (client resolves region from bucket location), name typo, or credentials lacking s3:ListBucket/s3:HeadBucket on the bucket.","commonSituations":"Using a bucket name that exists in another AWS account; cross-region access where the S3 client's configured region differs; IAM policies restricting bucket visibility; renamed/deleted buckets in shared environments.","solutions":["Create the bucket yourself (aws s3 mb s3://<bucket> in the target region) — DolphinScheduler requires it to pre-exist","Correct remote.logging.s3.bucket.name typos in common.properties","Verify AWS credentials/IAM policy grant s3:HeadBucket or s3:ListBucket on the bucket","Set the S3 client region (remote.logging.s3.region or default AWS region chain) to the bucket's actual region"],"exampleFix":"// before\nremote.logging.s3.bucket.name=my-logs  // bucket doesn't exist in account\n\n// after\n$ aws s3 mb s3://my-logs --region us-east-1\n$ aws s3api head-bucket --bucket my-logs  # verify access\nremote.logging.s3.bucket.name=my-logs","handlingStrategy":"validation","validationCode":"// verify bucket existence/permission with the AWS SDK before enabling\nboolean exists = s3Client.doesBucketExistV2(bucketName);\nif (!exists) {\n    throw new IllegalStateException(\"S3 bucket \" + bucketName + \" not found or not accessible; run: aws s3api head-bucket --bucket \" + bucketName);\n}","typeGuard":null,"tryCatchPattern":"try {\n    s3RemoteLogHandler.checkBucketNameExists(bucketName);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"is not exists\")) {\n        log.error(\"Bucket {} missing/inaccessible: create it and check IAM + region\", bucketName);\n    }\n}","preventionTips":["Provision buckets in the same region the S3 client is configured for","Grant the worker's IAM role s3:HeadBucket/s3:ListBucket on the log bucket","Run aws s3api head-bucket as a deploy smoke test","Manage bucket names centrally to avoid typos across environments"],"tags":["configuration","s3","aws","bucket-not-found"],"backgroundTag":"resource-not-found","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}