trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.43k stars 3k forks source link

Unknown access control error #19139

Closed HoiDam closed 1 year ago

HoiDam commented 1 year ago

Using Trino 380

  1. Ran this command to access trino

    
    java -jar .\trino-cli-426-executable.jar --debug --server https://ip:port --user=admin --password=true --insecure ```
  2. Entered password correctly.

  3. But when try to run use hive.default. This error popped

    java.io.UncheckedIOException: java.net.SocketException: Permission denied: no further information
        at io.trino.client.JsonResponse.execute(JsonResponse.java:146)
        at io.trino.client.StatementClientV1.<init>(StatementClientV1.java:126)
        at io.trino.client.StatementClientFactory.newStatementClient(StatementClientFactory.java:28)
        at io.trino.cli.QueryRunner.startInternalQuery(QueryRunner.java:99)
        at io.trino.cli.QueryRunner.startQuery(QueryRunner.java:85)
        at io.trino.cli.Console.process(Console.java:363)
        at io.trino.cli.Console.runConsole(Console.java:294)
        at io.trino.cli.Console.run(Console.java:192)
        at io.trino.cli.Console.call(Console.java:109)
        at io.trino.cli.Console.call(Console.java:79)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
        at picocli.CommandLine.execute(CommandLine.java:2170)
        at io.trino.cli.Trino.main(Trino.java:47)
    Caused by: java.net.SocketException: Permission denied: no further information
        at java.base/sun.nio.ch.Net.pollConnect(Native Method)
        at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
        at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:539)
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:594)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
        at java.base/java.net.Socket.connect(Socket.java:633)
        at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
        at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
        at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
        at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
        at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at io.trino.client.OkHttpUtil.lambda$basicAuth$1(OkHttpUtil.java:86)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
        at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
        at io.trino.client.JsonResponse.execute(JsonResponse.java:113)
        ... 18 more

Anyone have ideas? Thanks!!!

HoiDam commented 1 year ago

accessControl rules.json:

{
        "catalogs": [
          {
            "user": "admin",
            "catalog": "*",
            "allow": "all"
          }
        ]
      }
HoiDam commented 1 year ago

Unrelated to access control. Firewall blocking issue. Case closed