Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Quick links: redhat.com, Customer Portal, Red Hat's developer site, Red Hat's partner site.

  • You are here

    Red Hat

    Learn about our open source products, services, and company.

  • You are here

    Red Hat Customer Portal

    Get product support and knowledge from the open source experts.

  • You are here

    Red Hat Developer

    Read developer tutorials and download Red Hat software for cloud application development.

  • You are here

    Red Hat Partner Connect

    Get training, subscriptions, certifications, and more for partners to build, sell, and support customer solutions.

Products & tools

  • Ansible.com

    Learn about and try our IT automation product.
  • Red Hat Ecosystem Catalog

    Find hardware, software, and cloud providers―and download container images―certified to perform with Red Hat technologies.

Try, buy, & sell

  • Red Hat Hybrid Cloud Console

    Access technical how-tos, tutorials, and learning paths focused on Red Hat’s hybrid cloud managed services.
  • Red Hat Store

    Buy select Red Hat products and services online.

Events

  • Red Hat Summit and AnsibleFest

    Register for and learn about our annual open source IT industry event.

Set up JBoss EAP 7 clustering in OpenShift using DNS_PING

June 2, 2025
Francisco De Melo Junior Alexander Barbosa Ayala
Related topics:
JavaJava MicroservicesOperatorsSpring Boot
Related products:
Red Hat Data GridRed Hat JBoss Enterprise Application PlatformRed Hat OpenShift

Share:

Share on twitter Share on facebook Share on linkedin Share with email
  • DNS_PING setting
  • DNS_PING operation
  • A note about JBoss EAP 8
  • OpenShift Service Mesh Usage and Support
  • What's next

Red Hat JBoss Enterprise Application Platform (JBoss EAP) 7 is an open source platform for highly transactional, web-scale Java applications deployed in war/jar/ear and abides by specifications such as Jakarta 8. But it also provides messaging, distributed caching, and clustering features, as explained in the Introduction to JBoss EAP Guide. 

In terms of clustering, when JBoss EAP 7 is deployed in Red Hat OpenShift Container Platform (RHOCP), by default JBoss EAP 7 image will have clustering capabilities enabled. To provide those clustering capabilities, JBoss EAP 7 relies on JGroups discovery protocols, such as DNS_PING or KUBE_PING, also known as ping protocols, to provide the ping capabilities for the clustering within the pods. 

In this two-part article series, I will provide more information about both of those mechanisms and how they differ. Both articles are based on solutions/articles such as EAP 7 image clustering in OCP 4, which provides extensive details on clustering. In this first part, I will describe the process when using DNS_PING as discovery protocol. 

It is important to highlight that although they are enabled by default, clustering capabilities are triggered/started on JBoss EAP 7 after the deployment of clustered applications. Therefore, clustering logs (such as the following one) are logged after the clustering capabilities start:

$ oc logs eap-example-0 | grep ISPN000094
00:01:01,023 INFO  [org.infinispan.CLUSTER] (ServerService Thread Pool -- 14) ISPN000094: Received new cluster view for channel ee: [eap-example-0] (1) [eap-example-0]
Copy snippet
DNS_PING setting

DNS_PING setting

The setting of DNS_PING as a discovery protocol is done using the environment variables JGROUPS_PING_PROTOCOL, OPENSHIFT_DNS_PING_SERVICE_NAME, and OPENSHIFT_DNS_PING_SERVICE_PORT. DNS_PING. The following table summarizes this.

Environment variablePurpose
JGROUPS_PING_PROTOCOLdns.DNS_PING or Kubernetes KUBE_PING—for this blog post: dns.DNS_PING 
OPENSHIFT_DNS_PING_SERVICE_NAME Name of the service exposing the ping port on the servers for the DNS discovery mechanism. Example value: eap-app-ping
OPENSHIFT_DNS_PING_SERVICE_PORTThe port number of the ping port for the DNS discovery mechanism. If not specified, an attempt is made to discover the port number from the SRV records for the service, otherwise the default 8888 is used.

When doing deployment via template in JBoss EAP 7 (i.e., Source-to-Image deployment is done) the deployment will use DNS_PING instead of KUBE_PING, which is the default usage when deploying via JBoss EAP Operator for example. Also, openshift.DNS_PING is the deprecated name, and the current name is: dns.DNS_PING. You can see other variables here.

DNS_PING operation

DNS_PING operation

The JBoss EAP 7 configuration points to a service via the dns.DNS_PING properties. The following deployment via template:

$ cat /opt/eap/standalone/configuration/standalone-openshift.xml  | grep -A 3 -B 3 dns
            <stacks>
                <stack name="tcp">
                    <transport type="TCP" socket-binding="jgroups-tcp"/>
                    <protocol type="dns.DNS_PING">
                        <property name="dns_query">eap-app-ping</property>
                        <property name="async_discovery_use_separate_thread_per_request">true</property>
                    </protocol>
                    <protocol type="MERGE3"/>
