Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ksql v5.3.0 headless operation fails to start - java.lang.NullPointerException: null value in entry: ksql.security.extension.class #3171

Closed
saubury opened this issue Aug 5, 2019 · 6 comments

Comments

@saubury
Copy link

saubury commented Aug 5, 2019

KSQL server in headless mode (ie., using a --queries-file parameter for ksql-server-start) fails to start with fatal error

ERROR Failed to start KSQL (io.confluent.ksql.rest.server.KsqlServerMain:62)
java.lang.NullPointerException: null value in entry: ksql.security.extension.class=null

Steps to recreate

  • Create topic
kafka-topics --zookeeper localhost:2181 --create --partitions 1 --replication-factor 1 --topic MYTOPIC
  • Create queries file
cat > headless.ksql << EOF
create stream MYSTREAM with (kafka_topic='MYTOPIC', value_format='avro');
EOF
  • Stop running (interactive) server
confluent local stop ksql-server
  • Start KSQL Server in headless mode
/opt/confluent/bin/ksql-server-start /opt/confluent/etc/ksql/ksql-server.properties --queries-file=./headless.ksql

Server fails to start with error

[2019-08-06 07:27:01,242] ERROR Failed to start KSQL (io.confluent.ksql.rest.server.KsqlServerMain:62)
java.lang.NullPointerException: null value in entry: ksql.security.extension.class=null
	at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:32)
	at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:100)
	at com.google.common.collect.RegularImmutableMap.fromEntries(RegularImmutableMap.java:74)
	at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:464)
	at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:437)
	at io.confluent.ksql.rest.server.computation.KafkaConfigStore$KsqlProperties.<init>(KafkaConfigStore.java:119)
	at io.confluent.ksql.rest.server.computation.KafkaConfigStore$KsqlProperties.createFor(KafkaConfigStore.java:127)
	at io.confluent.ksql.rest.server.computation.KafkaConfigStore.<init>(KafkaConfigStore.java:94)
	at io.confluent.ksql.rest.server.computation.KafkaConfigStore.<init>(KafkaConfigStore.java:80)
	at io.confluent.ksql.rest.server.StandaloneExecutorFactory.create(StandaloneExecutorFactory.java:100)
	at io.confluent.ksql.rest.server.StandaloneExecutorFactory.create(StandaloneExecutorFactory.java:53)
	at io.confluent.ksql.rest.server.KsqlServerMain.createExecutable(KsqlServerMain.java:90)
	at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:59)

Note - same issue occurs when using ksql.queries.file= setting within ksql-server.properties

@apurvam
Copy link
Contributor

apurvam commented Aug 5, 2019

This should be fixed by #3147, right @agavra ?

@agavra
Copy link
Contributor

agavra commented Aug 5, 2019

yes it should be fixed by #3147

@saubury
Copy link
Author

saubury commented Aug 6, 2019

Thanks. Is there a work-around for the time being (other than down-grading)?

It appears that ksql.security.extension.class is essentially mandatory in headless mode, and null is not a legal value?

@apurvam
Copy link
Contributor

apurvam commented Aug 13, 2019

@agavra I believe you have a couple of workarounds you shared on other channels. Can you post them here and close this out?

@agavra
Copy link
Contributor

agavra commented Aug 13, 2019

For ksql.security.extension.class a valid default is io.confluent.ksql.rest.server.security.KsqlDefaultSecurityExtension. Setting this will cause the default partitions and replication factor setting to complain about null values as well. Any value (e.g. 4, 2) is valid as long as you have sufficient kafka brokers setup.

@agavra agavra closed this as completed Aug 13, 2019
@saubury
Copy link
Author

saubury commented Aug 14, 2019

Thanks @agavra - that solution works well; thank-you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants