Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

apache kafka - ERROR Failed to handle: Command{statement : This version of ksqlDB does not support executing statements submitted prior to ksqlDB 0.8.0

I had tried creating stream by installing ksql server and client using confluent zip / tar file and it had worked . For example create stream statement in the log below worked well using ksql-cli.

But when I started ksql server using docker-compose up following link https://ksqldb.io/quickstart.html (by closing previous ksql-server) its gives error below and probably because of this ksql-cli is not getting connected to ksql-server using docker exec -it ksqldb-cli ksql http://0.0.0.0:8088 and giving error Couldn't connect to the KSQL server: KSQL is not yet ready to serve requests.

ksqldb-server    | [2021-01-12 17:16:05,182] ERROR Failed to handle: Command{statement='CREATE STREAM persons (version int, id int, type string, data string) WITH (kafka_topic='prod.trail', value_format='json');', overwriteProperties={}, version=Optional.empty} (io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor:214)
ksqldb-server    | io.confluent.ksql.util.KsqlException: This version of ksqlDB does not support executing statements submitted prior to ksqlDB 0.8.0 or Confluent Platform ksqlDB 5.0. Please see the upgrading guide to upgrade.
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.throwUnsupportedStatementError(InteractiveStatementExecutor.java:309)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.executeStatement(InteractiveStatementExecutor.java:279)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.handleStatementWithTerminatedQueries(InteractiveStatementExecutor.java:212)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.handleRestore(InteractiveStatementExecutor.java:135)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.CommandRunner.lambda$null$3(CommandRunner.java:276)
ksqldb-server    |      at io.confluent.ksql.util.RetryUtil.retryWithBackoff(RetryUtil.java:89)
ksqldb-server    |      at io.confluent.ksql.util.RetryUtil.retryWithBackoff(RetryUtil.java:60)
ksqldb-server    |      at io.confluent.ksql.util.RetryUtil.retryWithBackoff(RetryUtil.java:41)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.CommandRunner.lambda$processPriorCommands$4(CommandRunner.java:272)
ksqldb-server    |      at java.base/java.lang.Iterable.forEach(Iterable.java:75)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.CommandRunner.processPriorCommands(CommandRunner.java:269)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlRestApplication.initialize(KsqlRestApplication.java:437)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlRestApplication.startKsql(KsqlRestApplication.java:367)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlRestApplication.startAsync(KsqlRestApplication.java:350)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlServerMain.tryStartApp(KsqlServerMain.java:91)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:66)
ksqldb-server    | [2021-01-12 17:16:05,183] ERROR Exception encountered running command: This version of ksqlDB does not support executing statements submitted prior to ksqlDB 0.8.0 or Confluent Platform ksqlDB 5.0. Please see the upgrading guide to upgrade.. Retrying in 5000 ms (io.confluent.ksql.util.RetryUtil:106)
ksqldb-server    | [2021-01-12 17:16:05,183] ERROR Stack trace: io.confluent.ksql.util.KsqlException: This version of ksqlDB does not support executing statements submitted prior to ksqlDB 0.8.0 or Confluent Platform ksqlDB 5.0. Please see the upgrading guide to upgrade.
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.throwUnsupportedStatementError(InteractiveStatementExecutor.java:309)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.executeStatement(InteractiveStatementExecutor.java:279)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.handleStatementWithTerminatedQueries(InteractiveStatementExecutor.java:212)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.handleRestore(InteractiveStatementExecutor.java:135)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.CommandRunner.lambda$null$3(CommandRunner.java:276)
ksqldb-server    |      at io.confluent.ksql.util.RetryUtil.retryWithBackoff(RetryUtil.java:89)
ksqldb-server    |      at io.confluent.ksql.util.RetryUtil.retryWithBackoff(RetryUtil.java:60)
ksqldb-server    |      at io.confluent.ksql.util.RetryUtil.retryWithBackoff(RetryUtil.java:41)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.CommandRunner.lambda$processPriorCommands$4(CommandRunner.java:272)
ksqldb-server    |      at java.base/java.lang.Iterable.forEach(Iterable.java:75)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.CommandRunner.processPriorCommands(CommandRunner.java:269)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlRestApplication.initialize(KsqlRestApplication.java:437)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlRestApplication.startKsql(KsqlRestApplication.java:367)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlRestApplication.startAsync(KsqlRestApplication.java:350)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlServerMain.tryStartApp(KsqlServerMain.java:91)
ksqldb-server    |      at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:66)
ksqldb-server    |  (io.confluent.ksql.util.RetryUtil:110)
ksqldb-server    | [2021-01-12 17:16:10,184] ERROR Failed to handle: Command{statement='CREATE STREAM persons (version int, id int, type string, data string) WITH (kafka_topic='prod.trail', value_format='json');', overwriteProperties={}, version=Optional.empty} (io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor:214)
ksqldb-server    | io.confluent.ksql.util.KsqlException: This version of ksqlDB does not support executing statements submitted prior to ksqlDB 0.8.0 or Confluent Platform ksqlDB 5.0. Please see the upgrading guide to upgrade.
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.throwUnsupportedStatementError(InteractiveStatementExecutor.java:309)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.executeStatement(InteractiveStatementExecutor.java:279)
ksqldb-server    |      at io.confluent.ksql.rest.server.computation.InteractiveStatementExecutor.handleStatementWithTerminatedQueries(InteractiveStatementExecutor.java:212)
ksqldb-server    |      

I am totally new to kafka/ksql. Couldn't find much luck about this on internet. Can anybody help with this?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In a fresh installation, without any shared data between the Docker-Compose version and the downloaded archive, I wouldn't expect that to happen. Are you connecting to an existing Kafka cluster?

The Docker images use KSQLdb standalone server, which is a newer version than that which is bundled with Confluent Platform. This could be why you see errors regarding version issues.

There is an upgrade guide here, but if you are just playing around with sample data, you will want to clean up the topics that are used.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...