Reputation: 53
I am doing a very simple example of creating a cassandra cluster using docker compose. After running docker-compose up, I can see the 2 cassandra containers getting created. But these are not created as part of cluster. Since when I get into one container and run 'nodetool describecluster' , it shows me only one ip. Here is the docker-compose.yml I am using. Please help me to find out what am I doing wrong. I have already spent lot of time in checking logs and figuring out.
cass0: image: cassandra:3.9 ports: - "9042:9042" - "9160:9160" cass1: image: cassandra:3.9 links: - cass0:seed environment: SEEDS: seed
Here is the nodetool cluster output:
Cluster Information: Name: Test Cluster Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch Partitioner: org.apache.cassandra.dht.Murmur3Partitioner Schema versions: 86afa796-d883-3932-aa73-6b017cef0d19: [172.17.0.3]
Thanks in advance.
Upvotes: 3
Views: 587
Reputation: 1047
Seems, you are using a wrong keyword. Please replace it in your file.
environment: CASSANDRA_SEEDS: seed
Hope it helps.
Upvotes: 4