Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,558
Community Members
 
Community Events
165
Community Groups

Bitbucket cluster authentication failed due to hazelcast.group.name and hazelcast.group.password

Setup two nodes in AWS EC2 to form clustering. An error is appeared:

com.atlassian.stash.internal.cluster.NodeConnectionException: Cluster authentication failed. Please make sure all members share the same value for 'hazelcast.group.name' and 'hazelcast.group.password' in bitbucket.properties.
at com.atlassian.stash.internal.cluster.DefaultClusterJoinManager.accept(DefaultClusterJoinManager.java:102)

at com.atlassian.stash.internal.hazelcast.ClusterJoinSocketInterceptor.onAccept(ClusterJoinSocketInterceptor.java:49)
at com.hazelcast.nio.NodeIOService.interceptSocket(NodeIOService.java:300)
at com.hazelcast.nio.tcp.TcpIpAcceptor$AcceptorIOThread.configureAndAssignSocket(TcpIpAcceptor.java:316)
at com.hazelcast.nio.tcp.TcpIpAcceptor$AcceptorIOThread.access$1400(TcpIpAcceptor.java:138)
at com.hazelcast.nio.tcp.TcpIpAcceptor$AcceptorIOThread$1.run(TcpIpAcceptor.java:305)
at com.hazelcast.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:227)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.lang.Thread.run(Thread.java:829)
at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64)
at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80)

... 1 frame trimmed

 

My bitbucket.properties in the bitbucket shared folder is

server.port=8444
server.ssl.enabled=true
server.ssl.key-store-type=pkcs12
server.ssl.key-store=/etc/atlassian/bitbucket/tls.p12
server.ssl.key-store-password=password
server.ssl.key-password=password
server.ssl.protocols=TLSv1.3
server.ssl.key-alias=bitbucket
hazelcast.network.multicast=false
hazelcast.network.tcpip=true
hazelcast.port=5701
hazelcast.group.name=bitbucket-cluster
hazelcast.group.password=password
hazelcast.network.tcpip.members=<node1_ip_address>:5701,<node2_ip_address>:5701

 

The bitbucket is setup by docker in ansible:

- name: Start bitbucket container
   docker_container:
     name: "{{ bitbucket_container_name }}"
     image: "{{ bitbucket_docker_image }}:{{ docker_images.bitbucket.tag }}"
     state: started
     restart_policy: unless-stopped
     container_default_behavior: compatibility
     volumes:
       - "{{ bitbucket_shared_host_location }}:{{ bitbucket_shared_home }}/"
       - "{{ bitbucket_private_host_location }}:{{ bitbucket_home }}/"
       - "/etc/atlassian/bitbucket/tls.p12:/etc/atlassian/bitbucket/tls.p12"
     detach: true
     network_mode: default
     published_ports:
       - 5701:5701
       - "{{ bitbucket_https_port }}:8444"
     env:
     {
       "JDBC_DRIVER": "org.postgresql.Driver",
       "JDBC_URL": "jdbc:postgresql://{{ bitbucket_postgresql_host }}:{{ bitbucket_postgresql_nodeport }}/{{ bitbucket_postgresql_database }}",
       "JDBC_USER": "{{ bitbucket_postgresql_user }}",
       "JDBC_PASSWORD": "{{ bitbucket_postgresql_password }}",
       "JAVA_OPTS": "-Dcluster.node.name={{ inventory_hostname }} -Duser.timezone=Etc/GMT+0 -Dhazelcast.local.publicAddress={{ ansible_default_ipv4.address }}:5701",
      }
   security_opts:
     - "label:disable"

 

Can anyone please shed some lights on? 

 

1 answer

0 votes

??

I solved the issue in the end. That is because the group name and password are verified before any other checks. By adding a line in

bitbucket.properties
```
hazelcast.node.authentication.enabled=false
```
The default value of the attribute above is true.

I don't know how/why does it work. But this line resolves the issue. I post the solution just in case someone encounter the similar issue.

Like Kevin Wang likes this

Thanks Andrew, nice notice here, I met the similar issue and resolved based on your solution! Appreciate~

Like Andrew Yu likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,231 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you