Intialize and add node

my couchbase server named ( first) it has only one node called 127.0.0.1 i had some issues when i try to add another nodes as i need to perform clustering and replication for my data

first i cant reach the Couchbase Web Console interface which include both add cluster or join existing cluster to add another cluster

second problem i try to add node using cli

couchbase-cli node-init --cluster 127.0.0.2 --username aya --password 123 --node-init-data-path c:/Program Files/Couchbase/Server/var/lib/couchbase/data --node-init-hostname couchbase://127.0.0.1.com–ipv4

it give me error ERROR: Unable to resolve IPv4 address for “couchbase://first.com–ipv4”: nxdomain

and another error for unrecognized argument for Files/Couchbase/Server/var/lib/couchbase/data

i had tried many time to solve these problems can any one help me

I would think that your host name would be “127.0.0.1” or “first.com” but never “127.0.0.1.com”. The second example here shows an undecorated host name, despite the “host names” section, so I think the protocol portion can be dispensed with.

Further, it looks like a missing space before the --ipv4 argument and you have to quote arguments that contain spaces (in common with general multi-argument command line invocations) - i.e. whenever an argument includes “Program Files” it is best to quote it.

I would imagine, something like:

couchbase-cli node-init --cluster 127.0.0.2 --username aya --password 123 --node-init-data-path "c:/Program Files/Couchbase/Server/var/lib/couchbase/data" --node-init-hostname 127.0.0.1 --ipv4

might suffice. (This is untested though!)
(You my also try omitting the node-init-hostname option & argument altogether to get started.)

HTH.

1 Like