汇合平台s3连接器不工作

kokeuurv  于 2021-06-05  发布在  Kafka
关注(0)|答案(0)|浏览(379)

我尝试使用下面的s3sinkconnector配置连接s3 bucket,状态显示degraded/failed

{
  "name": "mytestkafkatopic1",
  "connector.class": "io.confluent.connect.s3.S3SinkConnector",
  "topics": "mytestkafkatopic1",
  "format.class": "io.confluent.connect.s3.format.avro.AvroFormat",
  "flush.size": "10",
  "rotate.interval.ms": "-1",
  "rotate.schedule.interval.ms": "180000",
  "enhanced.avro.schema.support": "true",
  "s3.bucket.name": "bucket************",
  "s3.region": "us-east-1",
  "s3.part.size": "26214400",
  "storage.class": "io.confluent.connect.s3.storage.S3Storage",
  "store.url": "http://bucket.s3-aws-region.amazonaws.com",
  "directory.delim": "/",
  "file.delim": "+",
  "value.converter": "io.confluent.connect.avro.AvroConverter",
  "value.converter.schema.registry.url": "http://localhost:8081",
  "value.converter.schemas.enable": "true",
  "schema.generator.class": "io.confluent.connect.storage.hive.schema.DefaultSchemaGenerator",
  "partitioner.class": "io.confluent.connect.storage.partitioner.TimeBasedPartitioner",
  "schema.compatibility": "FULL",
  "tasks.max": "3",
  "topics.dir": "connect",
  "partition.duration.ms": "3600000",
  "locale": "en_US",
  "timezone": "UTC",
  "timestamp.extractor": "RecordField",
  "timestamp.field": "time"
}


连接器的http端点状态-

$ curl http://localhost:8083/connectors/mytestkafkatopic1/status
{
    "name": "mytestkafkatopic1",
    "connector": {
        "state": "RUNNING",
        "worker_id": "connect:8083"
    },
    "tasks": [{
        "id": 0,
        "state": "FAILED",
        "worker_id": "connect:8083",
        "trace": "org.apache.kafka.connect.errors.ConnectException: com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain\n\tat io.confluent.connect.s3.S3SinkTask.start(S3SinkTask.java:121)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:301)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:189)\n\tat org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177)\n\tat org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain\n\tat com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:131)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.getCredentialsFromContext(AmazonHttpClient.java:1115)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.runBeforeRequestHandlers(AmazonHttpClient.java:764)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:728)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:721)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:704)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:672)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:654)\n\tat com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:518)\n\tat com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4185)\n\tat com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4132)\n\tat com.amazonaws.services.s3.AmazonS3Client.headBucket(AmazonS3Client.java:1302)\n\tat com.amazonaws.services.s3.AmazonS3Client.doesBucketExist(AmazonS3Client.java:1259)\n\tat io.confluent.connect.s3.storage.S3Storage.bucketExists(S3Storage.java:169)\n\tat io.confluent.connect.s3.S3SinkTask.start(S3SinkTask.java:108)\n\t... 9 more\n"
    }, {
        "id": 1,
        "state": "FAILED",
        "worker_id": "connect:8083",
        "trace": "org.apache.kafka.connect.errors.ConnectException: com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain\n\tat io.confluent.connect.s3.S3SinkTask.start(S3SinkTask.java:121)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:301)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:189)\n\tat org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177)\n\tat org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain\n\tat com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:131)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.getCredentialsFromContext(AmazonHttpClient.java:1115)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.runBeforeRequestHandlers(AmazonHttpClient.java:764)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:728)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:721)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:704)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:672)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:654)\n\tat com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:518)\n\tat com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4185)\n\tat com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4132)\n\tat com.amazonaws.services.s3.AmazonS3Client.headBucket(AmazonS3Client.java:1302)\n\tat com.amazonaws.services.s3.AmazonS3Client.doesBucketExist(AmazonS3Client.java:1259)\n\tat io.confluent.connect.s3.storage.S3Storage.bucketExists(S3Storage.java:169)\n\tat io.confluent.connect.s3.S3SinkTask.start(S3SinkTask.java:108)\n\t... 9 more\n"
    }, {
        "id": 2,
        "state": "FAILED",
        "worker_id": "connect:8083",
        "trace": "org.apache.kafka.connect.errors.ConnectException: com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain\n\tat io.confluent.connect.s3.S3SinkTask.start(S3SinkTask.java:121)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:301)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:189)\n\tat org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177)\n\tat org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain\n\tat com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:131)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.getCredentialsFromContext(AmazonHttpClient.java:1115)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.runBeforeRequestHandlers(AmazonHttpClient.java:764)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:728)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:721)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:704)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:672)\n\tat com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:654)\n\tat com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:518)\n\tat com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4185)\n\tat com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4132)\n\tat com.amazonaws.services.s3.AmazonS3Client.headBucket(AmazonS3Client.java:1302)\n\tat com.amazonaws.services.s3.AmazonS3Client.doesBucketExist(AmazonS3Client.java:1259)\n\tat io.confluent.connect.s3.storage.S3Storage.bucketExists(S3Storage.java:169)\n\tat io.confluent.connect.s3.S3SinkTask.start(S3SinkTask.java:108)\n\t... 9 more\n"
    }],
    "type": "sink"
}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题