Skip to content

What is the proper way to run query with Trino CLI? #98

@heng2j

Description

@heng2j

Hi Team,

I tried to follow the article Enable federated governance using Trino and Apache Ranger on Amazon EMR and trying to test out the compatibility between Ranger and Trino.

After my EMR cluster stood via the Blog v3 Cloudformation template, I installed Trino-CLI on my EMR Cluster Master Node, and ensure Trino is running

[hadoop@ip-<EMR Cluster Master Node IP> ~]$ sudo systemctl status trino-server.service
● trino-server.service - Trino Server
   Loaded: loaded (/etc/systemd/system/trino-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2023-05-26 20:18:49 UTC; 9min ago
  Process: 32423 ExecStart=/usr/lib/trino/bin/launcher start --pid-file /var/run/trino/trino-server.pid --launcher-config /usr/lib/trino/bin/launcher.properties --node-config /etc/trino/conf/node.properties --jvm-config /etc/trino/conf/jvm.config --config /etc/trino/conf/config.properties --launcher-log-file /var/log/trino/launcher.log --server-log-file /var/log/trino/server.log --log-levels-file /etc/trino/conf/log.properties (code=exited, status=0/SUCCESS)
 Main PID: 32495 (trino-server)
    Tasks: 169
   Memory: 1.1G
   CGroup: /system.slice/trino-server.service
           └─32495 java -cp /usr/lib/trino/lib/* -verbose:class -server -Xmx13194139533 -XX:+UseG1GC -XX:G1HeapRegionSize=32M -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:OnOutOfMemoryError=kill -9 %p -XX:ReservedCodeCacheSize=...

However, when I tried to login to the master node as the user analyst1, and tried to run the simple query SHOW CATALOGS;, I got the following errors.

[analyst1@ip-<EMR Cluster Master Node IP> ~]$ trino --server https://ip-<EMR Cluster Master Node IP>.ec2.internal:8446
trino> SHOW CATALOGS;
Error running command: javax.net.ssl.SSLPeerUnverifiedException: Hostname ip-<EMR Cluster Master Node IP>.ec2.internal not verified:
    certificate: sha256/<...>
    DN: CN=*.ec2.internal, OU=EMR, O=EMR, L=Dallas, ST=TX, C=US
    subjectAltNames: []

Any recommendations for simply running queries on Trino-CLI with the current Ranger set up?

Thank you,
Heng

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions