Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

JBoss Fabric Zookeeper Troubleshooting

November 3, 2017
saurabh rai
Related products:
Red Hat Fuse

    ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications.

    JBoss Fuse Fabric uses this Zookeeper maintaining its configuration so that it could be accessible to all the containers in the fabric environment. Let's look at some of the some of the issues we face or may face with Zookeeper in Fabric. Fabric container not detecting changes is done in Fabric Ensemble.

    In your Fabric Ensemble, you can come across situations where you need to move the container to some other machine. Even if you move the server to another location, still the Zookeeper configuration needs to be updated with the latest hostname of the machine. One way of doing so is to add the previous hostname in the /etc/hosts something like shown below:

    127.0.0.1  server0   server1

    If the Zookeeper URL does not point to the updated or correct hostname, you can do the following steps:

    • Run the command on Karaf console to check the current Zookeeper URL it is pointing to.
      JBossFuse:karaf@root> config:list |grep zookeeper.url
          zookeeper.url = server0:2181
    • Run the following commands to update the Zookeeper URL.
      JBossFuse:karaf@root> config:edit io.fabric8.zookeeper
      JBossFuse:karaf@root> config:proplist service.pid = io.fabric8.zookeeper
          zookeeper.password = ZKENC=YWRtaW4=
          zookeeper.url = server0:2181
          fabric.zookeeper.pid = io.fabric8.zookeeper
      JBossFuse:karaf@root> config:propset zookeeper.url server1:2181
      JBossFuse:karaf@root> config:update
    • Once you run the above command you can check to see the Zookeeper URL is updated.

    It is sometimes seen that a fabric container behaves as it is not part of fabric anymore. In addition to this, we face an issue that we see that the process is running but no logs are written in the container. You'll see an exception as:

    14:22:12,883 | INFO | .aoins.com:2182) | ClientCnxn | 57 - io.fabric8.fabric-zookeeper - 1.0.0.redhat-412 | Opening socket connection to server HOSTNAME1/10.17.56.148:2182. Will not attempt to authenticate using SASL (unknown error)
    14:22:12,889 | INFO | .aoins.com:2182) | ClientCnxn | 57 - io.fabric8.fabric-zookeeper - 1.0.0.redhat-412 | Socket connection established to HOSTNAME1/101.17.56.148:2182, initiating session
    14:22:12,960 | WARN | erSender[myid=4] | QuorumCnxManager | 57 - io.fabric8.fabric-zookeeper - 1.0.0.redhat-412 | Cannot open channel to 5 at election address HOSTNAME2/10.17.56.150:2183
    java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)[:1.7.0_71]
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)[:1.7.0_71]
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)[:1.7.0_71]

    This means the Zookeeper configuration is having a discrepancy with the number of containers running. To troubleshoot you need to compare the Zookeeper configuration with a running container and find the discrepancy and fix as above.

    You can look for the zookeeper config file in the bundle cache at location:
    Go to location ${karaf.home}/data/cache search for the zookeeper.config file.

    Run command:

    $ find . -name zookeeper.config
    
    $ find . -name zookeeper.config
    
        bundle8/data/config/io/fabric8/zookeeper.config
    
    $ less bundle7/data/config/io/fabric8/zookeeper.config
    
        zookeeper.url="HOSTNAME1:2182,HOSTNAME2:2183,HOSTNAME3:2184"

    The number of containers should equal to the number to comma-separated values in zookeeper.url. You can perform the steps mentioned at the start of the blog to update.


    Click here to for an overview of Red Hat JBoss Fuse a lightweight and modular integration platform.

    Last updated: October 31, 2017

    Recent Posts

    • Build a distributed RAG pipeline with Ray Data on OpenShift AI

    • OSFT explained: Prevent catastrophic forgetting in LLM fine-tuning

    • Enrich OpenShift compliance results with custom metadata

    • How we designed customizable dashboards in OpenShift

    • Standardize project context with AGENTS.md and Agent Skills

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    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
    © 2026 Red Hat

    Red Hat legal and privacy links

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

    Chat Support

    Please log in with your Red Hat account to access chat support.