0

I'm trying to connect presto to minio using the hive connector, however, when querying I get a connection refused message.

presto connector config:

connector.name=hive-hadoop2
hive.metastore=file
hive.metastore.catalog.dir=s3://airports/
hive.allow-drop-table=true
hive.s3.aws-access-key=accesskey
hive.s3.aws-secret-key=secretkey
hive.s3.endpoint=http://127.0.0.1:9000
hive.s3.path-style-access=true
hive.s3.ssl.enabled=false
hive.s3select-pushdown.enabled=true

error msg when trying to get the tables:

org.apache.http.conn.HttpHostConnectException: Connect to localhost:9000 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
Manfred Moser
  • 29,539
  • 13
  • 92
  • 123
  • I'm using prestosql version 332 and latest minio version. – Pascal Laenen Apr 19 '20 at 08:23
  • com.amazonaws.SdkClientException: Unable to execute HTTP request: Connect to 127.0.0.1:9000 [/127.0.0.1] failed: Connection refused (Connection refused) – Pascal Laenen Apr 19 '20 at 08:54
  • How do you run MinIO? – Piotr Findeisen Apr 19 '20 at 11:18
  • Currently running it in a docker container and I am able to connect to it programmatically and through the UI (I'm running everything for development and test purpose on my imac using docker compose) – Pascal Laenen Apr 19 '20 at 11:35
  • If Presto is inside docker too, 127.0.0.1 will point to Presto container, not host system, so even if you bind 9000 port for MiniIO, Presto won't see it this way. The easiest solution would be to replace 127.0.0.1 with hostname of minio container, i.e. the service name in docker-compose.yml. – Piotr Findeisen Apr 19 '20 at 16:19
  • BTW there is [Presto community slack](https://prestosql.io/slack.html) were people get help with troubleshooting-type of problems (that don't really fit SO that well) on the `#troubleshooting` channel. See you there! – Piotr Findeisen Apr 19 '20 at 16:21
  • Thank very much for your feedback, I'll try to reconfigure as suggested. – Pascal Laenen Apr 19 '20 at 17:21
  • "connection refused" is the standard TCP error when there is nothing at the far end. Check for (hostname, port, service not running, weird loopback IP addresses, portmapping confusion. As S3 is just HTTP/HTTPS, point your browser at it and see what you get (or use curl) – stevel Apr 24 '20 at 17:36

0 Answers0