Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 启用 GreptimeDB 后启动失败 #1754

Closed
1 task done
chenxu8989 opened this issue Apr 16, 2024 · 4 comments · Fixed by #2095
Closed
1 task done

[BUG] 启用 GreptimeDB 后启动失败 #1754

chenxu8989 opened this issue Apr 16, 2024 · 4 comments · Fixed by #2095
Assignees
Labels
bug Something isn't working

Comments

@chenxu8989
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

No response

Expected Behavior

No response

Steps To Reproduce

GreptimeDB 安装

docker run -d -p 4000-4003:4000-4003 \
-p 4242:4242 -v "/opt/greptimedb:/tmp/greptimedb" \
--name greptime --rm \
greptime/greptimedb standalone start \
--http-addr 0.0.0.0:4000 \
--rpc-addr 0.0.0.0:4001 \
--mysql-addr 0.0.0.0:4002 \
--postgres-addr 0.0.0.0:4003 \
--opentsdb-addr 0.0.0.0:4242

配置文件

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
server:
  port: 1157
spring:
  application:
    name: ${HOSTNAME:@hertzbeat@}${PID}
  profiles:
    active: prod
  mvc:
    static-path-pattern: /**
  jackson:
    default-property-inclusion: ALWAYS
  web:
    resources:
      static-locations:
        - classpath:/dist/
        - classpath:../dist/
  # need to disable spring boot mongodb auto config, or default mongodb connection tried and failed..
  autoconfigure:
    exclude: org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration, org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration
  freemarker:
    enabled: false


management:
  health:
    mail:
      enabled: off
  endpoints:
    web:
      exposure:
        include:
          - 'metrics'
          - 'health'
    enabled-by-default: on

sureness:
  auths:
    - digest
    - basic
    - jwt
  jwt:
    secret: 'CyaFv0bwq2Eik0jdrKUtsA6bx3sDJeFV643R
             LnfKefTjsIfJLBa2YkhEqEGtcHDTNe4CU6+9
             8tVt4bisXQ13rbN0oxhUZR73M6EByXIO+SV5
             dKhaX0csgOCTlCxq20yhmUea6H6JIpSE2Rwp'

---
spring:
  config:
    activate:
      on-profile: prod

  datasource:
    driver-class-name: org.postgresql.Driver
    username: postgres
    password: 123456
    url: jdbc:postgresql://rhel2:5432/postgres?currentSchema=hertzbeat
    hikari:
      max-lifetime: 120000

  jpa:
    database: postgresql
    hibernate:
      ddl-auto: update
    properties:
      hibernate:
        dialect: org.hibernate.dialect.PostgreSQLDialect

  # Not Require, Please config if you need email notify
  # 非必填:不使用邮箱作为警告通知可以去掉spring.mail配置
  mail:
    # Attention: this is mail server address.
    # 请注意此为邮件服务器地址:qq邮箱为 smtp.qq.com qq 企业邮箱为 smtp.exmail.qq.com
    host: smtp.qq.com
    username: [email protected]
    # Attention: this is not email account password, this requires an email authorization code
    # 请注意此非邮箱账户密码 此需填写邮箱授权码
    password: your-password
    #Attention: Tencent mail smtps 465,smtp 587
    #请注意腾讯邮箱465为smtps,587为smtp
    port: 587
    properties:
      mail:
        smtp:
          socketFactoryClass: javax.net.ssl.SSLSocketFactory
          ssl:
            enable: true

common:
  queue:
    # memory or kafka
    type: memory
    # properties when queue type is kafka
    kafka:
      servers: 127.0.0.1:9092
      metrics-data-topic: async-metrics-data
      alerts-data-topic: async-alerts-data

warehouse:
  store:
    # store history metrics data, enable only one below
    # 存储历史数据方式, 下方只能enabled启用一种方式
    jpa:
      enabled: false
      # The maximum retention time for history records, after which records will be deleted
      expire-time: 1h
      # The maximum number of history records retained, if this number is exceeded, half of the data in this configuration item will be deleted
      # (please set this configuration reasonably as history records can affect performance when it is large)
      # 历史数据的最大保留条数,超过此数量时,将会删除一半于此配量的数据(由于历史数据较大时会影响性能,请合理设置此配置)
      max-history-record-num: 6000
    victoria-metrics:
      enabled: false
      url: http://localhost:8428
      username: root
      password: root
    td-engine:
      enabled: false
      driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
      url: jdbc:TAOS-RS://localhost:6041/hertzbeat
      username: root
      password: taosdata
    greptime:
      enabled: true
      endpoint: localhost:4001
    iot-db:
      enabled: false
      host: 127.0.0.1
      rpc-port: 6667
      username: root
      password: root
      # org.dromara.hertzbeat.warehouse.config.IotDbVersion: V_0_13 || V_1_0
      version: V_1_0
      query-timeout-in-ms: -1
      # 数据存储时间:默认'7776000000'(90天,单位为毫秒,-1代表永不过期)
      # data expire time, unit:ms, default '7776000000'(90 days, -1:never expire)
      expire-time: '7776000000'
    influxdb:
      enabled: false
      server-url: http://127.0.0.1:8086
      username: root
      password: root
      expire-time: '30d'
      replication: 1

    # store real-time metrics data, enable only one below
    # 存储实时数据方式, 下方只能enabled启用一种方式
    memory:
      enabled: true
      init-size: 16
    redis:
      enabled: false
      host: 127.0.0.1
      port: 6379
      password: 123456
      #redis使用数据库,默认为DB0
      db: 0

alerter:
  # custom console url
  console-url: https://console.tancloud.cn
  # 企业微信
  wework-webHook-url: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=
  # 钉钉
  dingtalk-webhook-url: https://oapi.dingtalk.com/robot/send?access_token=
  # 飞书
  flybook-webhook-url: https://open.feishu.cn/open-apis/bot/v2/hook/
  # telegram
  telegram-bot-api-url: https://api.telegram.org/bot%s/sendMessage
  # discord
  discord-notify-url: https://discord.com/api/v9/channels/%s/messages
  # server酱
  server-chan-notify-url: https://sctapi.ftqq.com/%s.send
  # gotify
  gotify-notify-url: http://127.0.0.1/message?token=%s

scheduler:
  server:
    enabled: true
    port: 1158

startup.log

  _   _           _       ____             _
 | | | | ___ _ __| |_ ___| __ )  ___  __ _| |_
 | |_| |/ _ \ '__| __|_  /  _ \ / _ \/ _` | __|        Profile: prod
 |  _  |  __/ |  | |_ / /| |_) |  __/ (_| | |_         Name: rhel224063 Port: 1157 Pid: 24063
 |_| |_|\___|_|   \__/___|____/ \___|\__,_|\__|        https://hertzbeat.com/ 

2024-04-16 11:08:25 [main] INFO  org.dromara.hertzbeat.manager.Manager - Starting Manager using Java 11.0.21 on rhel2 with PID 24063 (/opt/hertzbeat/hertzbeat.jar started by root in /opt/hertzbeat)
2024-04-16 11:08:25 [main] INFO  org.dromara.hertzbeat.manager.Manager - The following 1 profile is active: "prod"
2024-04-16 11:08:25 [background-preinit] INFO  org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 6.2.5.Final
2024-04-16 11:08:27 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2024-04-16 11:08:27 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 508 ms. Found 24 JPA repository interfaces.
2024-04-16 11:08:29 [main] INFO  org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 1157 (http)
2024-04-16 11:08:29 [main] INFO  org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-1157"]
2024-04-16 11:08:29 [main] INFO  org.apache.catalina.core.StandardService - Starting service [Tomcat]
2024-04-16 11:08:29 [main] INFO  org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.65]
2024-04-16 11:08:29 [main] INFO  org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2024-04-16 11:08:29 [main] INFO  org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 4531 ms
2024-04-16 11:08:29 [main] INFO  com.usthe.sureness.configuration.SurenessAutoConfiguration - [sureness-starter] - SurenessSubjectFactory init success
2024-04-16 11:08:30 [main] INFO  com.usthe.sureness.configuration.SurenessFilter - servlet surenessFilter initialized
2024-04-16 11:08:30 [main] INFO  org.hibernate.jpa.internal.util.LogHelper - HHH000204: Processing PersistenceUnitInfo [name: default]
2024-04-16 11:08:30 [main] INFO  org.hibernate.Version - HHH000412: Hibernate ORM core version 5.6.11.Final
2024-04-16 11:08:30 [main] INFO  org.hibernate.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2024-04-16 11:08:31 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2024-04-16 11:08:31 [main] INFO  cc.blynk.clickhouse.ClickHouseDriver - Driver registered
2024-04-16 11:08:31 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2024-04-16 11:08:31 [main] INFO  org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
2024-04-16 11:08:34 [main] INFO  org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2024-04-16 11:08:34 [main] INFO  org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default'
2024-04-16 11:08:37 [main] INFO  org.apache.arrow.memory.BaseAllocator - Debug mode disabled.
2024-04-16 11:08:37 [main] INFO  org.apache.arrow.memory.DefaultAllocationManagerOption - allocation manager type not specified, using netty as the default type
2024-04-16 11:08:37 [main] INFO  org.apache.arrow.memory.CheckAllocator - Using DefaultAllocationManager at memory-netty-10.0.1.jar!/org/apache/arrow/memory/DefaultAllocationManagerFactory.class
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.arrow.memory.util.MemoryUtil (file:/opt/hertzbeat/lib/arrow-memory-core-10.0.1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of org.apache.arrow.memory.util.MemoryUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2024-04-16 11:08:38 [main] WARN  org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'metricsDataController' defined in URL [jar:file:/opt/hertzbeat/lib/hertzbeat-warehouse-1.0.jar!/org/dromara/hertzbeat/warehouse/controller/MetricsDataController.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'historyGrepTimeDbDataStorage' defined in URL [jar:file:/opt/hertzbeat/lib/hertzbeat-warehouse-1.0.jar!/org/dromara/hertzbeat/warehouse/store/HistoryGrepTimeDbDataStorage.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.dromara.hertzbeat.warehouse.store.HistoryGrepTimeDbDataStorage]: Constructor threw exception; nested exception is java.lang.IndexOutOfBoundsException: index: -1, length: 0 (expected: range(0, 48))
2024-04-16 11:08:38 [Timer-0] ERROR org.dromara.hertzbeat.push.service.impl.PushServiceImpl - periodical deletion failed. Error creating bean with name 'transactionManager': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
2024-04-16 11:08:38 [metrics-task-dispatcher] INFO  org.dromara.hertzbeat.collector.dispatch.CommonDispatcher - [Dispatcher]-metrics-task-dispatcher has been interrupt to close.
2024-04-16 11:08:38 [metrics-task-dispatcher] INFO  org.dromara.hertzbeat.collector.dispatch.CommonDispatcher - Thread Interrupted, Shutdown the [metrics-task-dispatcher]
2024-04-16 11:08:38 [main] INFO  org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2024-04-16 11:08:38 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2024-04-16 11:08:38 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
2024-04-16 11:08:38 [main] INFO  org.apache.catalina.core.StandardService - Stopping service [Tomcat]
2024-04-16 11:08:38 [main] INFO  com.usthe.sureness.configuration.SurenessFilter - servlet surenessFilter destroyed
2024-04-16 11:08:38 [main] INFO  org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2024-04-16 11:08:38 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'metricsDataController' defined in URL [jar:file:/opt/hertzbeat/lib/hertzbeat-warehouse-1.0.jar!/org/dromara/hertzbeat/warehouse/controller/MetricsDataController.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'historyGrepTimeDbDataStorage' defined in URL [jar:file:/opt/hertzbeat/lib/hertzbeat-warehouse-1.0.jar!/org/dromara/hertzbeat/warehouse/store/HistoryGrepTimeDbDataStorage.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.dromara.hertzbeat.warehouse.store.HistoryGrepTimeDbDataStorage]: Constructor threw exception; nested exception is java.lang.IndexOutOfBoundsException: index: -1, length: 0 (expected: range(0, 48))
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
	at org.dromara.hertzbeat.manager.Manager.main(Manager.java:40)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'historyGrepTimeDbDataStorage' defined in URL [jar:file:/opt/hertzbeat/lib/hertzbeat-warehouse-1.0.jar!/org/dromara/hertzbeat/warehouse/store/HistoryGrepTimeDbDataStorage.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.dromara.hertzbeat.warehouse.store.HistoryGrepTimeDbDataStorage]: Constructor threw exception; nested exception is java.lang.IndexOutOfBoundsException: index: -1, length: 0 (expected: range(0, 48))
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:296)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
	... 19 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.dromara.hertzbeat.warehouse.store.HistoryGrepTimeDbDataStorage]: Constructor threw exception; nested exception is java.lang.IndexOutOfBoundsException: index: -1, length: 0 (expected: range(0, 48))
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:311)
	... 36 common frames omitted
Caused by: java.lang.IndexOutOfBoundsException: index: -1, length: 0 (expected: range(0, 48))
	at org.apache.arrow.memory.ArrowBuf.checkIndex(ArrowBuf.java:701)
	at org.apache.arrow.memory.ArrowBuf.getBytes(ArrowBuf.java:728)
	at org.apache.arrow.vector.VarCharVector.get(VarCharVector.java:116)
	at org.apache.arrow.vector.VarCharVector.getObject(VarCharVector.java:127)
	at org.apache.arrow.vector.VarCharVector.getObject(VarCharVector.java:38)
	at io.greptime.models.SelectRows$DefaultSelectRows.consume(SelectRows.java:126)
	at io.greptime.models.SelectRows$DefaultSelectRows.hasNext(SelectRows.java:161)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at io.greptime.models.SelectRows.collect(SelectRows.java:65)
	at org.dromara.hertzbeat.warehouse.store.HistoryGrepTimeDbDataStorage.createDatabase(HistoryGrepTimeDbDataStorage.java:119)
	at org.dromara.hertzbeat.warehouse.store.HistoryGrepTimeDbDataStorage.initDbSession(HistoryGrepTimeDbDataStorage.java:88)
	at org.dromara.hertzbeat.warehouse.store.HistoryGrepTimeDbDataStorage.<init>(HistoryGrepTimeDbDataStorage.java:73)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:211)
	... 38 common frames omitted
2024-04-16 11:08:41 [status-page-calculate-0] INFO  org.dromara.hertzbeat.manager.component.status.CalculateStatus - start to calculate status page state
2024-04-16 11:08:41 [status-page-calculate-0] ERROR org.dromara.hertzbeat.manager.component.status.CalculateStatus - status page calculate component state error: Error creating bean with name 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties': Could not bind properties to 'DataSourceProperties' : prefix=spring.datasource, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@78e16155 has not been refreshed yet
org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties': Could not bind properties to 'DataSourceProperties' : prefix=spring.datasource, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@78e16155 has not been refreshed yet
	at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:92)
	at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:78)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
	at org.springframework.beans.factory.support.ConstructorResolver.resolvePreparedArguments(ConstructorResolver.java:834)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:449)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
	at org.springframework.beans.factory.support.ConstructorResolver.resolvePreparedArguments(ConstructorResolver.java:834)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:449)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory$1.orderedStream(DefaultListableBeanFactory.java:481)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:167)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:149)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:174)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at com.sun.proxy.$Proxy192.findAll(Unknown Source)
	at org.dromara.hertzbeat.manager.component.status.CalculateStatus.lambda$startCalculate$1(CalculateStatus.java:86)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@78e16155 has not been refreshed yet
	at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1141)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1159)
	at org.springframework.boot.context.properties.BoundConfigurationProperties.get(BoundConfigurationProperties.java:78)
	at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.getHandler(ConfigurationPropertiesBinder.java:133)
	at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.getBindHandler(ConfigurationPropertiesBinder.java:114)
	at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:94)
	at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:89)
	... 56 common frames omitted

Environment

HertzBeat version(s):

Debug logs

No response

Anything else?

No response

@zqr10159
Copy link
Member

zqr10159 commented Apr 16, 2024

Hi, due to the greptime api change, the latest version is no longer supported, you can use TDengine, Victoria Metrics and other databases.

@killme2008
Copy link
Contributor

killme2008 commented Apr 19, 2024

Sorry for that. Greptime is still under heavy development. GreptimeDB gRPC query API was already deprecated, we recommend using JDBC for querying.

Let me create a PR to fix this issue.

@zqr10159 zqr10159 assigned zqr10159 and killme2008 and unassigned zqr10159 Apr 19, 2024
@zqr10159
Copy link
Member

Sorry for that. Greptime is still under heavy development. GreptimeDB gRPC query API was already deprecated, we recommend using JDBC for querying.

Let me create a PR to fix this issue.

Thanks a lot

@killme2008
Copy link
Contributor

Fixed in #2095

Please take a look @zqr10159 . Sorry for being so late.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

3 participants