The presto-cli fails with Query is gone (server restarted?) when trying to describe a table from Cassandra.
Error at presto server side:
WARN statement-response-5 com.facebook.presto.server.ThrowableMapper Request failed for /v1/statement/20200321_162656_00004_8zbfq/1
java.lang.NoClassDefFoundError: io/netty/util/Timer
at com.datastax.driver.core.Configuration$Builder.build(Configuration.java:317)
at com.datastax.driver.core.Cluster$Builder.getConfiguration(Cluster.java:1282)
at com.datastax.driver.core.Cluster.<init>(Cluster.java:113)
at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:178)
at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:1299)
at com.facebook.presto.cassandra.CassandraClientModule.lambda$createCassandraSession$0(CassandraClientModule.java:149)
at com.facebook.presto.cassandra.ReopeningCluster.delegate(ReopeningCluster.java:54)
at com.datastax.driver.core.DelegatingCluster.getConfiguration(DelegatingCluster.java:96)
at com.facebook.presto.cassandra.NativeCassandraSession.executeWithSession(NativeCassandraSession.java:531)
at com.facebook.presto.cassandra.NativeCassandraSession.getKeyspaceByCaseInsensitiveName(NativeCassandraSession.java:257)
at com.facebook.presto.cassandra.NativeCassandraSession.getTable(NativeCassandraSession.java:190)
at com.facebook.presto.cassandra.CassandraMetadata.getTableHandle(CassandraMetadata.java:104)
at com.facebook.presto.cassandra.CassandraMetadata.getTableHandle(CassandraMetadata.java:66)
at com.facebook.presto.metadata.MetadataManager.getTableHandle(MetadataManager.java:331)
at com.facebook.presto.sql.rewrite.ShowQueriesRewrite$Visitor.visitShowColumns(ShowQueriesRewrite.java:371)
at com.facebook.presto.sql.rewrite.ShowQueriesRewrite$Visitor.visitShowColumns(ShowQueriesRewrite.java:154)
at com.facebook.presto.sql.tree.ShowColumns.accept(ShowColumns.java:54)
at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:27)
at com.facebook.presto.sql.rewrite.ShowQueriesRewrite.rewrite(ShowQueriesRewrite.java:151)
at com.facebook.presto.sql.rewrite.StatementRewrite.rewrite(StatementRewrite.java:53)
at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:76)
at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:71)
at com.facebook.presto.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:194)
at com.facebook.presto.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:96)
at com.facebook.presto.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:733)
at com.facebook.presto.execution.SqlQueryManager.createQueryInternal(SqlQueryManager.java:366)
at com.facebook.presto.execution.SqlQueryManager.lambda$createQuery$4(SqlQueryManager.java:304)
at com.facebook.presto.$gen.Presto_0_233_e343965____20200321_162135_1.run(Unknown Source)
at com.facebook.airlift.concurrent.BoundedExecutor.drainQueue(BoundedExecutor.java:78)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: io.netty.util.Timer
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.facebook.presto.server.PluginClassLoader.loadClass(PluginClassLoader.java:80)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 32 more
How to solve this dependency issue?
We encountered the same issue with presto-0.233.1 while in version presto-0.228 everything works as intended. I assume this issue is caused by missing netty jars in _plugin/cassandra_, namely
netty-buffer-4.0.37.Final.jar
netty-codec-4.0.37.Final.jar
netty-common-4.0.37.Final.jar
netty-handler-4.0.37.Final.jar
netty-transport-4.0.37.Final.jar
Checking the commit history, 4b944705a8babd518e67b23507e74e85e3974341 removed the netty jars and I assume these jars should be substituted by _lib/netty-all-4.1.29.Final.jar_. Furthermore, we noticed that an additional old netty _lib/netty-all-4.1.29.Final.jar_ exists (not sure about jar shading, haven't checked it). Something in this area seems to be failing.
We will need to relocate netty library in the following files
https://github.com/prestodb/presto-cassandra-server/blob/master/pom.xml
https://github.com/prestodb/presto-cassandra-driver/blob/master/pom.xml
Thankyou @Ennosigaeon been trying to figure out why I couldn't get Presto to connect to Cassandra.. downgrading it worked!! Thank you :)
Thankyou @Ennosigaeon been trying to figure out why I couldn't get Presto to connect to Cassandra.. downgrading it worked!! Thank you :)
Hey, did you downgrade cassandra? Or presto?
I am facing the same issue and nothing seems to work for now.
I have following netty jars in my lib/ directory inside presto installation directory:
netty-3.6.2.Final.jar, netty-all-4.1.29.Final.jar
We downgraded to _presto-0.228_. After that there was no reason to modify any jar dependencies at all.
@Ennosigaeon presto-0.228 works great, have you tried any newer version of presto? Anyone else?
@codekaust We recently switched to PrestoSQL due to JSON support. So I am not sure, if any newer version would work. The changes that broke Cassandra were introduced between releases 0.228 and 0.229. We initially observed the problems in version 0.332.
@highker I added the release blocker label since it looks like the Cassandra connector is totally broken now.
Resolved by #14602
Still getting the same error with v0.236
java.lang.NoClassDefFoundError: io/netty/util/Timer
at com.datastax.driver.core.Configuration$Builder.build(Configuration.java:317)
at com.datastax.driver.core.Cluster$Builder.getConfiguration(Cluster.java:1282)
at com.datastax.driver.core.Cluster.<init>(Cluster.java:113)
at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:178)
at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:1299)
at com.facebook.presto.cassandra.CassandraClientModule.lambda$createCassandraSession$0(CassandraClientModule.java:149)
at com.facebook.presto.cassandra.ReopeningCluster.delegate(ReopeningCluster.java:54)
at com.datastax.driver.core.DelegatingCluster.getConfiguration(DelegatingCluster.java:96)
at com.facebook.presto.cassandra.NativeCassandraSession.executeWithSession(NativeCassandraSession.java:531)
at com.facebook.presto.cassandra.NativeCassandraSession.getKeyspaceByCaseInsensitiveName(NativeCassandraSession.java:257)
at com.facebook.presto.cassandra.NativeCassandraSession.getTable(NativeCassandraSession.java:190)
at com.facebook.presto.cassandra.CassandraMetadata.getTableHandle(CassandraMetadata.java:104)
at com.facebook.presto.cassandra.CassandraMetadata.getTableHandle(CassandraMetadata.java:66)
at com.facebook.presto.metadata.MetadataManager.getTableHandle(MetadataManager.java:328)
at com.facebook.presto.sql.rewrite.ShowQueriesRewrite$Visitor.visitShowColumns(ShowQueriesRewrite.java:387)
at com.facebook.presto.sql.rewrite.ShowQueriesRewrite$Visitor.visitShowColumns(ShowQueriesRewrite.java:169)
at com.facebook.presto.sql.tree.ShowColumns.accept(ShowColumns.java:54)
at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:27)
at com.facebook.presto.sql.rewrite.ShowQueriesRewrite.rewrite(ShowQueriesRewrite.java:166)
at com.facebook.presto.sql.rewrite.StatementRewrite.rewrite(StatementRewrite.java:53)
at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:76)
at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:71)
at com.facebook.presto.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:167)
at com.facebook.presto.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:90)
at com.facebook.presto.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:682)
at com.facebook.presto.dispatcher.LocalDispatchQueryFactory.lambda$createDispatchQuery$0(LocalDispatchQueryFactory.java:116)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: io.netty.util.Timer
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at com.facebook.presto.server.PluginClassLoader.loadClass(PluginClassLoader.java:80)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 32 more
fix should be in the 0.237 release