Hey guys, we are doing some local testing with scala-stream-collector-kinesis:1.0.1 docker image. I configured sink to stdout for local testing, then I changed to /snowplow/config directory and ran this command:
sudo docker run -v $PWD/scala-stream-collector-config:/snowplow/config -p 8080:8080 snowplow/scala-stream-collector-kinesis:1.0.1 --config ./localconfig.conf
It’s giving me this error:
Error: Configuration file ./localconfig.conf does not exist
Try --help for more information.
configuration has no “collector” path
Looking at this docker command, it looks like you’re mounting your local $PWD/scala-stream-collector-config to /snowplow/config inside the container. So, assuming localconfig.conf is inside $PWD/scala-stream-collector-config on your machine, then you probably need --config /snowplow/config/localconfig.conf in that command
Which does work as expected and the process can find the config as expected. A few things to check would be:
Does your local config directory definitely exist at the path you are sharing with the Docker container?
Have you locked the permissions on the config file down in such a way that makes it unreadable to any other use on the system?
The other thing to try would be too exec into the container to check within the container that the config is shared as expected. You can do that by running the following command:
docker run -it -v ${config_dir}:/snowplow/config --entrypoint /bin/bash snowplow/scala-stream-collector-kinesis:${app_version}
# You can then inspect the config directory here and check your config file to debug the issue
I have no name!@f65a44073a6c:/opt/docker$ cd /snowplow/config/
I have no name!@f65a44073a6c:/snowplow/config$ ls
@josh, thanks for the help. The issue turned out to be much simpler. This part: $PWD/scala-stream-collector-config:/snowplow/config expects the config file to be in the scala-stream-collector-config directory. This is the only way it will run unless the volume is mapped to another directory. Once I realized it things started working. Thanks again!!