Connecting a node to a cluster

Hi. I have created a bucket in my local system and I am trying to connect another node which is located in a remote server. I am able to work with the nodes separately. But I need to join these two nodes to form a cluster. Is there a way to add the remote server node into my local server by using the web UI?

When I tried to add the remote server’s IP address by clicking “Add Server”, I am getting the following error.
“Attention - Prepare join failed. Authentication failed. Verify username and password. Got HTTP status 401 from REST call post to http://XXX.XXX.XXX.XXX:8091/engageCluster2. Body was: []”

I used my local server’s username and password. If I give that server’s username and password, I get this error.

Attention - This node cannot add another node (‘ns_1@XXX.XXX.XXX.XXX’) because of cluster version compatibility mismatch. Cluster works in [4, 1] mode and node only supports [2, 0].

Is there a way to link them using Java API? Can someone please help me with this?

Hey @nagaraj.irock,

Are both nodes already configured as independent nodes? To add a node to a cluster you would need to do this during the configuration phase. It will ask you if you want to create the node as a new cluster node or if you want to add it to an existing cluster.

However, it may not work trying to cluster your local machine with a remote machine due to firewall rules on your network. If you’re trying to familiarize yourself with clustering, you might check out Docker as it makes it very easy to do this locally.

Best,

Firewall was the issue I guess. I got this solved two weeks back. Thanks a lot for the reply!