IP Address changed, couchbase won't start

CLOSED – I resolved the issue by using cbbackup to store my bucket data, then I uninstalled and re-installed couchbase on a new server with a unique DNS name and re-loaded the data.

Hi, I recently created a couchbase cluster out of two nodes. Before this I was able to start and stop my original node server without any issues even though it was a VM and the IP address would change everytime it was restarted. I recently had to restart both nodes and now couchbase won’t start on either of them. Is there anyway I can fix this without losing all my data? It’s a dev server so technically I don’t lose anything important, but a lot of people in my company use it and if I can save the data it would be nice. E.g. if I can remove the new node from the cluster without couchbase server being started so that my original node can start up normally like it did before.

I saw the documentation for couchbase in the cloud (after having this problem and searching it up, it would be really great for future users if you mentioned this issue in the install instructions so that people would know about it when configuring their servers) that mentions using DNS names instead of IP addresses. I’m using Azure and a load balancer, so both my nodes are behind the same DNS name. I can specify a port number per node, but that’s it. Is there any other way to solve this issue without having to have individual DNS names per node?

I already tried using cbbackup but it has a python error:
Traceback (most recent call last):
File “/opt/couchbase/lib/python/cbbackup”, line 12, in
pump_transfer.exit_handler(pump_transfer.Backup().main(sys.argv))
File “/opt/couchbase/lib/python/pump_transfer.py”, line 94, in main
rv = pumpStation.run()
File “/opt/couchbase/lib/python/pump.py”, line 131, in run
rv = self.transfer_bucket_msgs(source_bucket, source_map, sink_map)
File “/opt/couchbase/lib/python/pump.py”, line 212, in transfer_bucket_msgs
key=lambda n: n.get(‘hostname’, NA)):
File “/opt/couchbase/lib/python/pump.py”, line 212, in
key=lambda n: n.get(‘hostname’, NA)):
AttributeError: ‘str’ object has no attribute ‘get’

I can use direct file backup, just thought you should know about this bug. I tried running the same cbbackup command on my 3.0.2 node and my 2.5.1 node and they both showed this same error.

Found the issue. I was specifying the -u and -p arguments but they aren’t required when doing a backup on the same node. Once I ran it without those specified it worked. For future reference, the command was:
sudo /opt/couchbase/bin/cbbackup couchstore-files:///opt/couchbase/var/lib/couchbase/data [dest dir]

Thanks for the feedback @alexegli, I’ll update the instructions with using a cloud service soon. in that case the only option will be to use private IPs. Azure also recently started allowing static IPs and I’ll add that in as well.
thanks
-cihan

Thanks. I’ve looked a lot into the possibilities in Azure and the only solution seems to be creating the VMs in a Virtual Network to begin with (since you can’t move them into one later on) and keeping them in separate cloud services. I looked into the static IP address and it seems like your VM has to be in a virtual network anyway to use that, and it’s more of a suggestion, there’s a chance your VM won’t get the assigned static IP address when it boots up. Seems like for now AWS is probably a better solution overall when using couchbase, but unfortunately we already have everything setup with Azure and moving over to AWS now wouldn’t be worth it for us.