Created 09-12-2018 11:19 PM
metron-rest-start-failure.txt
metron-rest component failing to start with the following error:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
18/08/30 08:48:41 ERROR boot.SpringApplication: Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alertsUIController': Unsatisfied dependency expressed through field 'alertsUIService'; nested
exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alertsUIServiceImpl' defined in URL [jar:file:/usr/hcp/1.5.0.0-
9/metron/lib/metron-rest-0.4.3.1.5.0.0-9.jar!/org/apache/metron/rest/service/impl/AlertsUIServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 2; nested
exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userSettingsClient' defined in class path resource
[org/apache/metron/rest/config/HBaseConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to
instantiate [org.apache.metron.hbase.client.UserSettingsClient]: Factory method 'userSettingsClient' threw exception; nested exception is java.lang.IllegalStateException: You must configure
user.settings.hbase.table and user.settings.hbase.cf in the global config.
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)
Ambari shows alerts just fine, or is this some other alerting service?
Created 09-12-2018 11:20 PM
As we see the cause of failure then we find the following :
Parsing file: /usr/hcp/1.5.0.0-9/metron/flux/profiler/remote.yaml 932 [main] INFO o.a.s.f.p.FluxParser - loading YAML from input stream... 944 [main] INFO o.a.s.f.p.FluxParser - Performing property substitution. 954 [main] INFO o.a.s.f.p.FluxParser - Not performing environment variable substitution. Exception in thread "main" while parsing a flow sequence in 'string', line 165, column 21: args: [${profiler.max.routes.per.bolt}] ^ expected ',' or ']', but got FlowMappingStart in 'string', line 165, column 23: args: [${profiler.max.routes.per.bolt}]
.
Above seems to be a YAML parsing error which might be due to incorrect data. So can you please check the YAML file "/usr/hcp/1.5.0.0-9/metron/flux/profiler/remote.yaml" file using some Online YAML parsing tool and then validate to see if there are some special characters which is causing the parsing failure. Specially around the property "profiler.max.routes.per.bolt". Looks like there may be some issue at line 165 on this file.
After fixing the value please restart it. If you still face any issue then please share the file.
Created 09-12-2018 11:26 PM
I put a comma after the value and started metron-rest. For a little bit it showed started in ambari, but then went back to not running. I have attached the metron-rest log.metron-rest.tar.gz
the log entries for today start at line 6610
Created 06-28-2020 06:46 AM
Hi,
you can also user https://yamlonline.com/ for YAML validate as well as convert that to csv,json,xml and beautify and minify that
Thanks
Created 09-13-2018 08:52 PM
That does not allow the service to start, here is my yaml file.
Created 10-10-2018 09:03 PM
When I dump my yaml file into this validator: https://onlineyamltools.com/validate-yaml
It reports "No errors", yaml perfectly valid.
Created 10-11-2018 08:17 PM
remoteyaml.txt
Here is my remote.yaml file.
Created 07-28-2020 10:31 AM
You can also use https://yamlonline.com/ for the yaml validator as well as yaml converter to json,csv,xml,base64 also for beautify and minify YAML.