Copy snippet

So then the service eap-app-ping will be used to connect the pods—and to binding those pods a selector is used—this label must be on the pods. For instance, in the following example eap-app is the selector the service will bind, meaning any pod with that selector will be connected via this service.

$ oc get service eap-app-ping -o yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    description: The JGroups ping port for clustering.
...
spec:
  clusterIP: None
  clusterIPs:
  - None
...
  publishNotReadyAddresses: true
  selector:
    deploymentConfig: eap-app  <------------------------ here the deploymentConfig is set for the eap-app
Copy snippet

Given JBoss EAP 7 is deployed via DeploymentConfig YAML, so then the DeploymentConfig and the pods will have the respective labels:

$ oc get dc/eap-app -o yaml | grep -B 5 -A 5 JGROUPS
        deploymentConfig: eap-app
      name: eap-app
    spec:
      containers:
      - env:
        - name: JGROUPS_PING_PROTOCOL
          value: dns.DNS_PING
        - name: OPENSHIFT_DNS_PING_SERVICE_NAME
          value: eap-app-ping
        - name: OPENSHIFT_DNS_PING_SERVICE_PORT
          value: "8888"
Copy snippet

Pod labels:

  selector:
    deploymentConfig: eap-app  <------------------------ here the deploymentConfig is set for the eap-app
Copy snippet

The pod's selector is crucial for the service (svc) to find it—otherwise, the service will not find the pods and therefore JBoss EAP 7 won't be able to cluster.

Service details

Clustering capabilities rely solely on eap-app-ping (as previously shown), so other services are not mandatory. The eap-app-ping is a headless service, meaning the service will point straight to the Pods' IPs. This can be shown as:

oc get ep,svc -o wide
NAME                                                     ENDPOINTS                                                          AGE
endpoints/eap-app-ping                                   1.1.1.127:8888,1.1.1.128:8888                                 75m
Copy snippet

In the previous endpoints, 1.1.1.127:8888, 1.1.1.128:8888 (*example IPs) are two pods IPs. So, the requests go straight to those pods. This can be used to confirm if the headless service is functioning properly and connecting the pods. 

From the OpenShift Container Platform console, go to Network > Services, and the eap-app-ping should show the related pods (the ones it connects to) on the console, this will show more details on this service.

Troubleshooting DNS_PING

One can set DNS_PING for tracing or JGroups and have more details on the clustering operation:

### dns_ping as trace
$ oc set env dc/eap-app LOGGER_CATEGORIES=org.jgroups.protocols.DNS_PING:TRACE
### jgroups as trace
$ oc set env dc/eap-app LOGGER_CATEGORIES=org.jgroups:TRACE
Copy snippet

The tracing log will be as follows:

  •  dns.DNS_PING: set the discovery protocol.
  • logging: Category org.jgroups.protocols.dns with level TRACE. This message will be added in case TRACE is set.
  • Initializing DNS Context with factory: com.sun.jndi.dns.DnsContextFactory and URL.
  • Resolving DNS query: eap-app-ping of a type: A. The query is sent to eap-app-ping service.
  • Collect the entries: eap-app-3-gkcjb: entries collected from DNS (in 2 ms): [127.1.1.1:0, 127.1.1.2:0, 127.1.1.3:0, 127.1.1.4:0]. Collect these.
  • Send discovery request: Sending discovery request to 127.1.1.2.:7600. Example request sent.
  • Received: GET_MBRS_REQ and GET_MBRS_RSP for each member.
  • The node will get GET_MBRS_RSP from other nodes, which will join the cluster: ISPN100000: Node eap-app-pod-2 joined the cluster.
  • The reply will be name address and coordinator: sending the response eap-app-pod-1, name=eap-app-pod-1, addr=127.1.1.:7600, coordinator.
  • Rebalance: ISPN100002: Starting rebalance with members [eap-app-pod-1, eap-app-pod-2], phase READ_OLD_WRITE_ALL, topology id 2.
A note about JBoss EAP 8

A note about JBoss EAP 8

Regarding JBoss EAP 8 container deployment with clustering, the default simple build (such as the following) will not bring clustering capabilities:

### Value file below does not have clustering capabilities:
build:
  uri: https://github.com/jboss-developer/jboss-eap-quickstarts.git
  ref: 8.0.x
  contextDir: helloworld
  env:
  - name: MAVEN_OPTS_APPEND
    value: '-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m'
deploy:
  replicas: 3
Copy snippet

To have clustering capabilities, deploy JBoss EAP 8 with a configuration/layer that provides JGroups subsystem, such as cloud-default-config, which is a layer that mimics what used to be present in the JBoss EAP 7.4.x images default installed server.

