Skip to content

How to Fix Bitbucket Data Center Cluster Error

DodaTech Updated 2026-06-24 2 min read

In this tutorial, you'll learn about How to Fix Bitbucket Data Center Cluster Error. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.

Bitbucket Data Center shows Node is OFFLINE in the cluster dashboard or the application hangs with Hazelcast connection timeout — cluster nodes cannot communicate through the Hazelcast discovery mechanism.

The Problem

2026-06-24 10:00:00 ERROR [HazelcastClient] Node is OFFLINE.
Connection to peer <node-2:5701> timed out after 5000ms.

Step-by-Step Fix

Step 1: Check network connectivity between nodes

# From node-1
nc -zv node-2 5701

Expected:

Connection to node-2 (10.0.0.2) port 5701 [tcp/hazelcast] succeeded!

Step 2: Verify shared home is accessible

# On all nodes
ls -la /shared/bitbucket-home/shared/

Step 3: Check Hazelcast configuration

<!-- /shared/bitbucket-home/shared/hazelcast-network-config.xml -->
<network>
  <join>
    <tcp-ip enabled="true">
      <member>node-1:5701</member>
      <member>node-2:5701</member>
      <member>node-3:5701</member>
    </tcp-ip>
  </join>
</network>

Step 4: Restart clustered nodes

# Stop each node gracefully
systemctl stop bitbucket
# Wait 30 seconds between restarts
systemctl start bitbucket

Step 5: Monitor cluster health

curl -u admin:password http://localhost:7990/rest/cluster-health/latest

Prevention Tips

  • Use TCP-IP discovery instead of multicast for stability
  • Ensure all nodes have synchronized clocks via NTP
  • Set hazelcast.heartbeat.interval to 5000ms in node configuration
  • Run an odd number of nodes for Hazelcast quorum

Common Mistakes with data center

  1. Placing the wildcard pattern first in case expressions, making all subsequent patterns unreachable
  2. Using head and tail instead of pattern matching, causing runtime errors on empty lists
  3. Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks

These mistakes appear frequently in real-world BITBUCKET code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

### What ports does Bitbucket Data Center need for clustering?

Node-to-node communication uses TCP port 5701 (Hazelcast). Elasticsearch and database connections use their standard ports. Ensure firewalls allow all required traffic between cluster nodes.

How do I add a new node to an existing cluster?

Provision a new server with the same shared home mount, install Bitbucket Data Center, and add the node IP to the Hazelcast network config. The cluster auto-discovers and joins the new node within 60 seconds.

Why does my cluster lose a node every few minutes?

Check for network timeout or packet loss between nodes. Run mtr node-1 node-2 to check latency. If latency exceeds 100ms, increase the Hazelcast timeout: hazelcast.network.timeout: 15000.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro