0

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
Peter Halliday
  • 301
  • 1
  • 6
ss2k
  • 1,258
  • 1
  • 13
  • 20

1 Answers1

2

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.

Peter Halliday
  • 301
  • 1
  • 6
  • 1
    I already got all this working easily on the 127.0.0.x default ip's CCM uses, but the specific question is how to get it going with other IP addresses. I can't connect to the loopback IP's from outside of the VM so that's why I need to assign real IP's. The bin/setup call sets the stomp_interface IP so that part is ok. – ss2k Oct 25 '13 at 04:11
  • Update the above answer given your response and your newest edits. Basically what you pass to setup script needs to match what OpsCenter believes it's IP is. If you are on a multiple IP machine you can help it pick the IP it should have. – Peter Halliday Oct 25 '13 at 22:50
  • @Peter Halliday try to make your edits on 3rd party posts more substancial. Until you have the edit privilage all your edits go through the review system which means several have to spend time checking the edits, so it is not good to do such minor changes. – 0x6C38 Oct 26 '13 at 21:25