To get things working locally with docker compose I used the below process:
The reason we need this is because we need kafka to advertise an address that can be reached by both our local machine (mac) and from within the collector docker container. There may be a more elegant way to do this but this is what I have so far.
export ADVERTISED_HOST="$(docker-machine ip `docker-machine active`)"
export KAFKA_ZOOKEEPER=$ADVERTISED_HOST
Make sure to use the compose file in this gist because it sets up kafka differently.
docker-compose up
Because we only have one node we need to make sure we setup the topic so that it doesn't try to replicate. Or at least I think that is why it fails when you don't do this. I run this right after the kafka container is working and before any requests are sent to kafka. Once a request is sent to kafka this will no longer work since the topic will be created with default settings that will not work properly.
This is using a shell script that comes with a kafka download tested with 0.8.x but may work for 0.9.x http://kafka.apache.org/downloads.html
kafka-topics.sh --create --zookeeper ${ADVERTISED_HOST}:2181 --replication-factor 1 --partitions 1 --topic zipkin
At this point the test you posted in the ticket should work as expected.
Also you can use the following scripts to test the ability to send and recieve traffic locally if you need to debug the kafka setup:
kafka-topics.sh --list --zookeeper ${ADVERTISED_HOST}:2181
kafka-console-producer.sh --broker-list ${ADVERTISED_HOST}:9092 --topic zipkin
kafka-console-consumer.sh --zookeeper ${ADVERTISED_HOST}:2181 --topic zipkin