I would like to run two instances of Cassandra on one machine, with ReplicationFactor 2, to verify that data is still written/read properly even with failure of one instance. This is a matter of validating the client configuration to be sure that data is still read/written without incident when one instance goes down. So far I have been able to successfully run many tests with just a single instance and a ReplicationFactor of 1.
How might I run two instances on the same machine? I am running Cassandra 0.4.2 on a desktop machine running Linux with a single gigabit ethernet adapter, if it makes any difference. I tried to set up one instance with a ListenerAddress of 127.0.0.1 and set up a second with a ListenerAddress of 127.0.0.2. I also configured separate on-disk directories for the second instance. I set up both instances as mutual seeds in the configuration files and set ReplicationFactor to 2. When I try to start the second instance I get these errors: ERROR: transport error 202: bind failed: Address already in use ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) Aborted It would be great if someone could point me to an existing document about running 2 instances on one machine, if one exists, or failing that give some hints about where I need to look to find how to fix my configuration. I have a suspicion that I have done something dumb by just choosing 127.0.0.2 in the Cassandra config and not changing my hosts or network interfaces or something along those lines. I am unfortunately ignorant enough of networking that I don't know what the right approach is to get Cassandra running on two different IP addresses which belong to the same physical machine. Any hints are much appreciated! Matt Ernst