【问题标题】:Spring Boot application cannot join Coherence cluster on server: Join request was abortedSpring Boot 应用程序无法加入服务器上的 Coherence 集群:加入请求被中止
【发布时间】:2021-02-23 09:18:12
【问题描述】:

在另一个具有经典 Spring XML 配置的示例应用程序之后,我使用 Spring Boot 开发了一个小型 REST API 应用程序。它从设置了 Coherence 缓存的库中导入上下文。

当我在本地开发它时,使用 Intellij Idea runner 运行 Spring Boot 应用程序,没有任何问题,应用程序运行良好,并且端点可以连接到该缓存。

当我将应用程序部署到 Unix 服务器时,在应用程序启动过程中出现以下错误:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'coreSearchSync' defined in class path resource [core-search-core-context.xml]: Cannot resolve reference to bean 'corePersistenceManager' while setting bean property 'corePersistenceManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'corePersistenceManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ' coreSearchResultCache' defined in class path resource [core-search-coherence-context.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.tangosol.net.NamedCache]: Factory method 'getCache' threw exception; nested exception is (Wrapped: Failed to start Service "Management" (ServiceState=SERVICE_STOPPED)) java.lang.RuntimeException: Join request was aborted

服务器上的应用程序正在使用 application.properties,但它们与本地 application.yaml 中的相同。

我不知道从哪里继续调查......

【问题讨论】:

    标签: spring-boot oracle-coherence


    【解决方案1】:

    问题已通过将 JVM 参数传递给脚本以启动应用程序来解决:

    -Dtangosol.coherence.clusterport=<port> -Dtangosol.coherence.site=<site> -Dtangosol.coherence.clusteraddress=<cluster_ip_ddress> -Dtangosol.coherence.cluster=<cluster_name>

    这些属性似乎不是从应用程序属性中应用的,因为启动一致性集群在系统级别上工作和/或在属性初始化之前启动。或者这些属性对连贯性来说是不可见的。

    【讨论】:

    猜你喜欢
    • 2019-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-29
    • 2016-01-02
    • 1970-01-01
    • 1970-01-01
    • 2020-03-07
    相关资源
    最近更新 更多