docker-library / cassandra

Docker Official Image packaging for Cassandra
Apache License 2.0
262 stars 281 forks source link

Cassandra (MemtableFlushWriter) throws exceptions if run with mounted volume #162

Closed Bazaleev closed 5 years ago

Bazaleev commented 5 years ago

When I start Cassandra container with mounted volume it throws exceptions. Even if Cassandra has access to the directory and some files are created. Command to run container: docker run -p 9042:9042 --name cassandra-local -v C:/volumes/cassandra:/var/lib/cassandra -d cassandra:latest

It works fine if I launch container with next command: docker run -p 9042:9042 --name cassandra-local -v /volumes/cassandra:/var/lib/cassandra -d cassandra:latest

It wouldn't be a problem but I experience the same errors when starting Cassandra container in Azure with mounted file share and this is unfortunate.

I attached all evidence that I've managed to gather.

Results of docker inspect command for local container: cassandra.local.inspect.json.txt

Results of docker inspect command for local container: cassandra.local.log

The content of mounted directory: cassandra.zip

Ps script for creating a container with mounted file share create_storage_account_and_container.azcli.ps1.txt

Results of az container show command container.azure.show.json.txt

Results of az container logs command container.azure.log

Docker version: docker.version.txt

Thanks!

wglambert commented 5 years ago

You could try enabling shared drives https://docs.docker.com/docker-for-windows/#shared-drives which might work, otherwise using a Docker named volume will be fine. https://github.com/docker-library/mariadb/issues/152#issuecomment-363961526

You could also try asking the Docker Community Forums, the Docker Community Slack, or Stack Overflow since there isn't any error with the image that could be fixed for this issue

tianon commented 5 years ago

It wouldn't be a problem but I experience the same errors when starting Cassandra container in Azure with mounted file share and this is unfortunate.

I'm guessing an Azure file share is still SMB-based, and thus will have very similar limitations to Docker for Windows's file sharing driver -- if Cassandra expects to use the filesystem in a way the filesystem doesn't support, there's really not much we can do about it. The only other suggestion I can provide beyond the places noted above would be Cassandra's issue tracker to see if anyone has run into anything similar (or managed to run Cassandra outside Docker on an SMB share).