1

I'm wondering if I could have two instances of datastax agents on the same cassandra node?

Seems a show stopper is the agent' listening stomp port which is made automatic = + 1.

All cassandra listening ports can be separated thus they can share the same IP stack/address. But datastax agent seems to want to listen on server-stomp-port + 1, making it hard to have two agent instances on the same IP address.

Any hints or would I need to add another separate IP stack for second instance?

  • Why do you want two agents on the same node? – phact Oct 29 '15 at 02:24
  • aka change the Jetty listen port on the agent – Steffen Winther Sørensen Oct 29 '15 at 02:37
  • I want to do this because I run two cassandra instance per server, each with different schemas and different storage. One for application metadata on SSD only, and one for application blob data on HDDs per ISV recommendations, only they don't normally use Opscenter for monitoring. – Steffen Winther Sørensen Oct 29 '15 at 02:41
  • Maybe by setting/parsing in the right class var value in JVM_OPTS in /usr/share/datastax-agent/bin/datastax-agent and thus be able to parse in a new port value for an embedded Jetty class instance... – Steffen Winther Sørensen Oct 29 '15 at 02:51
  • CCM does this. Maybe do some googling around that. – phact Oct 29 '15 at 03:08
  • Thanks will lok into CCM, already found this search on CCM: ###Port for the agent's HTTP service (default: 61621). #api_port: 61621 – Steffen Winther Sørensen Oct 29 '15 at 09:39
  • Any go URL/hints for reading up on using /usr/share/opscenter/agent to hold central various agent's different configs? – Steffen Winther Sørensen Oct 29 '15 at 09:41
  • 1
    After finally having succeeded in [running two agents](http://stackoverflow.com/questions/33441977/datastax-agents-unable-to-find-a-matching-cluster-for-node-with-ip) per physical node. I think I'll desist from auto agent configuration from OpsCenter and stick to the manual configuration/maintaince of SW per node. – Steffen Winther Sørensen Oct 31 '15 at 13:24

1 Answers1

0

I can see you already discovered this in your linked post above but thought it worth clarifying here for other readers. Its an interesting point raised here.

This isn't possible just using ports. As with most applications the agent will listen on an IP:port the combination of which gives the uniqueness to the connection.

You can set the api_port setting in the address.yaml file for the agent. The default port the agent listens on is 61621. See this doc link for more info (OpsCenter 5.2.2)

http://docs.datastax.com/en/opscenter/5.2/opsc/configure/agentAddressConfiguration.html?scroll=agentAddressConfiguration__api_port

However you also have to set the same setting in the opscenterd.conf file, which does of course make sense otherwise OpsCenter would not know what port to contact the agents on. However there is only one setting thus one agent per node as far as OpsCenter is concerned

http://docs.datastax.com/en/opscenter/5.2/opsc/configure/agentAddressConfiguration.html?scroll=agentAddressConfiguration__api_port

The only way to make the agent unique is by binding it to a different IP. Using virtual interfaces is one way.

Community
  • 1
  • 1
markc
  • 2,129
  • 16
  • 27