Skip to content

[BUG] Spring app fails to start #3325

Closed
@vrzlev

Description

@vrzlev

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running latest version with docker:

docker run --rm  -p 1157:1157 --name hertzbeat apache/hertzbeat

Seeing no errors in console output:

[...cut for brevity...]
01:17:03,463 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting additivity of logger [com.obs.log.AccessLogger] to false
01:17:03,463 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@2449cff7 - End of configuration.
01:17:03,463 |-INFO in org.springframework.boot.logging.logback.SpringBootJoranConfigurator@42a9a63e - Registering current configuration as safe fallback point

  _   _           _       ____             _
 | | | | ___ _ __| |_ ___| __ )  ___  __ _| |_
 | |_| |/ _ \ '__| __|_  /  _ \ / _ \/ _` | __|        Profile: prod
 |  _  |  __/ |  | |_ / /| |_) |  __/ (_| | |_         Name: 594fad6a9b6011 Port: 1157 Pid: 11
 |_| |_|\___|_|   \__/___|____/ \___|\__,_|\__|        https://hertzbeat.apache.org/ 

But localhost:1157 doesn't connect, even inside the container (connection reset or connection refused errors).

However the container has /opt/hertzbeat/logs/594fad6a9b6011-2025-05-11-error.0.log:

2025-05-11 01:17:12.959 [main] ERROR org.springframework.boot.SpringApplication Line:857 - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processorMetrics' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/SystemMetricsAutoConfiguration.class]: Failed to instantiate [io.micrometer.core.instrument.binder.system.ProcessorMetrics]: Factory method 'processorMetrics' threw exception with message: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
[...]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.micrometer.core.instrument.binder.system.ProcessorMetrics]: Factory method 'processorMetrics' threw exception with message: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
[...]
Caused by: java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null

2025-05-11 01:17:15.474 [status-page-calculate-0] ERROR org.apache.hertzbeat.manager.component.status.CalculateStatus Line:157 - status page calculate component state error: Error creating bean with name 'spring.flyway-org.springframework.boot.autoconfigure.flyway.FlywayProperties': Could not bind properties to 'FlywayProperties' : prefix=spring.flyway, ignoreInvalidFields=false, ignoreUnknownFields=true
org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.flyway-org.springframework.boot.autoconfigure.flyway.FlywayProperties': Could not bind properties to 'FlywayProperties' : prefix=spring.flyway, ignoreInvalidFields=false, ignoreUnknownFields=true
[...]
Caused by: java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1dfd5f51 has not been refreshed yet
[...]
2025-05-11 01:17:15.879 [jpa-metrics-cleaner-0] ERROR org.apache.hertzbeat.warehouse.store.history.jpa.JpaDatabaseDataStorage Line:116 - expiredDataCleaner database error: Error creating bean with name 'spring.flyway-org.springframework.boot.autoconfigure.flyway.FlywayProperties': Could not bind properties to 'FlywayProperties' : prefix=spring.flyway, ignoreInvalidFields=false, ignoreUnknownFields=true.
2025-05-11 01:17:15.879 [jpa-metrics-cleaner-0] ERROR org.apache.hertzbeat.warehouse.store.history.jpa.JpaDatabaseDataStorage Line:117 - try to truncate table hzb_history. Please use time series db instead of jpa for better performance.

Tried with v.1.6.1 docker image too, same result.

All pointers are appreciated.

Expected Behavior

Web UI loads on given port.

Steps To Reproduce

No response

Environment

HertzBeat version(s): 1.7, 1.6.1
Docker version 28.1.1-ce, build 01f442b84

Debug logs

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions