[
https://issues.apache.org/jira/browse/ATLAS-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17381656#comment-17381656
]
ighack commented on ATLAS-4361:
-------------------------------
org.apache.kafka.common.KafkaException: Failed to construct kafka producer
at
org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:431)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:299)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.atlas.kafka.KafkaNotification.getOrCreateProducer(KafkaNotification.java:356)
~[atlas-notification-2.1.0.jar:2.1.0]
at
org.apache.atlas.kafka.KafkaNotification.sendInternal(KafkaNotification.java:262)
~[atlas-notification-2.1.0.jar:2.1.0]
at
org.apache.atlas.notification.AbstractNotification.send(AbstractNotification.java:89)
~[atlas-notification-2.1.0.jar:2.1.0]
at org.apache.atlas.hook.AtlasHook$3.run(AtlasHook.java:197)
~[atlas-notification-2.1.0.jar:2.1.0]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_271]
at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_271]
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1875)
~[hadoop-common-3.0.0-cdh6.3.2.jar:?]
at org.apache.atlas.hook.AtlasHook.notifyEntitiesInternal(AtlasHook.java:202)
[atlas-notification-2.1.0.jar:2.1.0]
at org.apache.atlas.hook.AtlasHook$2.run(AtlasHook.java:160)
[atlas-notification-2.1.0.jar:2.1.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:1.8.0_271]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_271]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_271]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_271]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271]
Caused by: org.apache.kafka.common.KafkaException:
javax.security.auth.login.LoginException: Could not login: the client is being
asked for a password, but the Kafka client code does not currently support
obtaining a password from the user. not available to garner authentication
information from the user
at
org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:160)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:439)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:420)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
... 15 more
Caused by: javax.security.auth.login.LoginException: Could not login: the
client is being asked for a password, but the Kafka client code does not
currently support obtaining a password from the user. not available to garner
authentication information from the user
at
com.sun.security.auth.module.Krb5LoginModule.promptForPass(Krb5LoginModule.java:944)
~[?:1.8.0_271]
at
com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:764)
~[?:1.8.0_271]
at
com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:617)
~[?:1.8.0_271]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_271]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_271]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_271]
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:755)
~[?:1.8.0_271]
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195)
~[?:1.8.0_271]
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682)
~[?:1.8.0_271]
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680)
~[?:1.8.0_271]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_271]
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
~[?:1.8.0_271]
at javax.security.auth.login.LoginContext.login(LoginContext.java:587)
~[?:1.8.0_271]
at
org.apache.kafka.common.security.authenticator.AbstractLogin.login(AbstractLogin.java:60)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.common.security.kerberos.KerberosLogin.login(KerberosLogin.java:103)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.common.security.authenticator.LoginManager.<init>(LoginManager.java:61)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.common.security.authenticator.LoginManager.acquireLoginManager(LoginManager.java:104)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:149)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:439)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
at
org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:420)
~[kafka-clients-2.2.1-cdh6.3.2.jar:?]
> Hive Hook can't send notification
> ---------------------------------
>
> Key: ATLAS-4361
> URL: https://issues.apache.org/jira/browse/ATLAS-4361
> Project: Atlas
> Issue Type: Bug
> Components: hive-integration
> Affects Versions: 2.1.0
> Reporter: ighack
> Priority: Blocker
>
> when I create a view
> I get a error
>
> Caused by: javax.security.auth.login.LoginException: Could not login: the
> client is being asked for a password, but the Kafka client code does not
> currently support obtaining a password from the user. not available to garner
> authentication information from the user
>
> but I make sure keytab and principal is OK
> #Enable for Kerberized Kafka clusters
> atlas.notification.kafka.service.principal=jztwk/[email protected]
> atlas.notification.kafka.keytab.location=/hadoop/app/jztwk.keytab
> atlas.kafka.security.protocol=SASL_PLAINTEXT
> atlas.kafka.sasl.kerberos.service.name=kafka
> ##############JAAS Configuration ########
> atlas.jaas.KafkaClient.loginModuleName=com.sun.security.auth.module.Krb5LoginModule
> atlas.jaas.KafkaClient.loginModuleControlFlag=required
> atlas.jaas.KafkaClient.option.useKeyTab=true
> atlas.jaas.KafkaClient.option.storeKey=true
> atlas.jaas.KafkaClient.option.serviceName=kafka
> atlas.jaas.KafkaClient.option.keyTab=/hadoop/app/jztwk.keytab
>
> [atlas.jaas.KafkaClient.option.principal=jztwk/[email protected]|mailto:atlas.jaas.KafkaClient.option.principal=jztwk/[email protected]]
>
> and I modify
> [KafkaNotification.java|https://sourcegraph.com/github.com/apache/atlas/-/blob/notification/src/main/java/org/apache/atlas/kafka/KafkaNotification.java]
> add a debug
> LOG.debug("sasl.jaas.config is " + newJaasProperty);
>
> I see
> sasl.jaas.config is *com.sun.security.auth.module.Krb5LoginModule required
> keyTab="/hadoop/app/jztwk.keytab" storeKey=true useKeyTab=true
> principal="jztwk/[email protected]" ;*
> in log
> I use this config to my application.
> that is OK.
>
> Properties props = new Properties();
> props.put("bootstrap.servers",
> "bigdser1:9092,bigdser2:9092,bigdser3:9092,bigdser4:9092,bigdser5:9092");
> System.setProperty("java.security.krb5.conf","D:/file/krb5.conf");
> props.put("sasl.jaas.config","com.sun.security.auth.module.Krb5LoginModule
> required keyTab=\"D:/file/jztwk.keytab\" storeKey=true useKeyTab=true
> principal=\"jztwk/[email protected]\" ;");
> props.put("security.protocol", "SASL_PLAINTEXT");
> props.put("sasl.kerberos.service.name", "kafka");
> props.put("key.serializer",
> "org.apache.kafka.common.serialization.StringSerializer");
> props.put("value.serializer",
> "org.apache.kafka.common.serialization.StringSerializer");
> KafkaProducer<String,String> producer = new KafkaProducer<>(props);
>
> and I can run import-hive.sh
> so, I don't understand why
--
This message was sent by Atlassian Jira
(v8.3.4#803005)