I’m trying to get started with Cassandra by following the directions on https://cassandra.apache.org/_/quickstart.html, but step two doesn’t make sense. This command: docker run --name cassandra cassandra
starts a container. Then the second command (docker run --rm -d --name cassandra --hostname cassandra --network cassandra cassandra
) attempts to start another container with the same name which fails because the container already exists. But if it didn’t it refers to a network that doesn’t exist.
If instead of the first command I run docker network cassandra
and then run the second command as given the command in step four (docker run --rm --network cassandra -v "$(pwd)/data.cql:/scripts/data.cql" -e CQLSH_HOST=cassandra -e CQLSH_PORT=9042 nuvo/docker-cqlsh
) fails to connect to cassandra.
2
Answers
[EDITED] I’ve removed my answer since we have now corrected the steps on the Quickstart page on the Cassandra website (CASSANDRA-17485). Cheers!
Yes, the instructions on the Cassandra Quickstart page look to be out of date. The following steps worked for me just now: