1

I am new to docker-compose.

I try to run: https://github.com/wurstmeister/kafka-docker with an adapted docker-compose.yml file: https://github.com/geoHeil/sparkplay This is the output of docker-compose ps.

       Name                     Command               State                          Ports
-----------------------------------------------------------------------------------------------------------------
docker_kafka_1       /bin/sh -c start-kafka.sh        Up      0.0.0.0:32780->9092/tcp
docker_kafka_2       /bin/sh -c start-kafka.sh        Up      0.0.0.0:32782->9092/tcp
docker_kafka_3       /bin/sh -c start-kafka.sh        Up      0.0.0.0:32781->9092/tcp
docker_zookeeper_1   /bin/sh -c /usr/sbin/sshd  ...   Up      0.0.0.0:32779->2181/tcp, 22/tcp, 2888/tcp, 3888/tcp
docker_zookeeper_2   /bin/sh -c /usr/sbin/sshd  ...   Up      0.0.0.0:32783->2181/tcp, 22/tcp, 2888/tcp, 3888/tcp
docker_zookeeper_3   /bin/sh -c /usr/sbin/sshd  ...   Up      0.0.0.0:32784->2181/tcp, 22/tcp, 2888/tcp, 3888/tcp

So apparently some ports should be available. I am using osx with kitematic / the docker-toolkit. However if I hit any of these IP-addresses with my browser no connection can be established.

edit:

This is the docker-compose.yml file: https://github.com/geoHeil/sparkplay/blob/master/docker-compose.yml

The logs of the docker containers after connecting with the browser:

kafka_1     | [2015-11-14 16:15:34,000] INFO Closing socket connection to /192.168.99.1 due to invalid request: Request of length 1195725856 is not valid, it is larger than the maximum size of 104857600 bytes. (kafka.network.Processor)
kafka_1     | [2015-11-14 16:15:34,002] INFO Closing socket connection to /192.168.99.1 due to invalid request: Request of length 1195725856 is not valid, it is larger than the maximum size of 104857600 bytes. (kafka.network.Processor)
kafka_1     | [2015-11-14 16:15:34,004] INFO Closing socket connection to /192.168.99.1 due to invalid request: Request of length 1195725856 is not valid, it is larger than the maximum size of 104857600 bytes. (kafka.network.Processor)
kafka_1     | [2015-11-14 16:15:34,092] INFO Closing socket connection to /192.168.99.1 due to invalid request: Request of length 1195725856 is not valid, it is larger than the maximum size of 104857600 bytes. (kafka.network.Processor)
zookeeper_1 | 2015-11-14 16:15:51,375 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /192.168.99.1:52315
zookeeper_1 | 2015-11-14 16:15:51,375 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /192.168.99.1:52316
zookeeper_1 | 2015-11-14 16:15:51,549 [myid:] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close of session 0x0 due to java.io.IOException: Len error 1195725856
zookeeper_1 | 2015-11-14 16:15:51,549 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /192.168.99.1:52315 (no session established for client)
zookeeper_1 | 2015-11-14 16:15:51,550 [myid:] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close of session 0x0 due to java.io.IOException: Len error 1195725856
zookeeper_1 | 2015-11-14 16:15:51,550 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /192.168.99.1:52316 (no session established for client)
zookeeper_1 | 2015-11-14 16:15:51,552 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /192.168.99.1:52317
zookeeper_1 | 2015-11-14 16:15:51,552 [myid:] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close of session 0x0 due to java.io.IOException: Len error 1195725856
zookeeper_1 | 2015-11-14 16:15:51,553 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /192.168.99.1:52317 (no session established for client)
zookeeper_1 | 2015-11-14 16:15:51,651 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /192.168.99.1:52318
zookeeper_1 | 2015-11-14 16:15:51,651 [myid:] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close of session 0x0 due to java.io.IOException: Len error 1195725856
zookeeper_1 | 2015-11-14 16:15:51,652 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /192.168.99.1:52318 (no session established for client)

And:

zookeeper_1 | 2015-11-14 16:25:09,810 [myid:] - INFO  [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x15106d08b9c0000 type:create cxid:0x4 zxid:0x3 txntype:-1 reqpath:n/a Error Path:/brokers Error:KeeperErrorCode = NoNode for /brokers
zookeeper_1 | 2015-11-14 16:25:09,820 [myid:] - INFO  [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x15106d08b9c0000 type:create cxid:0xa zxid:0x7 txntype:-1 reqpath:n/a Error Path:/config Error:KeeperErrorCode = NoNode for /config
zookeeper_1 | 2015-11-14 16:25:09,825 [myid:] - INFO  [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x15106d08b9c0000 type:create cxid:0x10 zxid:0xb txntype:-1 reqpath:n/a Error Path:/admin Error:KeeperErrorCode = NoNode for /admin
zookeeper_1 | 2015-11-14 16:25:09,991 [myid:] - INFO  [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x15106d08b9c0000 type:setData cxid:0x1a zxid:0xf txntype:-1 reqpath:n/a Error Path:/controller_epoch Error:KeeperErrorCode = NoNode for /controller_epoch
zookeeper_1 | 2015-11-14 16:25:10,030 [myid:] - INFO  [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x15106d08b9c0000 type:delete cxid:0x27 zxid:0x11 txntype:-1 reqpath:n/a Error Path:/admin/preferred_replica_election Error:KeeperErrorCode = NoNode for /admin/preferred_replica_election
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
  • How are you trying to reach the application? localhost? – Alex da Silva Nov 12 '15 at 20:35
  • Setup is as follows: Macbook + Docker-Toolbox / Kitematic. A `docker-compose ps` in osx results in the table above. I try to hit `192.168.99.100:somePort` using my browser in osx. somePort is one of the ports from the list, the IP is the address of the boot2docker vm created by kitematic. I expected to find the default http-ui for zookeeper. But there seems to be no http connection on any of the ports. – Georg Heiler Nov 12 '15 at 20:47
  • Is that the same IP that is returned by `docker-machine ip default` ? The ip may change each restart I think. – dnephin Nov 13 '15 at 21:53
  • You may have a point there. However `docker-machine env default`returns `export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="/Users/geoHeil/.docker/machine/machines/default" export DOCKER_MACHINE_NAME="default"` and `docker-machine ip default`returns `192.168.99.100` So it is the same IP – Georg Heiler Nov 14 '15 at 08:17

1 Answers1

0

Following the instructions there: http://sookocheff.com/post/kafka/kafka-quick-start/ helped me a lot to get kafka up and running in docker.

edit:

I re-cloned the wurstmeister/kafka repo and started from scratch. This seemed to work.

Georg Heiler
  • 16,916
  • 36
  • 162
  • 292