0

I am having a problem running a Scylla instance in docker-compose. I am on windows 10 and this is the errors I am getting when running $ docker logs b-scylla:

INFO  2021-03-03 20:28:33,030 [shard 0] storage_service - Stop transport: starts
INFO  2021-03-03 20:28:33,030 [shard 0] storage_service - Stop transport: shutdown rpc and cql server done
INFO  2021-03-03 20:28:33,030 [shard 0] gossip - gossip is already stopped
INFO  2021-03-03 20:28:33,030 [shard 0] storage_service - Stop transport: stop_gossiping done
ERROR 2021-03-03 20:28:33,030 [shard 0] init - Directory '"/var/lib/scylla/commitlog"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
ERROR 2021-03-03 20:28:33,030 [shard 0] init - Directory '"/var/lib/scylla/data"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
ERROR 2021-03-03 20:28:33,030 [shard 0] init - Directory '"/var/lib/scylla/hints/0"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
ERROR 2021-03-03 20:28:33,030 [shard 0] init - Directory '"/var/lib/scylla/hints/1"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
ERROR 2021-03-03 20:28:33,030 [shard 0] init - Directory '"/var/lib/scylla/hints/2"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
ERROR 2021-03-03 20:28:33,030 [shard 0] init - Directory '"/var/lib/scylla/hints/3"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
ERROR 2021-03-03 20:28:33,030 [shard 0] init - Directory '"/var/lib/scylla/view_hints/0"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
ERROR 2021-03-03 20:28:33,031 [shard 0] init - Directory '"/var/lib/scylla/view_hints/1"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
ERROR 2021-03-03 20:28:33,031 [shard 0] init - Directory '"/var/lib/scylla/view_hints/2"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
ERROR 2021-03-03 20:28:33,031 [shard 0] init - Directory '"/var/lib/scylla/view_hints/3"' cannot be initialized. Tried to do it but failed with: storage_io_error (Storage I/O error: 22: Invalid argument)
INFO  2021-03-03 20:28:33,031 [shard 0] init - Shutting down database
INFO  2021-03-03 20:28:33,031 [shard 0] storage_service - messaging_service stopped
INFO  2021-03-03 20:28:33,031 [shard 0] storage_service - Stop transport: shutdown messaging_service done
INFO  2021-03-03 20:28:33,031 [shard 0] storage_service - stream_manager stopped
INFO  2021-03-03 20:28:33,031 [shard 0] storage_service - Stop transport: shutdown stream_manager done
INFO  2021-03-03 20:28:33,031 [shard 0] storage_service - Stop transport: done
INFO  2021-03-03 20:28:33,032 [shard 0] init - Shutting down database was successful

Oddly enough, I see that the dirs are actually created on my local machine (I have a volume): enter image description here

This is my docker-compose.yml:

version: '3'

services:
  b-scylla:
    image: scylladb/scylla:4.3.1
    container_name: b-scylla
    volumes:
      - ./scylla:/var/lib/scylla
      - ./:/project
    ports:
      - 127.0.0.1:9042:9042
      - 127.0.0.1:9160:9160

I replaced './scylla/' with an absolute path, but the result didn't change. I have this in my .env file, in the same folder as docker-compose.yml:

COMPOSE_CONVERT_WINDOWS_PATHS=1
NoKey
  • 129
  • 11
  • 32

1 Answers1

3

See my solution at https://stackoverflow.com/a/66472450/6906571.

This will work for you:

version: '3'

services:
  scylla:
    image: "scylladb/scylla:4.3.1"
    container_name: scylla
    volumes:
      - type: volume
        source: target
        target: /var/lib/scylla
        volume:
          nocopy: true
          
volumes:
  target:

Access data with:

$ docker run -it --mount source=projects_target,target=/app --entrypoint bash scylladb/scylla:4.3.1

or via WSL (Locating data volumes in Docker Desktop (Windows)):

$ \\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes\projects_target\_data
  • I got it working when I change version to '3.2' (3 gives me an error). One last question, why did you used to nocopy argument? I tried it without the argument and it still worked. – NoKey Mar 04 '21 at 20:38
  • @NoKey, `nocopy` just ignores the data that exists there on the mount path in the container when the volume is created. It's not strictly required to make the spec work. – Ivan Prisyazhnyy Mar 05 '21 at 14:42