In this article, we will explain how to resolve the AtlasHook: Failed to send notification – attempt #1; error=Failed to construct kafka producer
ERROR:
Traceback (most recent call last): File "/home/cdsw/4_curated.py", line 50, in main .saveAsTable(' devep. final')) File "/opt/cloudera/parcels/CDH/lib/spark/python/pyspark/sql/readwriter.py", line 778, in saveAsTable self._jwrite.saveAsTable(name) File "/usr/local/lib/python3.6/site-packages/py4j/java_gateway.py", line 1286, in __call__ answer, self.gateway_client, self.target_id, self.name) File "/opt/cloudera/parcels/CDH/lib/spark/python/pyspark/sql/utils.py", line 63, in deco return f(*a, **kw) File "/usr/local/lib/python3.6/site-packages/py4j/protocol.py", line 328, in get_return_value format(target_id, ".", name), value) py4j.protocol.Py4JJavaError: An error occurred while calling o127.saveAsTable. : java.io.IOException: PathOutputCommitProtocol does not support dynamicPartitionOverwrite at org.apache.spark.internal.io.cloud.PathOutputCommitProtocol.<init>(PathOutputCommitProtocol.scala:76) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.spark.internal.io.FileCommitProtocol$.instantiate(FileCommitProtocol.scala:159) at org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand.run(InsertIntoHadoopFsRelationCommand.scala:107) at org.apache.spark.sql.execution.datasources.DataSource.writeAndRead(DataSource.scala:517) at org.apache.spark.sql.execution.command.CreateDataSourceTableAsSelectCommand.saveDataIntoTable(createDataSourceTables.scala:220) at org.apache.spark.sql.execution.command.CreateDataSourceTableAsSelectCommand.run(createDataSourceTables.scala:179) at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult$lzycompute(commands.scala:104) at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult(commands.scala:102) at org.apache.spark.sql.execution.command.DataWritingCommandExec.doExecute(commands.scala:122) at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:141) at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:137) at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:165) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151) at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:162) at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:137) at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:93) at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:91) at org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:704) at org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:704) at org.apache.spark.sql.execution.SQLExecution$$anonfun$withNewExecutionId$1.apply(SQLExecution.scala:80) at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:127) at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:75) at org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:704) at org.apache.spark.sql.DataFrameWriter.createTable(DataFrameWriter.scala:502) at org.apache.spark.sql.DataFrameWriter.saveAsTable(DataFrameWriter.scala:477) at org.apache.spark.sql.DataFrameWriter.saveAsTable(DataFrameWriter.scala:429) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244) at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357) at py4j.Gateway.invoke(Gateway.java:282) at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132) at py4j.commands.CallCommand.execute(CallCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:238) at java.lang.Thread.run(Thread.java:748) An error occurred while calling o127.saveAsTable. : java.io.IOException: PathOutputCommitProtocol does not support dynamicPartitionOverwrite at org.apache.spark.internal.io.cloud.PathOutputCommitProtocol.<init>(PathOutputCommitProtocol.scala:76) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.spark.internal.io.FileCommitProtocol$.instantiate(FileCommitProtocol.scala:159) at org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand.run(InsertIntoHadoopFsRelationCommand.scala:107) at org.apache.spark.sql.execution.datasources.DataSource.writeAndRead(DataSource.scala:517) at org.apache.spark.sql.execution.command.CreateDataSourceTableAsSelectCommand.saveDataIntoTable(createDataSourceTables.scala:220) at org.apache.spark.sql.execution.command.CreateDataSourceTableAsSelectCommand.run(createDataSourceTables.scala:179) at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult$lzycompute(commands.scala:104) at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult(commands.scala:102) at org.apache.spark.sql.execution.command.DataWritingCommandExec.doExecute(commands.scala:122) at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:141) at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:137) at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:165) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151) at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:162) at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:137) at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:93) at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:91) at org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:704) at org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:704) at org.apache.spark.sql.execution.SQLExecution$$anonfun$withNewExecutionId$1.apply(SQLExecution.scala:80) at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:127) at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:75) at org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:704) at org.apache.spark.sql.DataFrameWriter.createTable(DataFrameWriter.scala:502) at org.apache.spark.sql.DataFrameWriter.saveAsTable(DataFrameWriter.scala:477) at org.apache.spark.sql.DataFrameWriter.saveAsTable(DataFrameWriter.scala:429) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244) at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357) at py4j.Gateway.invoke(Gateway.java:282) at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132) at py4j.commands.CallCommand.execute(CallCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:238) at java.lang.Thread.run(Thread.java:748) 23/08/30 15:51:23 952 ERROR SslEngineBuilder: Modification time of key store could not be obtained: /etc/ssl/certs/trust- host.key java.nio.file.NoSuchFileException: /etc/ssl/certs/trust- host.key at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) at java.nio.file.Files.readAttributes(Files.java:1737) at java.nio.file.Files.getLastModifiedTime(Files.java:2266) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.lastModifiedMs(SslEngineBuilder.java:298) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.<init>(SslEngineBuilder.java:275) at org.apache.kafka.common.security.ssl.SslEngineBuilder.createTruststore(SslEngineBuilder.java:182) at org.apache.kafka.common.security.ssl.SslEngineBuilder.<init>(SslEngineBuilder.java:100) at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:95) at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:154) at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146) at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67) at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99) at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:450) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:421) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:298) at org.apache.atlas.kafka.KafkaNotification.getOrCreateProducer(KafkaNotification.java:356) at org.apache.atlas.kafka.KafkaNotification.sendInternal(KafkaNotification.java:262) at org.apache.atlas.notification.AbstractNotification.send(AbstractNotification.java:93) at org.apache.atlas.hook.AtlasHook$3.run(AtlasHook.java:207) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898) at org.apache.atlas.hook.AtlasHook.notifyEntitiesInternal(AtlasHook.java:212) at org.apache.atlas.hook.AtlasHook$2.run(AtlasHook.java:170) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 23/08/30 15:51:23 954 ERROR AtlasHook: Failed to send notification - attempt #2; error=Failed to construct kafka producer cdsw@kwxvlfs5zq01j27p:~$ 23/08/30 15:51:24 961 ERROR SslEngineBuilder: Modification time of key store could not be obtained: /etc/ssl/certs/trust- host.key java.nio.file.NoSuchFileException: /etc/ssl/certs/trust- host.key at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) at java.nio.file.Files.readAttributes(Files.java:1737) at java.nio.file.Files.getLastModifiedTime(Files.java:2266) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.lastModifiedMs(SslEngineBuilder.java:298) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.<init>(SslEngineBuilder.java:275) at org.apache.kafka.common.security.ssl.SslEngineBuilder.createTruststore(SslEngineBuilder.java:182) at org.apache.kafka.common.security.ssl.SslEngineBuilder.<init>(SslEngineBuilder.java:100) at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:95) at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:154) at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146) at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67) at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99) at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:450) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:421) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:298) at org.apache.atlas.kafka.KafkaNotification.getOrCreateProducer(KafkaNotification.java:356) at org.apache.atlas.kafka.KafkaNotification.sendInternal(KafkaNotification.java:262) at org.apache.atlas.notification.AbstractNotification.send(AbstractNotification.java:93) at org.apache.atlas.hook.AtlasHook$3.run(AtlasHook.java:207) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898) at org.apache.atlas.hook.AtlasHook.notifyEntitiesInternal(AtlasHook.java:212) at org.apache.atlas.hook.AtlasHook$2.run(AtlasHook.java:170) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 23/08/30 15:51:24 963 ERROR AtlasHook: Failed to send notification - attempt #3; error=Failed to construct kafka producer 23/08/30 15:51:24 975 ERROR AtlasHook: Giving up after 3 failed attempts to send notification to Atlas: [AtlasEntitiesWithExtInfo{entities=[AtlasEntity{AtlasStruct{typeName='hdfs_path', attributes=[nameServiceId:nameservice1, path:hdfs://nameservice1/user/j736655/feedmill_stage, qualifiedName:hdfs://nameservice1/user/j736655/feedmill_stage@cm, clusterName:cm, name:/user/j736655/feedmill_stage]}guid='-1093447230293499', homeId='null', isProxy='false', isIncomplete=false, provenanceType=0, status=null, createdBy='null', updatedBy='null', createTime=null, updateTime=null, version=0, relationshipAttributes=[], classifications=[], meanings=[], customAttributes=[], businessAttributes=[], labels=[], pendingTasks=[]}],AtlasEntityExtInfo{referredEntities={}}}] org.apache.kafka.common.KafkaException: Failed to construct kafka producer at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:432) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:298) at org.apache.atlas.kafka.KafkaNotification.getOrCreateProducer(KafkaNotification.java:356) at org.apache.atlas.kafka.KafkaNotification.sendInternal(KafkaNotification.java:262) at org.apache.atlas.notification.AbstractNotification.send(AbstractNotification.java:93) at org.apache.atlas.hook.AtlasHook$3.run(AtlasHook.java:207) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898) at org.apache.atlas.hook.AtlasHook.notifyEntitiesInternal(AtlasHook.java:212) at org.apache.atlas.hook.AtlasHook$2.run(AtlasHook.java:170) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.kafka.common.KafkaException: org.apache.kafka.common.KafkaException: org.apache.kafka.common.KafkaException: Failed to load SSL keystore /etc/ssl/certs/trust- host.key of type jks at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:158) at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146) at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67) at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99) at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:450) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:421) ... 15 more Caused by: org.apache.kafka.common.KafkaException: org.apache.kafka.common.KafkaException: Failed to load SSL keystore /etc/ssl/certs/trust- host.key of type jks at org.apache.kafka.common.security.ssl.SslEngineBuilder.createSSLContext(SslEngineBuilder.java:163) at org.apache.kafka.common.security.ssl.SslEngineBuilder.<init>(SslEngineBuilder.java:104) at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:95) at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:154) ... 20 more Caused by: org.apache.kafka.common.KafkaException: Failed to load SSL keystore /etc/ssl/certs/trust- host.key of type jks at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.load(SslEngineBuilder.java:292) at org.apache.kafka.common.security.ssl.SslEngineBuilder.createSSLContext(SslEngineBuilder.java:155) ... 23 more Caused by: java.nio.file.NoSuchFileException: /etc/ssl/certs/trust- host.key at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) at java.nio.file.Files.newByteChannel(Files.java:361) at java.nio.file.Files.newByteChannel(Files.java:407) at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) at java.nio.file.Files.newInputStream(Files.java:152) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.load(SslEngineBuilder.java:285) ... 24 more 23/08/30 15:51:24 998 ERROR SslEngineBuilder: Modification time of key store could not be obtained: /etc/ssl/certs/trust- host.key java.nio.file.NoSuchFileException: /etc/ssl/certs/trust- host.key at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) at java.nio.file.Files.readAttributes(Files.java:1737) at java.nio.file.Files.getLastModifiedTime(Files.java:2266) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.lastModifiedMs(SslEngineBuilder.java:298) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.<init>(SslEngineBuilder.java:275) at org.apache.kafka.common.security.ssl.SslEngineBuilder.createTruststore(SslEngineBuilder.java:182) at org.apache.kafka.common.security.ssl.SslEngineBuilder.<init>(SslEngineBuilder.java:100) at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:95) at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:154) at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146) at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67) at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99) at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:450) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:421) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:298) at org.apache.atlas.kafka.KafkaNotification.getOrCreateProducer(KafkaNotification.java:356) at org.apache.atlas.kafka.KafkaNotification.sendInternal(KafkaNotification.java:262) at org.apache.atlas.notification.AbstractNotification.send(AbstractNotification.java:93) at org.apache.atlas.hook.AtlasHook$3.run(AtlasHook.java:207) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898) at org.apache.atlas.hook.AtlasHook.notifyEntitiesInternal(AtlasHook.java:212) at org.apache.atlas.hook.AtlasHook$2.run(AtlasHook.java:170) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 23/08/30 15:51:25 000 ERROR AtlasHook: Failed to send notification - attempt #1; error=Failed to construct kafka producer 23/08/30 15:51:26 017 ERROR SslEngineBuilder: Modification time of key store could not be obtained: /etc/ssl/certs/trust- host.key java.nio.file.NoSuchFileException: /etc/ssl/certs/trust- host.key at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) at java.nio.file.Files.readAttributes(Files.java:1737) at java.nio.file.Files.getLastModifiedTime(Files.java:2266) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.lastModifiedMs(SslEngineBuilder.java:298) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.<init>(SslEngineBuilder.java:275) at org.apache.kafka.common.security.ssl.SslEngineBuilder.createTruststore(SslEngineBuilder.java:182) at org.apache.kafka.common.security.ssl.SslEngineBuilder.<init>(SslEngineBuilder.java:100) at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:95) at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:154) at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146) at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67) at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99) at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:450) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:421) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:298) at org.apache.atlas.kafka.KafkaNotification.getOrCreateProducer(KafkaNotification.java:356) at org.apache.atlas.kafka.KafkaNotification.sendInternal(KafkaNotification.java:262) at org.apache.atlas.notification.AbstractNotification.send(AbstractNotification.java:93) at org.apache.atlas.hook.AtlasHook$3.run(AtlasHook.java:207) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898) at org.apache.atlas.hook.AtlasHook.notifyEntitiesInternal(AtlasHook.java:212) at org.apache.atlas.hook.AtlasHook$2.run(AtlasHook.java:170) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 23/08/30 15:51:26 019 ERROR AtlasHook: Failed to send notification - attempt #2; error=Failed to construct kafka producer 23/08/30 15:51:27 024 ERROR SslEngineBuilder: Modification time of key store could not be obtained: /etc/ssl/certs/trust- host.key java.nio.file.NoSuchFileException: /etc/ssl/certs/trust- host.key at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) at java.nio.file.Files.readAttributes(Files.java:1737) at java.nio.file.Files.getLastModifiedTime(Files.java:2266) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.lastModifiedMs(SslEngineBuilder.java:298) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.<init>(SslEngineBuilder.java:275) at org.apache.kafka.common.security.ssl.SslEngineBuilder.createTruststore(SslEngineBuilder.java:182) at org.apache.kafka.common.security.ssl.SslEngineBuilder.<init>(SslEngineBuilder.java:100) at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:95) at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:154) at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146) at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67) at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99) at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:450) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:421) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:298) at org.apache.atlas.kafka.KafkaNotification.getOrCreateProducer(KafkaNotification.java:356) at org.apache.atlas.kafka.KafkaNotification.sendInternal(KafkaNotification.java:262) at org.apache.atlas.notification.AbstractNotification.send(AbstractNotification.java:93) at org.apache.atlas.hook.AtlasHook$3.run(AtlasHook.java:207) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898) at org.apache.atlas.hook.AtlasHook.notifyEntitiesInternal(AtlasHook.java:212) at org.apache.atlas.hook.AtlasHook$2.run(AtlasHook.java:170) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 23/08/30 15:51:27 026 ERROR AtlasHook: Failed to send notification - attempt #3; error=Failed to construct kafka producer 23/08/30 15:51:27 027 ERROR AtlasHook: Giving up after 3 failed attempts to send notification to Atlas: [AtlasEntitiesWithExtInfo{entities=[AtlasEntity{AtlasStruct{typeName='spark_process', attributes=[outputs:[AtlasObjectId{guid='null', typeName='hdfs_path', uniqueAttributes={qualifiedName:hdfs://nameservice1/user/j736655/feedmill_stage@cm}}], remoteUser:[email protected]. host.COM, executionId:1, qualifiedName:application_1690728624360_2058084-execution-1, inputs:[AtlasObjectId{guid='null', typeName='hive_table', uniqueAttributes={qualifiedName: devep.feedmill@cm}}, AtlasObjectId{guid='null', typeName='hive_table', uniqueAttributes={qualifiedName: devep. final@cm}}], name:execution-1, currUser:[email protected]. host.COM, details:== Parsed Logical Plan == =org.apache.kafka.common.KafkaException: Failed to construct kafka producer at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:432) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:298) at org.apache.atlas.kafka.KafkaNotification.getOrCreateProducer(KafkaNotification.java:356) at org.apache.atlas.kafka.KafkaNotification.sendInternal(KafkaNotification.java:262) at org.apache.atlas.notification.AbstractNotification.send(AbstractNotification.java:93) at org.apache.atlas.hook.AtlasHook$3.run(AtlasHook.java:207) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898) at org.apache.atlas.hook.AtlasHook.notifyEntitiesInternal(AtlasHook.java:212) at org.apache.atlas.hook.AtlasHook$2.run(AtlasHook.java:170) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.kafka.common.KafkaException: org.apache.kafka.common.KafkaException: org.apache.kafka.common.KafkaException: Failed to load SSL keystore /etc/ssl/certs/trust- host.key of type jks at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:158) at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146) at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67) at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99) at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:450) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:421) ... 15 more Caused by: org.apache.kafka.common.KafkaException: org.apache.kafka.common.KafkaException: Failed to load SSL keystore /etc/ssl/certs/trust- host.key of type jks at org.apache.kafka.common.security.ssl.SslEngineBuilder.createSSLContext(SslEngineBuilder.java:163) at org.apache.kafka.common.security.ssl.SslEngineBuilder.<init>(SslEngineBuilder.java:104) at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:95) at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:154) ... 20 more Caused by: org.apache.kafka.common.KafkaException: Failed to load SSL keystore /etc/ssl/certs/trust- host.key of type jks at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.load(SslEngineBuilder.java:292) at org.apache.kafka.common.security.ssl.SslEngineBuilder.createSSLContext(SslEngineBuilder.java:155) ... 23 more Caused by: java.nio.file.NoSuchFileException: /etc/ssl/certs/trust- host.key at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) at java.nio.file.Files.newByteChannel(Files.java:361) at java.nio.file.Files.newByteChannel(Files.java:407) at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) at java.nio.file.Files.newInputStream(Files.java:152) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.load(SslEngineBuilder.java:285) ... 24 more 23/08/30 15:51:27 034 ERROR SslEngineBuilder: Modification time of key store could not be obtained: /etc/ssl/certs/trust- host.key java.nio.file.NoSuchFileException: /etc/ssl/certs/trust- host.key at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) at java.nio.file.Files.readAttributes(Files.java:1737) at java.nio.file.Files.getLastModifiedTime(Files.java:2266) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.lastModifiedMs(SslEngineBuilder.java:298) at org.apache.kafka.common.security.ssl.SslEngineBuilder$SecurityStore.<init>(SslEngineBuilder.java:275) at org.apache.kafka.common.security.ssl.SslEngineBuilder.createTruststore(SslEngineBuilder.java:182) at org.apache.kafka.common.security.ssl.SslEngineBuilder.<init>(SslEngineBuilder.java:100) at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:95) at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:154) at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:146) at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67) at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99) at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:450) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:421) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:298) at org.apache.atlas.kafka.KafkaNotification.getOrCreateProducer(KafkaNotification.java:356) at org.apache.atlas.kafka.KafkaNotification.sendInternal(KafkaNotification.java:262) at org.apache.atlas.notification.AbstractNotification.send(AbstractNotification.java:93) at org.apache.atlas.hook.AtlasHook$3.run(AtlasHook.java:207) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898) at org.apache.atlas.hook.AtlasHook.notifyEntitiesInternal(AtlasHook.java:212) at org.apache.atlas.hook.AtlasHook$2.run(AtlasHook.java:170) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 23/08/30 15:51:27 036 ERROR AtlasHook: Failed to send notification - attempt #1; error=Failed to construct kafka producer
Solution :
First, we have checked the certification and renew it after that I followed the below steps
1. I have checked the cluster level. Kafka service went to down. I have restarted the services.
2. After that re-run the Kafka job. It’s running fine for next run.