I am getting the error below when I start up "image: confluentinc/ksqldb-server". The thing is we decided to put all future topics at 5 partitions as is in our server.properties file (num.partitions=5) So when I spin up initially a ksqldb-server instance all is fine but the moment I run my .sql file all Topics are created with 5 partitions. Then I go to another machine and start a ksqldb-server instance with the same "KSQL_KSQL_SERVICE_ID" trying to add it to the cluster and I get the error.
Any help would be appreciated.
[2020-06-15 08:25:35,049] ERROR Unhandled exception in server startup (io.confluent.ksql.rest.server.KsqlServerMain:76)
java.lang.IllegalStateException: Invalid partition count on topic '_confluent-ksql-ksqldb_my_command_topic'. Expected: 1, but was: 5
at io.confluent.ksql.rest.util.KsqlInternalTopicUtils.validateTopicConfig(KsqlInternalTopicUtils.java:101)
at io.confluent.ksql.rest.util.KsqlInternalTopicUtils.ensureTopic(KsqlInternalTopicUtils.java:64)
at io.confluent.ksql.rest.server.KsqlRestApplication.registerCommandTopic(KsqlRestApplication.java:797)
at io.confluent.ksql.rest.server.KsqlRestApplication.initialize(KsqlRestApplication.java:405)
at io.confluent.ksql.rest.server.KsqlRestApplication.startKsql(KsqlRestApplication.java:344)
at io.confluent.ksql.rest.server.KsqlRestApplication.startAsync(KsqlRestApplication.java:327)
at io.confluent.ksql.rest.server.KsqlServerMain.tryStartApp(KsqlServerMain.java:72)
at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:58)
[2020-06-15 08:25:35,052] INFO Server shutting down (io.confluent.ksql.rest.server.KsqlServerMain:79)
BTW: you cant decrease partitions, I thought let me do it to all the created topics but did not work.
[2020-06-15 12:00:50,131] ERROR org.apache.kafka.common.errors.InvalidPartitionsException: The number of partitions for a topic can only be increased. Topic MSG_SHOWN_TABLE currently has 5 partitions, 1 would not be an increase.