Listing server addresses for MemcachedClient
I have a cluster at the moment consisting of only two computers. The first computer was setup as "Start a new cluster", and the second was setup as "Join a cluster".
I've been playing with the test code with the key-value "spoon". In the code it says you can list all the servers as a string comma or space separated and then use AddrUtil to connect, but I'm having problems connecting to the computer I setup second when I try to connect from the global IP, but it's fine with I connect to localhost.
I noticed the one setup as an addition to the cluster doesn't show port 11211 open (but does 11210) when I scan its global IP address. When I scan localhost on this machine 11211 shows as open. However, on the first machine 11211 is shown as being open on both global and local.
If I run the test code and use the IP of the first machine setup, the machines appear to interact properly so I am confused as the why in the sample code there are multiple server IPs being listed.
Thanks in advance
Just in case: by global IP I do mean they have their own IP given to them by the ISP
Edit: by interacting properly I'm saying that when I run the sample code on one machine, the other machine recognizes the key-value being added and responds with "Hello World" as expected
I see. Thanks for the help.
With respect to listening on port 11211, I'm still having issues. I uninstalled membase and removed it from the cluster. When I did that, the machine stopped showing 11210 and 21100 as open. I reinstalled and readded to the cluster and these two ports showed up again, still no 11211. I then created a new bucket and made it run on 11212 and it immediately showed up as an open port. Now I'm really confused. The default port isn't showing up but ports new buckets are.
We had a couple of older documents which had earlier information on how to configure the client.
Rather than use InetSocketAddress, you should use URI based constructor as demonstrated at http://www.couchbase.org/code/couchbase/java
Apologies for the old documentation. We'll try to track ti down and update it.
On the services being available at multiple IP addresses, by default all cluster services will listen on all IP addresses on a system so you should see the operating system showing a process listening on 11211 and 11210.