apache / gravitino

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
https://gravitino.apache.org
Apache License 2.0
1.1k stars 348 forks source link

[Bug report] Trino can not to connect GravitinoServer causing JVM is shutdown #557

Closed xunliu closed 1 year ago

xunliu commented 1 year ago

Describe what's wrong

When I before used misconfiguration gravitino.server.webserver.host = 127.0.0.1 to start Gravitino Sever ./gravitino start. and start Trino Docker container

docker run --rm -it --name trino-coordinator -e HADOOP_USER_NAME=hive -v $(pwd)/trino-connector/build/libs:/usr/lib/trino/plugin/gravitino -v $(pwd)/dev/docker/trino/etc:/etc/trino -p 8080:8080 trinodb/trino:426

Trino report can not access Gravitino Server causing JVM is shutdown

Error message and/or stacktrace

2023-10-19T09:27:40.181Z    ERROR   gravitino-connector-schedule-0  com.datastrato.gravitino.trino.connector.catalog.CatalogConnectorManager Load Metalake test failed.
com.datastrato.gravitino.exceptions.RESTException: Error occurred while processing GET request
    at com.datastrato.gravitino.client.HTTPClient.execute(HTTPClient.java:364)
    at com.datastrato.gravitino.client.HTTPClient.execute(HTTPClient.java:264)
    at com.datastrato.gravitino.client.HTTPClient.get(HTTPClient.java:404)
    at com.datastrato.gravitino.client.RESTClient.get(RESTClient.java:158)
    at com.datastrato.gravitino.client.GravitinoClient.loadMetalake(GravitinoClient.java:89)
    at com.datastrato.gravitino.trino.connector.catalog.CatalogConnectorManager.loadMetalake(CatalogConnectorManager.java:97)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.apache.hc.client5.http.HttpHostConnectException: Connect to http://192.168.50.74:8090 [/192.168.50.74] failed: Connection refused
    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:554)
    at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602)
    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
    at java.base/java.net.Socket.connect(Socket.java:633)
    at org.apache.hc.client5.http.socket.PlainConnectionSocketFactory.lambda$connectSocket$0(PlainConnectionSocketFactory.java:85)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    at org.apache.hc.client5.http.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:84)
    at org.apache.hc.client5.http.socket.ConnectionSocketFactory.connectSocket(ConnectionSocketFactory.java:113)
    at org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:181)
    at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:447)
    at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:162)
    at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:172)
    at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:142)
    at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
    at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192)
    at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
    at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:96)
    at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
    at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:152)
    at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
    at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:115)
    at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
    at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)
    at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:123)
    at com.datastrato.gravitino.client.HTTPClient.execute(HTTPClient.java:326)
    ... 11 more
2023-10-19T09:28:10.397Z    WARN    gravitino-connector-schedule-0  com.datastrato.gravitino.trino.connector.catalog.CatalogConnectorManager    Metalake test does not exist.
^C2023-10-19T09:28:15.005Z  INFO    Thread-73   io.airlift.bootstrap.LifeCycleManager   JVM is shutting down, cleaning up

How to reproduce

No response

Additional context

No response

diqiu50 commented 1 year ago

I have checked that Gravitino server connnection failure does not cause Trino to shut down. Trino works independently of the Gravitino server, and i suspect the reported bug is related to other confiuragtion issues. I cannot reproduce this problem.