Hi Team, i'm trying to connect minio through apach...
# troubleshooting
m
Hi Team, i'm trying to connect minio through apache pinot when i'm trying to run yml files it is failing with this error. "*ERROR [LaunchDataIngestionJobCommand] [main] Got exception to kick off standalone data ingestion job -* java.lang.RuntimeException: software.amazon.awssdk.core.exception.SdkClientException: Configured region (localhost%3A9010) resulted in an invalid URI: https://s3.localhost%3A9010.amazonaws.com Valid region examples: " i started controller and server with controller.conf and server.conf and my yml file is "executionFrameworkSpec: name: 'standalone' segmentGenerationJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentGenerationJobRunner' segmentTarPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentTarPushJobRunner' segmentUriPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentUriPushJobRunner' jobType: SegmentCreationAndUriPush inputDirURI: 'http://localhost:39391/buckets/test/' *includeFileNamePattern: 'glob:**/*.csv'* outputDirURI: 'http://localhost:39391/buckets/pinot-output/' overwriteOutput: true pinotFSSpecs: - scheme: http className: org.apache.pinot.plugin.filesystem.S3PinotFS configs: region: 'localhost:9010' recordReaderSpec: dataFormat: 'csv' className: 'org.apache.pinot.plugin.inputformat.csv.CSVRecordReader' configClassName: 'org.apache.pinot.plugin.inputformat.csv.CSVRecordReaderConfig' tableSpec: tableName: 'transcript' schemaURI: 'http://localhost:9000/tables/transcript/schema' tableConfigURI: 'http://localhost:9000/tables/transcript/' pinotClusterSpecs: *- controllerURI: 'http://localhost:9000'*"
m
are you wanting to store stuff in S3? If so then this is an invalid AWS region:
Copy code
region: 'localhost:9010'
m
actually i'm using minio not s3 .
m
got it. So I think we need to pass in
endpoint
(https://github.com/apache/pinot/blob/master/pinot-plugins/pinot-file-system/pinot-s3/src/main/java/org/apache/pinot/plugin/filesystem/S3PinotFS.java#L136) Can you try this:
Copy code
pinotFSSpecs:
  - scheme: http
    className: org.apache.pinot.plugin.filesystem.S3PinotFS
    configs:
      region: 'us-east-1'
      endpoint: '<http://localhost:9010>'
m
Now it's throwing connection refused error.ERROR [LaunchDataIngestionJobCommand] [main] Got exception to kick off standalone data ingestion job - software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Connect to localhost:9010 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
m
is it the right endpoint? I was trying to guess what it should be from following this tutorial - https://docs.min.io/docs/aws-cli-with-minio
m
Hi Mark, i'm using minio public account to access data from minio i'm facing this issue "*ERROR [LaunchDataIngestionJobCommand] [main] Got exception to kick off standalone data ingestion job -* software.amazon.awssdk.services.s3.model.S3Exception: The AWS Access Key Id you provided does not exist in our records. (Service: S3, Status Code: 403, Request ID: M4NGSS6PPRBP2DJ6, Extended Request ID: /0wE5yHVkh0LtoL+Sy6SetfcRuHSUdt4ZRATk3k6vyzuSaAFoLf3Szb9xOrkXvi44e1cKNdGIjA=)"
m
are you passing in valid
accessKey
and
secretKey
under the configs section?
m
Yeah Mark i passed that too now it is working but at the end "java.lang.RuntimeException: Failed to read from Schema URI - 'http://localhost:9000/tables/transcript_minio/schema" facing this issue
m
ah cool ok, making some progress
do you have
transcript_minio
somewhere? I can't see it...
m
I created in pinot
I changed that table name and schema name now we are using transcript_minio only
m
oh I see
can you paste the ingestion job yaml again (xxx out your AWS credentials though)
m
i passed credentials through command
executionFrameworkSpec: name: 'standalone' segmentGenerationJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentGenerationJobRunner' segmentTarPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentTarPushJobRunner' segmentUriPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentUriPushJobRunner' jobType: SegmentCreationAndUriPush inputDirURI: 's3://pinot-bucket/' includeFileNamePattern: 'glob:**/*.csv' outputDirURI: 's3://pinot-output/' overwriteOutput: true pinotFSSpecs: - scheme: s3 className: org.apache.pinot.plugin.filesystem.S3PinotFS configs: region: 'us-east-1' endpoint: 'https://play.min.io:9000' recordReaderSpec: dataFormat: 'csv' className: 'org.apache.pinot.plugin.inputformat.csv.CSVRecordReader' configClassName: 'org.apache.pinot.plugin.inputformat.csv.CSVRecordReaderConfig' tableSpec: tableName: 'transcript_minio' schemaURI: 'http://localhost:9000/tables/transcript_minio/schema' tableConfigURI: 'http://localhost:9000/tables/transcript_minio' pinotClusterSpecs: - controllerURI: 'http://localhost:9000'
m
m
Yeah I can see schema
m
hmmm, I wonder why the ingestion job can't access it then
Try this one:
Copy code
executionFrameworkSpec:
  name: 'standalone'
  segmentGenerationJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentGenerationJobRunner'
  segmentTarPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentTarPushJobRunner'
  segmentUriPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentUriPushJobRunner'
jobType:  SegmentCreationAndUriPush
inputDirURI: '<s3://pinot-bucket/>'
includeFileNamePattern: 'glob:**/*.csv'
outputDirURI: '<s3://pinot-output/>'
overwriteOutput: true
pinotFSSpecs:
  - scheme: s3
    className: org.apache.pinot.plugin.filesystem.S3PinotFS
    configs:
      region: 'us-east-1'
      endpoint: '<https://play.min.io:9000>'
recordReaderSpec:
  dataFormat: 'csv'
  className: 'org.apache.pinot.plugin.inputformat.csv.CSVRecordReader'
  configClassName: 'org.apache.pinot.plugin.inputformat.csv.CSVRecordReaderConfig'
tableSpec:
  tableName: 'transcript_minio'
pinotClusterSpecs:
  - controllerURI: '<http://localhost:9000>'
in theory that's exactly the same as it will infer the schema/table config URIs
m
ok let me try
no use mark.same error.
m
can you paste the whole stack trace so I can see which line it's failing on
m
sudo docker run --rm -ti \
--name pinot-ingestion-job \
-v //tmp/pinot-quick-start:/tmp/pinot-quick-start \
--network=pinot-demo \
--env AWS_ACCESS_KEY_ID="Q3AM3UQ867SPQQA43P2F" \
--env AWS_SECRET_ACCESS_KEY="zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG" \
--mount type=bind,source=/tmp/pinot-s3-docker,target=/tmp \
apachepinot/pinot:latest LaunchDataIngestionJob \
-jobSpecFile /tmp/pinot-quick-start/transcript-s3.yml
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jarfile/opt/pinot/lib/pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jarfile/opt/pinot/plugins/pinot-input-format/pinot-parquet/pinot-parquet-0.10.0-SNAPSHOT-shaded.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jarfile/opt/pinot/plugins/pinot-environment/pinot-azure/pinot-azure-0.10.0-SNAPSHOT-shaded.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jarfile/opt/pinot/plugins/pinot-metrics/pinot-yammer/pinot-yammer-0.10.0-SNAPSHOT-shaded.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jarfile/opt/pinot/plugins/pinot-metrics/pinot-dropwizard/pinot-dropwizard-0.10.0-SNAPSHOT-shaded.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jarfile/opt/pinot/plugins/pinot-file-system/pinot-s3/pinot-s3-0.10.0-SNAPSHOT-shaded.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/opt/pinot/lib/pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar) to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2021/12/01 102346.227 ERROR [LaunchDataIngestionJobCommand] [main] Got exception to kick off standalone data ingestion job - java.lang.RuntimeException: Failed to read from Schema URI - 'http://localhost:9000/tables/transcript_minio_tbl/schema' at org.apache.pinot.common.segment.generation.SegmentGenerationUtils.getSchema(SegmentGenerationUtils.java:89) ~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at org.apache.pinot.plugin.ingestion.batch.standalone.SegmentGenerationJobRunner.init(SegmentGenerationJobRunner.java:144) ~[pinot-batch-ingestion-standalone-0.10.0-SNAPSHOT-shaded.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at org.apache.pinot.spi.ingestion.batch.IngestionJobLauncher.kickoffIngestionJob(IngestionJobLauncher.java:144) ~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at org.apache.pinot.spi.ingestion.batch.IngestionJobLauncher.runIngestionJob(IngestionJobLauncher.java:121) ~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at org.apache.pinot.tools.admin.command.LaunchDataIngestionJobCommand.execute(LaunchDataIngestionJobCommand.java:120) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at org.apache.pinot.tools.Command.call(Command.java:33) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at org.apache.pinot.tools.Command.call(Command.java:29) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at picocli.CommandLine.executeUserObject(CommandLine.java:1953) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at picocli.CommandLine.access$1300(CommandLine.java:145) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at picocli.CommandLine.execute(CommandLine.java:2078) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at org.apache.pinot.tools.admin.PinotAdministrator.execute(PinotAdministrator.java:161) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at org.apache.pinot.tools.admin.PinotAdministrator.main(PinotAdministrator.java:192) [pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[?:?] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[?:?] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[?:?] at java.net.Socket.connect(Socket.java:609) ~[?:?] at java.net.Socket.connect(Socket.java:558) ~[?:?] at sun.net.NetworkClient.doConnect(NetworkClient.java:182) ~[?:?] at sun.net.www.http.HttpClient.openServer(HttpClient.java:474) ~[?:?] at sun.net.www.http.HttpClient.openServer(HttpClient.java:569) ~[?:?] at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) ~[?:?] at sun.net.www.http.HttpClient.New(HttpClient.java:341) ~[?:?] at sun.net.www.http.HttpClient.New(HttpClient.java:362) ~[?:?] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253) ~[?:?] at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) ~[?:?] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) ~[?:?] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015) ~[?:?] at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592) ~[?:?] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520) ~[?:?] at org.apache.pinot.common.segment.generation.SegmentGenerationUtils.fetchUrl(SegmentGenerationUtils.java:233) ~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] at org.apache.pinot.common.segment.generation.SegmentGenerationUtils.getSchema(SegmentGenerationUtils.java:87) ~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7b82584b3abc3e4bd679058a69604db828a6d25] ... 15 more java.lang.RuntimeException: Failed to read from Schema URI - 'http://localhost:9000/tables/transcript_minio_tbl/schema' at org.apache.pinot.common.segment.generation.SegmentGenerationUtils.getSchema(SegmentGenerationUtils.java:89) at org.apache.pinot.plugin.ingestion.batch.standalone.SegmentGenerationJobRunner.init(SegmentGenerationJobRunner.java:144) at org.apache.pinot.spi.ingestion.batch.IngestionJobLauncher.kickoffIngestionJob(IngestionJobLauncher.java:144) at org.apache.pinot.spi.ingestion.batch.IngestionJobLauncher.runIngestionJob(IngestionJobLauncher.java:121) at org.apache.pinot.tools.admin.command.LaunchDataIngestionJobCommand.execute(LaunchDataIngestionJobCommand.java:120) at org.apache.pinot.tools.Command.call(Command.java:33) at org.apache.pinot.tools.Command.call(Command.java:29) at picocli.CommandLine.executeUserObject(CommandLine.java:1953) at picocli.CommandLine.access$1300(CommandLine.java:145) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) at picocli.CommandLine.execute(CommandLine.java:2078) at org.apache.pinot.tools.admin.PinotAdministrator.execute(PinotAdministrator.java:161) at org.apache.pinot.tools.admin.PinotAdministrator.main(PinotAdministrator.java:192) Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) at java.base/java.net.Socket.connect(Socket.java:609) at java.base/java.net.Socket.connect(Socket.java:558) at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569) at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:242) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:341) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:362) at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520) at org.apache.pinot.common.segment.generation.SegmentGenerationUtils.fetchUrl(SegmentGenerationUtils.java:233) at org.apache.pinot.common.segment.generation.SegmentGenerationUtils.getSchema(SegmentGenerationUtils.java:87) ... 15 more
Caused by: java.io.IOException: software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Connect to play.min.io:9000 [play.min.io/147.75.201.93] failed: connect timed out
m
so is the problem reading from min.io or it's reading the schema?
m
Yeah
m
which one though?
m
Reading from minio
m
oh I see - is minio not accessible from inside that Docker container or something?
m
It's giving timeout exception
m
@Mahesh babu I made a little recipe on a sample dataset and I'm able to have the
tar.gz
file written to MinIO. I'm not entirely sure what I have different to you though - https://github.com/startreedata/pinot-recipes/tree/main/recipes/minio
m
Thank you ,I will try with this.
Hi Mark, Thank you for your support i'm able to connect minio. Thanks for you support.
🙌 1