java - 通过 VPN 连接到网络时,Spring Boot 应用程序不会加入 Coherence 集群

标签 java oracle spring-boot oracle-coherence

我有一个在 Oracle WebLogic 服务器上运行的 J2EE Web 应用程序,并使用 Oracle Coherence 缓存。有一些 springboot 微服务并行运行并利用一致性。当通过VPN连接到网络时,springboot应用程序无法加入coherence集群。不使用 VPN 时工作正常。

我尝试了下面问题中提供的解决方案,但到目前为止没有成功。

Not able to connect coherence cluster from web application

操作覆盖xml:

<cluster-config>
    <member-identity>
     <cluster-name system-property="tangosol.coherence.cluster">XXXXXX</cluster-name>
  </member-identity>
   <unicast-listener>
  <socket-provider system-property="tangosol.coherence.socketprovider"/>
  <reliable-transport system-property="tangosol.coherence.transport.reliable"/>
  <well-known-addresses>
    <socket-address id="1">
      <address system-property="tangosol.coherence.wka">localhost</address>
      <port system-property="tangosol.coherence.wka.port">10000</port>
    </socket-address>
  </well-known-addresses>
  <address system-property="tangosol.coherence.localhost">localhost</address>
  <port system-property="tangosol.coherence.localport">10000</port>
  <port-auto-adjust system-property="tangosol.coherence.localport.adjust">true</port-auto-adjust>
  <priority>10</priority>
</unicast-listener>

    <multicast-listener>
        <time-to-live system-property="tangosol.coherence.ttl">4</time-to-live>
        <join-timeout-milliseconds>3000</join-timeout-milliseconds>
    </multicast-listener>
</cluster-config>
<configurable-cache-factory-config>
    .......
</configurable-cache-factory-config>>

控制台中打印以下消息。

2019-08-05 10:15:15.616/24.238 Oracle Coherence GE 12.1.3.0.0(线程=localhost-startStop-1,成员=n/a):使用 SystemDatagramSocketProvider 绑定(bind)到/192.168.1.101:10002 的 TCMP 2019-08-05 10:15:46.542/55.164 Oracle Coherence GE 12.1.3.0.0(线程=集群,成员=n/a):该成员(Id=0,时间戳=2019-08-05 10:15: 15.65, Address=XXX.XXX.X.XXX:10002, MachineId=34270, Location=site:,machine:XXXXXXX,process:34700, Role=XXXXXX) 一直在尝试使用 WKA 列表加入集群 [/XXX.XXX .X.XXX:10000] 30 秒但没有成功;这可能表明 WKA 配置错误,或者可能只是繁忙的集群或主动故障转移的结果。 2019-08-05 10:15:46.542/55.164 Oracle Coherence GE 12.1.3.0.0(线程=集群,成员=n/a):延迟新集群的形成;等待知名节点响应

在寻找解决方案时出现的问题是,通过 VPN 连接时本地主机无法解析。如果是这种情况,我不明白为什么 web 应用程序 ( http://localhost:7001 ) 在浏览器中加载没有任何问题。请帮忙。谢谢。

最佳答案

您必须检查集群的通信方式:多播还是单播。 之后您必须检查 VPN 网络是否支持所选的通信方法。

关于java - 通过 VPN 连接到网络时,Spring Boot 应用程序不会加入 Coherence 集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57352490/

相关文章:

java - 我无法将 css 文件链接到我的元素

java - 为什么老一代不好?

java - 如何在Spring中使用驱动类配置多个DataSource?

java - 如何通过 Spring Web 服务器将 HTTP 视频流代理到任意数量的客户端

java - 用Java完成一个简单的成绩簿程序,排序和清除功能

java - 具有多个空格的正则表达式

sql - 在 sql 语句的 IN 子句中使用多个日期

sql - Oracle SQL Developer 与 SQL Server Management Studio

sql - Oracle PL/SQL 数据类型

Spring 安全客户端详细信息将作为 DaoAuthenticationProvider 中的用户详细信息