[
https://issues.apache.org/jira/browse/METRON-1783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nick Allen updated METRON-1783:
-------------------------------
Description:
After kerberizing Metron using the Mpack in Ambari, if you start REST before
the other Storm topologies, the Client JAAS configuration file does not get
laid down. This causes the following error in
`/var/log/metron/metron-rest.log`.
{code:java}
18/09/18 00:51:41 WARN
context.AnnotationConfigServletWebServerApplicationContext: Exception
encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'kafkaConfig': Unsatisfied dependency expressed through
field 'zkClient'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'zkClient' defined in class path resource
[org/apache/metron/rest/config/ZookeeperConfig.class]: Bean instantiation via
factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw exception;
nested exception is java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
18/09/18 00:51:41 ERROR imps.CuratorFrameworkImpl: Background exception was not
retry-able or retry gave up
java.lang.IllegalStateException: instance must be started before calling this
method
at
com.google.common.base.Preconditions.checkState(Preconditions.java:176)
at
org.apache.curator.framework.imps.CuratorFrameworkImpl.getData(CuratorFrameworkImpl.java:363)
at
org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.doRefreshData(TreeCache.java:244)
at
org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.refresh(TreeCache.java:209)
at
org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.wasCreated(TreeCache.java:263)
at
org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.processResult(TreeCache.java:397)
at
org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:728)
at
org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:505)
at
org.apache.curator.framework.imps.GetChildrenBuilderImpl$2.processResult(GetChildrenBuilderImpl.java:166)
at
org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:590)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)
18/09/18 00:51:41 INFO zookeeper.ZooKeeper: Session: 0x165e9a7dc4a002a closed
18/09/18 00:51:41 INFO jpa.LocalContainerEntityManagerFactoryBean: Closing JPA
EntityManagerFactory for persistence unit 'default'
18/09/18 00:51:41 INFO hikari.HikariDataSource: HikariPool-1 - Shutdown
initiated...
18/09/18 00:51:41 INFO zookeeper.ClientCnxn: EventThread shut down
18/09/18 00:51:41 INFO hikari.HikariDataSource: HikariPool-1 - Shutdown
completed.
Sep 18, 2018 12:51:41 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service [Tomcat]
18/09/18 00:51:41 INFO logging.ConditionEvaluationReportLoggingListener:
Error starting ApplicationContext. To display the conditions report re-run your
application with 'debug' enabled.
18/09/18 00:51:41 ERROR boot.SpringApplication: Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'kafkaConfig': Unsatisfied dependency expressed through
field 'zkClient'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'zkClient' defined in class path resource
[org/apache/metron/rest/config/ZookeeperConfig.class]: Bean instantiation via
factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw exception;
nested exception is java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:587)
at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:373)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1344)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:578)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
at
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
at
org.apache.metron.rest.MetronRestApplication.main(MetronRestApplication.java:36)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'zkClient' defined in class path resource
[org/apache/metron/rest/config/ZookeeperConfig.class]: Bean instantiation via
factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw exception;
nested exception is java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
at
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:584)
... 19 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to
instantiate [org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw
exception; nested exception is java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579)
... 31 more
Caused by: java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
at org.I0Itec.zkclient.ZkClient.isZkSaslEnabled(ZkClient.java:904)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:155)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:130)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:97)
at
org.apache.metron.rest.config.ZookeeperConfig.zkClient(ZookeeperConfig.java:63)
at
org.apache.metron.rest.config.ZookeeperConfig$$EnhancerBySpringCGLIB$$e6070ab6.CGLIB$zkClient$1(<generated>)
at
org.apache.metron.rest.config.ZookeeperConfig$$EnhancerBySpringCGLIB$$e6070ab6$$FastClassBySpringCGLIB$$8bbe133d.invoke(<generated>)
at
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
at
org.apache.metron.rest.config.ZookeeperConfig$$EnhancerBySpringCGLIB$$e6070ab6.zkClient(<generated>)
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
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 32 more{code}
This is not a problem if the Storm topologies are started BEFORE starting REST.
This is because the Storm topologies already do lay down the Client JAAS
configuration file.
This was originally found here:
[https://github.com/apache/metron/pull/1192#issuecomment-422227976.]
was:
After kerberizing Metron using the Mpack in Ambari, if you start REST before
the other Storm topologies, the Client JAAS configuration file does not get
laid down. This causes the following error in
`/var/log/metron/metron-rest.log`.
{code:java}
18/09/18 00:51:41 WARN
context.AnnotationConfigServletWebServerApplicationContext: Exception
encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'kafkaConfig': Unsatisfied dependency expressed through
field 'zkClient'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'zkClient' defined in class path resource
[org/apache/metron/rest/config/ZookeeperConfig.class]: Bean instantiation via
factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw exception;
nested exception is java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
18/09/18 00:51:41 ERROR imps.CuratorFrameworkImpl: Background exception was not
retry-able or retry gave up
java.lang.IllegalStateException: instance must be started before calling this
method
at
com.google.common.base.Preconditions.checkState(Preconditions.java:176)
at
org.apache.curator.framework.imps.CuratorFrameworkImpl.getData(CuratorFrameworkImpl.java:363)
at
org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.doRefreshData(TreeCache.java:244)
at
org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.refresh(TreeCache.java:209)
at
org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.wasCreated(TreeCache.java:263)
at
org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.processResult(TreeCache.java:397)
at
org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:728)
at
org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:505)
at
org.apache.curator.framework.imps.GetChildrenBuilderImpl$2.processResult(GetChildrenBuilderImpl.java:166)
at
org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:590)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)
18/09/18 00:51:41 INFO zookeeper.ZooKeeper: Session: 0x165e9a7dc4a002a closed
18/09/18 00:51:41 INFO jpa.LocalContainerEntityManagerFactoryBean: Closing JPA
EntityManagerFactory for persistence unit 'default'
18/09/18 00:51:41 INFO hikari.HikariDataSource: HikariPool-1 - Shutdown
initiated...
18/09/18 00:51:41 INFO zookeeper.ClientCnxn: EventThread shut down
18/09/18 00:51:41 INFO hikari.HikariDataSource: HikariPool-1 - Shutdown
completed.
Sep 18, 2018 12:51:41 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service [Tomcat]
18/09/18 00:51:41 INFO logging.ConditionEvaluationReportLoggingListener:
Error starting ApplicationContext. To display the conditions report re-run your
application with 'debug' enabled.
18/09/18 00:51:41 ERROR boot.SpringApplication: Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'kafkaConfig': Unsatisfied dependency expressed through
field 'zkClient'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'zkClient' defined in class path resource
[org/apache/metron/rest/config/ZookeeperConfig.class]: Bean instantiation via
factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw exception;
nested exception is java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:587)
at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:373)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1344)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:578)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
at
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
at
org.apache.metron.rest.MetronRestApplication.main(MetronRestApplication.java:36)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'zkClient' defined in class path resource
[org/apache/metron/rest/config/ZookeeperConfig.class]: Bean instantiation via
factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw exception;
nested exception is java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
at
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:584)
... 19 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to
instantiate [org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw
exception; nested exception is java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579)
... 31 more
Caused by: java.lang.IllegalArgumentException: File
/usr/metron/0.6.0/client_jaas.confcannot be read.
at org.I0Itec.zkclient.ZkClient.isZkSaslEnabled(ZkClient.java:904)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:155)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:130)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:97)
at
org.apache.metron.rest.config.ZookeeperConfig.zkClient(ZookeeperConfig.java:63)
at
org.apache.metron.rest.config.ZookeeperConfig$$EnhancerBySpringCGLIB$$e6070ab6.CGLIB$zkClient$1(<generated>)
at
org.apache.metron.rest.config.ZookeeperConfig$$EnhancerBySpringCGLIB$$e6070ab6$$FastClassBySpringCGLIB$$8bbe133d.invoke(<generated>)
at
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
at
org.apache.metron.rest.config.ZookeeperConfig$$EnhancerBySpringCGLIB$$e6070ab6.zkClient(<generated>)
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
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 32 more{code}
This was originally found here:
[https://github.com/apache/metron/pull/1192#issuecomment-422227976.]
> REST Service Missing Client JAAS after Kerberization
> ----------------------------------------------------
>
> Key: METRON-1783
> URL: https://issues.apache.org/jira/browse/METRON-1783
> Project: Metron
> Issue Type: Bug
> Reporter: Nick Allen
> Priority: Major
>
> After kerberizing Metron using the Mpack in Ambari, if you start REST before
> the other Storm topologies, the Client JAAS configuration file does not get
> laid down. This causes the following error in
> `/var/log/metron/metron-rest.log`.
> {code:java}
> 18/09/18 00:51:41 WARN
> context.AnnotationConfigServletWebServerApplicationContext: Exception
> encountered during context initialization - cancelling refresh attempt:
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name 'kafkaConfig': Unsatisfied dependency expressed
> through field 'zkClient'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'zkClient' defined in class path resource
> [org/apache/metron/rest/config/ZookeeperConfig.class]: Bean instantiation via
> factory method failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Failed to instantiate
> [org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw exception;
> nested exception is java.lang.IllegalArgumentException: File
> /usr/metron/0.6.0/client_jaas.confcannot be read.
> 18/09/18 00:51:41 ERROR imps.CuratorFrameworkImpl: Background exception was
> not retry-able or retry gave up
> java.lang.IllegalStateException: instance must be started before calling this
> method
> at
> com.google.common.base.Preconditions.checkState(Preconditions.java:176)
> at
> org.apache.curator.framework.imps.CuratorFrameworkImpl.getData(CuratorFrameworkImpl.java:363)
> at
> org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.doRefreshData(TreeCache.java:244)
> at
> org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.refresh(TreeCache.java:209)
> at
> org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.wasCreated(TreeCache.java:263)
> at
> org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.processResult(TreeCache.java:397)
> at
> org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:728)
> at
> org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:505)
> at
> org.apache.curator.framework.imps.GetChildrenBuilderImpl$2.processResult(GetChildrenBuilderImpl.java:166)
> at
> org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:590)
> at
> org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)
> 18/09/18 00:51:41 INFO zookeeper.ZooKeeper: Session: 0x165e9a7dc4a002a closed
> 18/09/18 00:51:41 INFO jpa.LocalContainerEntityManagerFactoryBean: Closing
> JPA EntityManagerFactory for persistence unit 'default'
> 18/09/18 00:51:41 INFO hikari.HikariDataSource: HikariPool-1 - Shutdown
> initiated...
> 18/09/18 00:51:41 INFO zookeeper.ClientCnxn: EventThread shut down
> 18/09/18 00:51:41 INFO hikari.HikariDataSource: HikariPool-1 - Shutdown
> completed.
> Sep 18, 2018 12:51:41 AM org.apache.catalina.core.StandardService stopInternal
> INFO: Stopping service [Tomcat]
> 18/09/18 00:51:41 INFO logging.ConditionEvaluationReportLoggingListener:
> Error starting ApplicationContext. To display the conditions report re-run
> your application with 'debug' enabled.
> 18/09/18 00:51:41 ERROR boot.SpringApplication: Application run failed
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name 'kafkaConfig': Unsatisfied dependency expressed
> through field 'zkClient'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'zkClient' defined in class path resource
> [org/apache/metron/rest/config/ZookeeperConfig.class]: Bean instantiation via
> factory method failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Failed to instantiate
> [org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw exception;
> nested exception is java.lang.IllegalArgumentException: File
> /usr/metron/0.6.0/client_jaas.confcannot be read.
> at
> org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:587)
> at
> org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91)
> at
> org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:373)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1344)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:578)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
> at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
> at
> org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
> at
> org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
> at
> org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
> at
> org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
> at
> org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
> at
> org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
> at
> org.apache.metron.rest.MetronRestApplication.main(MetronRestApplication.java:36)
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'zkClient' defined in class path resource
> [org/apache/metron/rest/config/ZookeeperConfig.class]: Bean instantiation via
> factory method failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Failed to instantiate
> [org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw exception;
> nested exception is java.lang.IllegalArgumentException: File
> /usr/metron/0.6.0/client_jaas.confcannot be read.
> at
> org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
> at
> org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065)
> at
> org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:584)
> ... 19 more
> Caused by: org.springframework.beans.BeanInstantiationException: Failed to
> instantiate [org.I0Itec.zkclient.ZkClient]: Factory method 'zkClient' threw
> exception; nested exception is java.lang.IllegalArgumentException: File
> /usr/metron/0.6.0/client_jaas.confcannot be read.
> at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
> at
> org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579)
> ... 31 more
> Caused by: java.lang.IllegalArgumentException: File
> /usr/metron/0.6.0/client_jaas.confcannot be read.
> at org.I0Itec.zkclient.ZkClient.isZkSaslEnabled(ZkClient.java:904)
> at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:155)
> at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:130)
> at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:97)
> at
> org.apache.metron.rest.config.ZookeeperConfig.zkClient(ZookeeperConfig.java:63)
> at
> org.apache.metron.rest.config.ZookeeperConfig$$EnhancerBySpringCGLIB$$e6070ab6.CGLIB$zkClient$1(<generated>)
> at
> org.apache.metron.rest.config.ZookeeperConfig$$EnhancerBySpringCGLIB$$e6070ab6$$FastClassBySpringCGLIB$$8bbe133d.invoke(<generated>)
> at
> org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
> at
> org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
> at
> org.apache.metron.rest.config.ZookeeperConfig$$EnhancerBySpringCGLIB$$e6070ab6.zkClient(<generated>)
> 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
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
> ... 32 more{code}
>
> This is not a problem if the Storm topologies are started BEFORE starting
> REST. This is because the Storm topologies already do lay down the Client
> JAAS configuration file.
> This was originally found here:
> [https://github.com/apache/metron/pull/1192#issuecomment-422227976.]
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)