You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hertzbeat.apache.org by "Hawolex (via GitHub)" <gi...@apache.org> on 2024/10/03 10:12:54 UTC

[D] compose-hertzbeat keeps failing on NEW deployment [hertzbeat]

GitHub user Hawolex created a discussion: compose-hertzbeat keeps failing on NEW deployment

I have opted to test hertzbeat-postgresql-victoria-metrics version since it was recomended and last updated.

I have tried for several days to figure out how to get this deployment up.
but whit no luck.

Docker Version: 27.3.1
Docker Compose version: v2.29.7
OS: Ubuntu 24.04.1 LTS

Since i first got the config error in logs i manually created : 
./conf/application.yml
./conf/sureness.yml
They where folders, "typical compose error".


So that error went away.
- NO other container on my hostls
- did a "docker system prune --all" on host before start.
- my structure are:
- ![Screenshot 2024-10-03 at 11 43 22](https://github.com/user-attachments/assets/59e18017-49e9-4f72-8ccb-f158a826b945)
- "docker compose pull"
![Screenshot 2024-10-03 at 11 46 43](https://github.com/user-attachments/assets/eec3caea-301a-4e16-ad61-b23fba788681)

- docker compose up -d && docker compose logs -f
active logs show : 
compose-hertzbeat exited with code 1

- only compose-postgresql and compose-victoria-metrics are up.

- The file structure after:
![Screenshot 2024-10-03 at 11 56 59](https://github.com/user-attachments/assets/dd143e2c-1661-4032-a69b-f337a6fbdddd)

-  Logs
<details>
  <summary>server-2024-10-03-error.0.log </summary>

```
2024-10-03 17:54:24.883 [main] ERROR org.springframework.boot.web.embedded.tomcat.TomcatStarter Line:60  - Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'filterRegistration' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'filterRegistration' parameter 0: Error creating bean with name 'securityManager' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'securityManager' parameter 1: Error creating bean with name 'pathRoleMatcher' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.
 provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
2024-10-03 17:54:25.144 [main] ERROR org.springframework.boot.SpringApplication Line:851 - Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:165)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:618)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
	at org.apache.hertzbeat.manager.Manager.main(Manager.java:44)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:145)
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:105)
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:499)
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:218)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:188)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162)
	... 8 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'filterRegistration' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'filterRegistration' parameter 0: Error creating bean with name 'securityManager' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'securityManager' parameter 1: Error creating bean with name 'pathRoleMatcher' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:542)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:210)
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:201)
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96)
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:266)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:240)
	at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:52)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4866)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:845)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:240)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:921)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:437)
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126)
	... 13 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityManager' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'securityManager' parameter 1: Error creating bean with name 'pathRoleMatcher' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:542)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:907)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:785)
	... 53 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pathRoleMatcher' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:639)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:907)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:785)
	... 67 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:647)
	... 81 common frames omitted
Caused by: java.lang.NullPointerException: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at com.usthe.sureness.provider.ducument.DocumentPathTreeProvider.providePathData(DocumentPathTreeProvider.java:31)
	at com.usthe.sureness.matcher.DefaultPathRoleMatcher.iterateOverPathTreeProviderList(DefaultPathRoleMatcher.java:138)
	at com.usthe.sureness.matcher.DefaultPathRoleMatcher.buildTree(DefaultPathRoleMatcher.java:75)
	at com.usthe.sureness.configuration.SurenessAutoConfiguration.pathRoleMatcher(SurenessAutoConfiguration.java:278)
	at com.usthe.sureness.configuration.SurenessAutoConfiguration$$SpringCGLIB$$0.CGLIB$pathRoleMatcher$5(<generated>)
	at com.usthe.sureness.configuration.SurenessAutoConfiguration$$SpringCGLIB$$FastClass$$1.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at com.usthe.sureness.configuration.SurenessAutoConfiguration$$SpringCGLIB$$0.pathRoleMatcher(<generated>)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
	... 82 common frames omitted

```

</details>

<details>
  <summary>server-2024-10-03.0.log </summary>

```
2024-10-03 17:54:20.803 [background-preinit] INFO  org.hibernate.validator.internal.util.Version Line:21  - HV000001: Hibernate Validator 8.0.1.Final
2024-10-03 17:54:20.866 [main] INFO  org.apache.hertzbeat.manager.Manager Line:50  - Starting Manager v2.0-SNAPSHOT using Java 17.0.2 with PID 10 (/opt/hertzbeat/apache-hertzbeat-1.6.0.jar started by root in /opt/hertzbeat)
2024-10-03 17:54:20.868 [main] INFO  org.apache.hertzbeat.manager.Manager Line:660 - The following 1 profile is active: "prod"
2024-10-03 17:54:22.651 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate Line:139 - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2024-10-03 17:54:22.994 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate Line:208 - Finished Spring Data repository scanning in 335 ms. Found 24 JPA repository interfaces.
2024-10-03 17:54:24.738 [main] INFO  org.springframework.boot.web.embedded.tomcat.TomcatWebServer Line:109 - Tomcat initialized with port 8080 (http)
2024-10-03 17:54:24.750 [main] INFO  org.apache.coyote.http11.Http11NioProtocol Line:173 - Initializing ProtocolHandler ["http-nio-8080"]
2024-10-03 17:54:24.753 [main] INFO  org.apache.catalina.core.StandardService Line:173 - Starting service [Tomcat]
2024-10-03 17:54:24.753 [main] INFO  org.apache.catalina.core.StandardEngine Line:173 - Starting Servlet engine: [Apache Tomcat/10.1.19]
2024-10-03 17:54:24.805 [main] INFO  org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] Line:173 - Initializing Spring embedded WebApplicationContext
2024-10-03 17:54:24.805 [main] INFO  org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext Line:296 - Root WebApplicationContext: initialization completed in 3829 ms
2024-10-03 17:54:24.883 [main] ERROR org.springframework.boot.web.embedded.tomcat.TomcatStarter Line:60  - Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'filterRegistration' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'filterRegistration' parameter 0: Error creating bean with name 'securityManager' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'securityManager' parameter 1: Error creating bean with name 'pathRoleMatcher' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.
 provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
2024-10-03 17:54:24.924 [main] INFO  org.apache.catalina.core.StandardService Line:173 - Stopping service [Tomcat]
2024-10-03 17:54:25.104 [main] WARN  org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext Line:632 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server
2024-10-03 17:54:25.126 [main] INFO  org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLogger Line:82  - 

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-10-03 17:54:25.144 [main] ERROR org.springframework.boot.SpringApplication Line:851 - Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:165)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:618)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
	at org.apache.hertzbeat.manager.Manager.main(Manager.java:44)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:145)
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:105)
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:499)
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:218)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:188)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162)
	... 8 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'filterRegistration' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'filterRegistration' parameter 0: Error creating bean with name 'securityManager' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'securityManager' parameter 1: Error creating bean with name 'pathRoleMatcher' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:542)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:210)
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:201)
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96)
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:266)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:240)
	at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:52)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4866)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:845)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:240)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:921)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:437)
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126)
	... 13 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityManager' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Unsatisfied dependency expressed through method 'securityManager' parameter 1: Error creating bean with name 'pathRoleMatcher' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:542)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:907)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:785)
	... 53 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pathRoleMatcher' defined in class path resource [com/usthe/sureness/configuration/SurenessAutoConfiguration.class]: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:639)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:907)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:785)
	... 67 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.usthe.sureness.matcher.TreePathRoleMatcher]: Factory method 'pathRoleMatcher' threw exception with message: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:647)
	... 81 common frames omitted
Caused by: java.lang.NullPointerException: Cannot invoke "com.usthe.sureness.provider.ducument.DocumentResourceEntity.getResourceRole()" because "this.entity" is null
	at com.usthe.sureness.provider.ducument.DocumentPathTreeProvider.providePathData(DocumentPathTreeProvider.java:31)
	at com.usthe.sureness.matcher.DefaultPathRoleMatcher.iterateOverPathTreeProviderList(DefaultPathRoleMatcher.java:138)
	at com.usthe.sureness.matcher.DefaultPathRoleMatcher.buildTree(DefaultPathRoleMatcher.java:75)
	at com.usthe.sureness.configuration.SurenessAutoConfiguration.pathRoleMatcher(SurenessAutoConfiguration.java:278)
	at com.usthe.sureness.configuration.SurenessAutoConfiguration$$SpringCGLIB$$0.CGLIB$pathRoleMatcher$5(<generated>)
	at com.usthe.sureness.configuration.SurenessAutoConfiguration$$SpringCGLIB$$FastClass$$1.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at com.usthe.sureness.configuration.SurenessAutoConfiguration$$SpringCGLIB$$0.pathRoleMatcher(<generated>)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
	... 82 common frames omitted



```

</details>

- application.yml  sureness.yml have no content.


Now i`m not really sure where to look for errors.
Have not change the root password on the db since i think the rest are configured to use the root to create their own users?

- i have tried the
`docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat`
and it gives me the interface, but want persistent storage and want ti use the db for that.

This was allot of text but tried to gather what you may need. Hope someone can help me get this up and update the repo with info to. This looks so amazing and watnt to test it.


GitHub link: https://github.com/apache/hertzbeat/discussions/2760

----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org


Re: [D] compose-hertzbeat keeps failing on NEW deployment [hertzbeat]

Posted by "tomsun28 (via GitHub)" <gi...@apache.org>.
GitHub user tomsun28 added a comment to the discussion: compose-hertzbeat keeps failing on NEW deployment

hi
> application.yml sureness.yml have no content.  

These two files need to have configuration content. 
Suggest use this compose file https://github.com/apache/hertzbeat/releases/download/v1.6.0/apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz , download and unzip it, `cd hertzbeat-postgresql-victoria-metrics` and then `docker compose up -d` 
more you can refer the compose readme in unzip file


GitHub link: https://github.com/apache/hertzbeat/discussions/2760#discussioncomment-10855879

----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org


Re: [D] compose-hertzbeat keeps failing on NEW deployment [hertzbeat]

Posted by "Hawolex (via GitHub)" <gi...@apache.org>.
GitHub user Hawolex added a comment to the discussion: compose-hertzbeat keeps failing on NEW deployment

Adding my compose file
 <details>
  <summary>Click me</summary>

```
version: "3.7"

networks:
  hertzbeat:
    driver: bridge

services:
  postgres:
    image: postgres:15
    container_name: compose-postgresql
    hostname: postgresql
    restart: always
    healthcheck:
      test: [ "CMD", "pg_isready" ]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 30s
    ports:
      - '5432:5432'
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: 123456
      TZ: Europe/Oslo
    volumes:
      - ./dbdata/pgdata/data:/var/lib/postgresql/data
      - ./conf/sql:/docker-entrypoint-initdb.d/      
    networks:
      - hertzbeat

  victoria-metrics:
    image: victoriametrics/victoria-metrics:v1.95.1
    container_name: compose-victoria-metrics
    hostname: victoria-metrics
    restart: always
    healthcheck:
      test: ["CMD", "wget", "-q", "-O", "-", "http://victoria-metrics:8428/-/healthy"]
      interval: 10s
      retries: 5
      timeout: 5s
      start_period: 30s
    environment:
      TZ: Europe/Oslo
    ports:
      - "8428"
    volumes:
      - ./dbdata/tsdbdata:/victoria-metrics-data
    networks:
      - hertzbeat

  hertzbeat:
    image: apache/hertzbeat
    container_name: compose-hertzbeat
    hostname: hertzbeat
    restart: always
    environment:
      TZ: Europe/Oslo
      LANG: nb_NO.UTF-8
    depends_on:
      postgres:
        condition: service_healthy
      victoria-metrics:
        condition: service_healthy
    volumes:
      - ./conf/application.yml:/opt/hertzbeat/config/application.yml
      - ./conf/sureness.yml:/opt/hertzbeat/config/sureness.yml
      - ./logs:/opt/hertzbeat/logs
      - ./ext-lib:/opt/hertzbeat/ext-lib
    ports:
      - "1157:1157"
      - "1158:1158"
    networks:
      - hertzbeat


```
</details>

As you can se only timezone and unicode change.
Have tried the original unicode aswell with same outcome. 

GitHub link: https://github.com/apache/hertzbeat/discussions/2760#discussioncomment-10830591

----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org