build:
  uri: https://github.com/jboss-developer/jboss-eap-quickstarts.git
  ref: 8.0.x
  contextDir: helloworld
  env:
  - name: GALLEON_PROVISION_FEATURE_PACKS 
    value: 'org.jboss.eap:wildfly-ee-galleon-pack, org.jboss.eap.cloud:eap-cloud-galleon-pack'
  - name: GALLEON_PROVISION_LAYERS 
    value: 'cloud-default-config'
  - name: GALLEON_PROVISION_CHANNELS 
    value: 'org.jboss.eap.channels:eap-8.0'
deploy:
  replicas: 3  
Copy snippet

To verify clustering capabilities see the start of the JBoss EAP pods, see the following.

Disabled:

     INFO Clustering feature is not enabled, no jgroups subsystem present in server configuration.
Copy snippet

Enabled:

    INFO Configuring JGroups cluster traffic encryption protocol to SYM_ENCRYPT. 
    WARN Detected missing JGroups encryption configuration, the communication within the cluster WILL NOT be encrypted. 
    WARN No password defined for JGroups cluster. AUTH protocol will be disabled. Please define JGROUPS_CLUSTER_PASSWORD. 
     INFO Configuring JGroups discovery protocol to dns.DNS_PING    
Copy snippet
OpenShift Service Mesh Usage and Support

OpenShift Service Mesh Usage and Support

Red Hat OpenShift Service Mesh is not currently supported in JBoss EAP 7 nor in its side-car or ambient mesh configurations. However, evidently, in some circumstances, it can be useful for testing/verifying observability or security as well as access control. Red Hat Service Mesh Operator OpenShift Container Image uses Istio and allows the insertion of the envoy proxy as a sidecar (so two containers in the same pod: JBoss EAP and envoy proxy). The requests and connection exchanges will be done through the envoy. 

 

Warning:

Be aware of peer authentication, which is set on the envoy sidecar that has implications on JBoss EAP 7 clustering, even halting cluster capabilities in the case of mtls strict.

What's next

What's next

This article described the setting up and operation of JBoss EAP 7 clustering via DNS_PING. The solutions EAP 7 image clustering in OCP 4, EAP 7 clustering deployments boundaries in OCP cluster, and EAP 7 DNS_PING tracing logs in OCP 4 describe the JBoss EAP 7 clustering properties and setting, boundaries of the JBoss EAP 7 DNS_PING services, and DNS_PING tracing usage and output interpretation.

The next installment will address the usage and operation of KUBE_PING as discovery protocol, which uses DNS A or SRV record entries to perform discovery, and it was done specifically for OpenShift/Kubernetes (referenced here).

For any other specific inquiries, please open a case with Red Hat support. Our global team of experts can help you with any issues. Special thanks to Mr. Dennis Reed for his outstanding collaboration and Alexander Barbosa for his review of this article.

Related Posts

  • Load balancing Red Hat JBoss Enterprise Application Platform subclusters with mod_cluster

  • Enable Eclipse MicroProfile applications on Red Hat JBoss Enterprise Application Platform 7.3

  • Troubleshooting user task errors in Red Hat Process Automation Manager and Red Hat JBoss BPM Suite

Recent Posts

  • OpenShift 4.19 brings a unified console for developers and admins

  • 3 steps to secure network segmentation with Ansible and AWS

  • Integrate vLLM inference on macOS/iOS using OpenAI APIs

  • How to implement developer self-service with Backstage

  • How Kruize optimizes OpenShift workloads

What’s up next?

Learn how to develop modern Java applications using JBoss EAP 8 and deploy them to Red Hat OpenShift with Helm charts for scalability and observability.

Start the activity
Red Hat Developers logo LinkedIn YouTube Twitter Facebook

Products

  • Red Hat Enterprise Linux
  • Red Hat OpenShift
  • Red Hat Ansible Automation Platform

Build

  • Developer Sandbox
  • Developer Tools
  • Interactive Tutorials
  • API Catalog

Quicklinks

  • Learning Resources
  • E-books
  • Cheat Sheets
  • Blog
  • Events
  • Newsletter

Communicate

  • About us
  • Contact sales
  • Find a partner
  • Report a website issue
  • Site Status Dashboard
  • Report a security problem

RED HAT DEVELOPER

Build here. Go anywhere.

We serve the builders. The problem solvers who create careers with code.

Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

Sign me up

Red Hat legal and privacy links

  • About Red Hat
  • Jobs
  • Events
  • Locations
  • Contact Red Hat
  • Red Hat Blog
  • Inclusion at Red Hat
  • Cool Stuff Store
  • Red Hat Summit

Red Hat legal and privacy links

  • Privacy statement
  • Terms of use
  • All policies and guidelines
  • Digital accessibility

Report a website issue