Hi community!
I’m trying to set up Bitbucket using Docker Compose and enable clustering. However, I keep seeing the following message in the logs:
com.hazelcast.instance.impl.Node [172.28.0.11]:5701 [bitbucket-cluster] [5.4.1] No join method is enabled! Starting standalone. I’ve tried multiple configurations, but Hazelcast always starts in standalone mode. I’m using Docker Compose with 2 Bitbucket instances, on the same host, and I want them to form a cluster.
Has anyone successfully configured Bitbucket clustering in Docker Compose? What settings are required to enable Hazelcast clustering?
This is my compose file:
version: "3.8"
networks:
bitbucket-net:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16
services:
postgres:
image: postgres:16
container_name: bitbucket-db
environment:
POSTGRES_DB: bitbucket-db
POSTGRES_USER: bitbucket
POSTGRES_PASSWORD: bitbucket
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- bitbucket-net
bitbucket-1:
image: atlassian/bitbucket:latest
container_name: bitbucket-1
depends_on:
- postgres
environment:
SEARCH_ENABLED: "false"
BITBUCKET_CLUSTERED: "true"
BITBUCKET_SHARED_HOME: /var/atlassian/application-data/bitbucket/shared
JDBC_DRIVER: org.postgresql.Driver
JDBC_URL: jdbc:postgresql://bitbucket-db:5432/bitbucket-db?targetServerType=master
JDBC_USER: bitbucket
JDBC_PASSWORD: bitbucket
BITBUCKET_NODE_ID: "node1"
# Configurare Hazelcast (clustering)
HAZELCAST_MANAGEMENTSERVER_ENABLED: "true"
HAZELCAST_PORT: "5701"
HAZELCAST_GROUP_NAME: "bitbucket-cluster"
HAZELCAST_GROUP_PASSWORD: "secret123"
HAZELCAST_NETWORK_INTERFACES: "172.28.0.*"
HAZELCAST_NETWORK_JOIN_MULTICAST_ENABLED: "false"
HAZELCAST_NETWORK_JOIN_TCPIP_ENABLED: "true"
HAZELCAST_NETWORK_TCPIP_MEMBERS: "172.28.0.11:5701,172.28.0.12:5701"
ports:
- "7990:7990"
- "7999:7999"
volumes:
- ./bitbucket-home/node1:/var/atlassian/application-data/bitbucket
- shared-home:/var/atlassian/application-data/bitbucket/shared
networks:
bitbucket-net:
ipv4_address: 172.28.0.11
bitbucket-2:
image: atlassian/bitbucket:latest
container_name: bitbucket-2
depends_on:
- postgres
environment:
SEARCH_ENABLED: "false"
BITBUCKET_CLUSTERED: "true"
BITBUCKET_SHARED_HOME: /var/atlassian/shared-home
JDBC_DRIVER: org.postgresql.Driver
JDBC_URL: jdbc:postgresql://bitbucket-db:5432/bitbucket-db?targetServerType=master
JDBC_USER: bitbucket
JDBC_PASSWORD: bitbucket
BITBUCKET_NODE_ID: "node2"
# Configurare Hazelcast (clustering)
HAZELCAST_MANAGEMENTSERVER_ENABLED: "true"
HAZELCAST_PORT: "5701"
HAZELCAST_GROUP_NAME: "bitbucket-cluster"
HAZELCAST_GROUP_PASSWORD: "secret123"
HAZELCAST_NETWORK_INTERFACES: "172.28.0.*"
HAZELCAST_NETWORK_JOIN_MULTICAST_ENABLED: "false"
HAZELCAST_NETWORK_JOIN_TCPIP_ENABLED: "true"
HAZELCAST_NETWORK_TCPIP_MEMBERS: "172.28.0.11:5701,172.28.0.12:5701"
ports:
- "7991:7990"
- "8000:7999"
volumes:
- ./bitbucket-home/node2:/var/atlassian/application-data/bitbucket
- shared-home:/var/atlassian/application-data/bitbucket/shared
networks:
bitbucket-net:
ipv4_address: 172.28.0.12
volumes:
shared-home:
driver_opts:
type: "nfs"
o: "addr=192.168.20.193,nolock,soft,rw"
device: ":/srv/bitbucket/shared-home"
Community moderators have prevented the ability to post new answers.
Solved this. Worked if switched from hazelcast tcp ip to multicast. This answer was helpful if anyone else runs into this issue: https://stackoverflow.com/questions/55863657/how-to-start-bitbucket-server-as-a-container-in-detached-mode
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.