looks like syntax issue with "sasl.jaas.config" config property or jaas conf file
On Tue, Oct 3, 2017 at 8:12 PM, Manikumar <manikumar.re...@gmail.com> wrote: > looks like syntax issue with "sasl.jaas.config" config property. > > On Tue, Oct 3, 2017 at 8:06 PM, Pekka Sarnila <sarn...@adit.fi> wrote: > >> The output below is actually from having >> >> security.protocol=SASL_PLAINTEXT >> >> in producer.properties. >> >> Actual error point I believe is: >> >> Caused by: java.lang.SecurityException: java.io.IOException: >> Configuration Error: >> Line 5: expected [option key] >> at sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java:137) >> >> Pekka >> >> >> On 10/03/17 17:21, Ted Yu wrote: >> >>> I think in producer.properties you should use: >>> >>> security.protocol=SASL_PLAINTEXT >>> >>> FYI >>> >>> On Tue, Oct 3, 2017 at 7:17 AM, Pekka Sarnila <sarn...@adit.fi> wrote: >>> >>> Hi, >>>> >>>> kafka_2.11-0.11.0.0 >>>> >>>> If I try to give --security-protocol xyz (xyz any value e.g. >>>> SASL_PLAINTEXT, PLAINTEXTSASL, SASL_SSL) I get error >>>> >>>> security-protocol is not a recognized option >>>> >>>> Also having security.protocol=xyz in producer.properties gives error >>>> >>>> org.apache.kafka.common.KafkaException: Failed to construct kafka >>>> producer >>>> at org.apache.kafka.clients.producer.KafkaProducer.<init>(Kafka >>>> Producer.java:415) >>>> at org.apache.kafka.clients.producer.KafkaProducer.<init>(Kafka >>>> Producer.java:287) >>>> at kafka.producer.NewShinyProducer.<init>(BaseProducer.scala:40 >>>> ) >>>> at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:48) >>>> at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala) >>>> Caused by: java.lang.SecurityException: java.io.IOException: >>>> Configuration >>>> Error: >>>> Line 5: expected [option key] >>>> at sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java: >>>> 137) >>>> at sun.security.provider.ConfigFile.<init>(ConfigFile.java:102) >>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ >>>> e >>>> Method) >>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance(Native >>>> ConstructorAccessorImpl.java:62) >>>> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De >>>> legatingConstructorAccessorImpl.java:45) >>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:4 >>>> 23) >>>> at java.lang.Class.newInstance(Class.java:442) >>>> at javax.security.auth.login.Configuration$2.run(Configuration. >>>> java:255) >>>> at javax.security.auth.login.Configuration$2.run(Configuration. >>>> java:247) >>>> at java.security.AccessController.doPrivileged(Native Method) >>>> at javax.security.auth.login.Configuration.getConfiguration(Con >>>> figuration.java:246) >>>> at org.apache.kafka.common.security.JaasContext.defaultContext( >>>> JaasContext.java:112) >>>> at org.apache.kafka.common.security.JaasContext.load(JaasContex >>>> t.java:96) >>>> at org.apache.kafka.common.security.JaasContext.load(JaasContex >>>> t.java:78) >>>> at org.apache.kafka.common.network.ChannelBuilders.create( >>>> ChannelBuilders.java:100) >>>> at org.apache.kafka.common.network.ChannelBuilders.clientChanne >>>> lBuilder(ChannelBuilders.java:58) >>>> at org.apache.kafka.clients.ClientUtils.createChannelBuilder(Cl >>>> ientUtils.java:88) >>>> at org.apache.kafka.clients.producer.KafkaProducer.<init>(Kafka >>>> Producer.java:374) >>>> ... 4 more >>>> Caused by: java.io.IOException: Configuration Error: >>>> Line 5: expected [option key] >>>> at sun.security.provider.ConfigFile$Spi.ioException(ConfigFile. >>>> java:666) >>>> at sun.security.provider.ConfigFile$Spi.match(ConfigFile.java:5 >>>> 62) >>>> at sun.security.provider.ConfigFile$Spi.parseLoginEntry( >>>> ConfigFile.java:477) >>>> at sun.security.provider.ConfigFile$Spi.readConfig(ConfigFile. >>>> java:427) >>>> at sun.security.provider.ConfigFile$Spi.init(ConfigFile.java:32 >>>> 9) >>>> at sun.security.provider.ConfigFile$Spi.init(ConfigFile.java:27 >>>> 1) >>>> at sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java: >>>> 135) >>>> ... 21 more >>>> >>>> Pekka >>>> >>>> >>> >