10.3. 修改现有服务器高可用性配置


如果您要修改现有 JBoss EAP 高可用性配置,则需要对 jgroups 子系统进行以下更改:

流程

  1. 启动管理 CLI 并嵌入服务器,以对您选择的配置文件进行离线更改。例如:

    $ EAP_HOME/bin/jboss-cli.sh
    [disconnected /] embed-server --server-config=standalone-ha.xml
    Copy to Clipboard Toggle word wrap
  2. 默认情况下,JGroups 使用 UDP 堆栈。如果您使用另一个堆栈,请改回到使用 UDP 堆栈:

    [standalone@embedded /] /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=udp)
    Copy to Clipboard Toggle word wrap
  3. 执行以下命令批删除现有的 UDP 堆栈并为 Microsoft Azure 配置新的 UDP 堆栈:

    重要

    以下命令中使用的 storage_access_key 编码必须是 Base64。

    batch
    /subsystem=jgroups/stack=udp:remove
    /subsystem=jgroups/stack=udp:add()
    /subsystem=jgroups/stack=udp/transport=UDP:add(socket-binding=jgroups-udp,properties={ip_mcast=false})
    /subsystem=jgroups/stack=udp/protocol=azure.AZURE_PING:add(properties={storage_account_name="${jboss.jgroups.azure_ping.storage_account_name}", storage_access_key="${jboss.jgroups.azure_ping.storage_access_key}", container="${jboss.jgroups.azure_ping.container}"})
    /subsystem=jgroups/stack=udp/protocol=MERGE3:add
    /subsystem=jgroups/stack=udp/protocol=FD_SOCK2:add(socket-binding=jgroups-udp-fd)
    /subsystem=jgroups/stack=udp/protocol=FD_ALL3:add
    /subsystem=jgroups/stack=udp/protocol=VERIFY_SUSPECT2:add
    /subsystem=jgroups/stack=udp/protocol=pbcast.NAKACK2:add(properties={use_mcast_xmit=false,use_mcast_xmit_req=false})
    /subsystem=jgroups/stack=udp/protocol=UNICAST3:add
    /subsystem=jgroups/stack=udp/protocol=pbcast.STABLE:add
    /subsystem=jgroups/stack=udp/protocol=pbcast.GMS:add
    /subsystem=jgroups/stack=udp/protocol=UFC:add
    /subsystem=jgroups/stack=udp/protocol=MFC:add
    /subsystem=jgroups/stack=udp/protocol=FRAG4:add
    run-batch
    Copy to Clipboard Toggle word wrap
    注意

    如果要将 Microsoft Azure 存储帐户和 blob 容器的值存储在配置文件中,请将上述配置中的系统属性引用替换为 Azure 环境中的值。在以下命令中,使用了启动 JBoss EAP 的示例。

    配置文件中的堆栈 XML 应该类似如下:

    <stack name="udp">
        <transport type="UDP" socket-binding="jgroups-udp"/>
        <protocol type="RED"/>
        <protocol type="azure.AZURE_PING">
            <property name="storage_account_name">${jboss.jgroups.azure_ping.storage_account_name}</property>
            <property name="storage_access_key">${jboss.jgroups.azure_ping.storage_access_key}</property>
            <property name="container">${jboss.jgroups.azure_ping.container}</property>
        </protocol>
        <protocol type="MERGE3"/>
        <socket-protocol type="FD_SOCK2" socket-binding="jgroups-udp-fd"/>
        <protocol type="FD_ALL3"/>
        <protocol type="VERIFY_SUSPECT2"/>
        <protocol type="pbcast.NAKACK2"/>
        <protocol type="UNICAST3"/>
        <protocol type="pbcast.STABLE"/>
        <protocol type="pbcast.GMS"/>
        <protocol type="UFC"/>
        <protocol type="MFC"/>
        <protocol type="FRAG4"/>
    </stack>
    Copy to Clipboard Toggle word wrap
  4. 停止嵌入的服务器并退出管理 CLI:

    [standalone@embedded /] stop-embedded-server
    [disconnected /] exit
    Copy to Clipboard Toggle word wrap
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部