Cassandra docker access from host

this is my compose file, I bind the Cassandra / container ports, but I cannot access the Cassandra container with cqlsh from my host.

version: '2'

services:
  cassandra:
    image: cassandra:3.0.12
    ports:
        - 9042:9042
        - 9160:9160
other-services....

      


Docker output says:

cassandra_1     | INFO  21:00:42 Starting listening for CQL clients on /0.0.0.0:9042 (unencrypted)...

      

Ports:

$ docker port 00269f36bc54
9042/tcp -> 0.0.0.0:9042
9160/tcp -> 0.0.0.0:9160

      

  • If I do cqlsh

    on my host machine it doesn't connect to the cassandra container.
  • If I execute the command netstat

    , I don't see an entry listening on port 9042 ...
+3


source to share





All Articles