Reputation: 1278
I'm able to use the standard auto-config version just fine with the loopbacks
ccm create local-cluster -v 1.2.10 -n 3
When I tried to use real IP addresses so I can connect to my cluster outside of the VM things got wonky. Here's what I ran:
ccm create local-cluster -v 1.2.10
ccm add --itf 192.168.1.20 --jmx-port 7100 -b -s -r 2000 node1
ccm add --itf 192.168.1.21 --jmx-port 7200 -b -r 2001 node2
ccm add --itf 192.168.1.22 --jmx-port 7300 -b -r 2002 node3
ccm node1 start
ccm node2 start
ccm node3 start
ccm node1 status
Issue 1) I cannot use "ccm start". It times out. If I start each node independently it works Issue 2) The nodes aren't balanced .21 owns 87.6% while the other two own 6.2% each. Also I think the seeds aren't right but if I try to see each node as I add it then I cannot start the cluster as it complains it can't find seed nodes so I could only use -s on the first Issue 3) OpsCenter after a while shows first one then two of three nodes unavailable despite "ccm node1 status" node2, node3 all showing them fine and up Issue 4) I was able to manually configure the OpsCenter agents with some fiddling, but they didn't work until I put in "local_interface" so something is wrong with the broadcast address. Even after seeing all the agents OpsCenter still behaves oddly complaining of nodes down and not showing data in all of the graphs. Using ccm stress I was able to see i/o and cpu load but not cluster reads and writes and not latency. Here's how I configured the agents:
cd /usr/share/opscenter
mkdir ~/opsagent1
tar -C ~/opsagent1 -xzf agent.tar.gz
mkdir ~/opsagent2
tar -C ~/opsagent2 -xzf agent.tar.gz
mkdir ~/opsagent3
tar -C ~/opsagent3 -xzf agent.tar.gz
cd ~/opsagent1/agent
bin/setup 192.168.1.22
echo '
agent_rpc_interface: 192.168.1.20
jmx_host: 192.168.1.20
jmx_port: 7100
local_interface: 192.168.1.20
' >> conf/address.yaml
bin/opscenter-agent
cd ~/opsagent2/agent
bin/setup 192.168.1.22
echo '
agent_rpc_interface: 192.168.1.21
jmx_host: 192.168.1.21
jmx_port: 7200
local_interface: 192.168.1.21
' >> conf/address.yaml
bin/opscenter-agent
cd ~/opsagent3/agent
bin/setup 192.168.1.22
echo '
agent_rpc_interface: 192.168.1.22
jmx_host: 192.168.1.22
jmx_port: 7300
local_interface: 192.168.1.22
' >> conf/address.yaml
bin/opscenter-agent
Upvotes: 0
Views: 1056
Reputation: 301
You should also add the following to each agent configuration file:
stomp_interface: IP that OpsCenter uses for stomp
This default to 127.0.0.1 unless you set it, or unless it can figure out the correct IP. If you have multiple IPs it may not use the one you indicated. So I'd manually set it in opscenterd.conf by adding this section:
[stomp]
port = 61619
interface = 192.168.1.22
Also, if you are going to add them all manually, you want them all to be seeds. When you use populate, it sets them all as seeds: https://github.com/pcmanus/ccm/blob/master/ccmlib/cluster.py#L156.
Upvotes: 2