title: Apache Storm/Kafka- Storm and Kafka not communicating
body: <p>thank you for your time. I'm attempting to set up an Apache storm/Kafka integration demo. I am able to set up a Kafka cluster and Storm cluster. I am able to run a working topology in Local mode. However, the same topology does not work when I submit it to the cluster.</p>
  
  <p>The Kafka spout in the topology does not emit Tuples, though I didn't change anything major when I brought it from a local mode to the cluster.
  The most likely issue would seem to be that Storm and Kafka simply aren't speaking to each other. I've been over my configuration and can't seem to find the point of failure. Zookeeper, Kafka, Storm Nimbus, Storm supervisor, and Kafka Producer are all running on the same machine.</p>
  
  <p>One thing that seems suspicious- I am not able to view executor logs through the Storm UI. I can view Nimbus logs by clicking on the port number, but the executor logs will not do the same when I go into the topology and click on the executor port. Could it have something to do with network security and my port numbers? I've tried monkeying with the port numbers in storm.yaml to no result. In addition, I've rebuilt the entire project and environment on an entirely new machine on a different network. Something must be wrong with my configuration. </p>
  
  <p>Thank you so much! I have to hand this proof-of-concept project off to another developer, because I've been spinning my wheels on this issue all week. </p>
  
  <p>Here is my topology:</p>
  
  <pre><code>public class KafkaStormIntegrationDemo {
  
  
  public static void main(String[] args) throws InvalidTopologyException, AuthorizationException, AlreadyAliveException {
  
      // Build Spout configuration using input command line parameters
      final BrokerHosts zkrHosts = new ZkHosts("localhost:2181");
      final String kafkaTopic = "storm-kafka";
      final String zkRoot = "";
      final String clientId = "storm-consumer";
      SpoutConfig kafkaConf = new SpoutConfig(zkrHosts, kafkaTopic, zkRoot,clientId);
      kafkaConf.startOffsetTime = -2;
      kafkaConf.scheme = new SchemeAsMultiScheme(new StringScheme());
  
      // Build topology to consume message from kafka and print them on console
      final TopologyBuilder topologyBuilder = new TopologyBuilder();
      topologyBuilder.setSpout("kafka-spout", new KafkaSpout(kafkaConf), 1);
      topologyBuilder.setBolt("print-messages", new
      LoggerBolt()).globalGrouping("kafka-spout");
      Config conf = new Config();
      System.setProperty("storm.jar","C://workspace/apache-storm-1.1.1/lib/storm-core-1.1.1.jar");
      StormSubmitter.submitTopology("kafkaTopology", conf,
      topologyBuilder.createTopology());
  }
  }
  </code></pre>
  
  <p>Here is my bolt:</p>
  
  <pre><code>public class LoggerBolt extends BaseBasicBolt{
  private static final long serialVersionUID = 1L;
  private static final Logger LOG = Logger.getLogger(LoggerBolt.class);
  
  public void execute(Tuple input, BasicOutputCollector collector) {
      LOG.info(input.getString(0));
  }
  
  public void declareOutputFields(OutputFieldsDeclarer declarer) {
      declarer.declare(new Fields("message"));
  }
  }
  </code></pre>
  
  <p>here is my storm.yaml:</p>
  
  <pre><code>########### These MUST be filled in for a storm configuration
   storm.zookeeper.servers:
       - "localhost"
  #     - "server2"
  # 
   nimbus.seeds: ["localhost"]
  </code></pre>
  
  <p>Here are my Executor logs when I call storm supervisor (my PC's name has been censored):</p>
  
  <pre><code>2017-10-11 17:26:20.552 o.a.s.z.Zookeeper main [INFO] Staring ZK Curator
  2017-10-11 17:26:20.563 o.a.s.s.o.a.c.f.i.CuratorFrameworkImpl main [INFO]
  Starting
  2017-10-11 17:26:20.579 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
  2017-10-11 17:26:20.580 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:host.name=[MY PC NAME]
  2017-10-11 17:26:20.580 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:java.version=1.8.0_131
  2017-10-11 17:26:20.581 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:java.vendor=Oracle Corporation
  2017-10-11 17:26:20.582 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:java.home=C:\JAVA\jdk1.8.0_131\jre
  2017-10-11 17:26:20.582 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:java.class.path=C:\apache-storm-1.1.1\*;C:\apache-storm-1.1.1\conf;C:\JAVA\jdk1.8.0_131\lib\tools.jar;C:\apache-storm-1.1.1\lib\asm-5.0.3.jar;C:\apache-storm-1.1.1\lib\clojure-1.7.0.jar;C:\apache-storm-1.1.1\lib\disruptor-3.3.2.jar;C:\apache-storm-1.1.1\lib\kryo-3.0.3.jar;C:\apache-storm-1.1.1\lib\log4j-api-2.8.2.jar;C:\apache-storm-1.1.1\lib\log4j-core-2.8.2.jar;C:\apache-storm-1.1.1\lib\log4j-over-slf4j-1.6.6.jar;C:\apache-storm-1.1.1\lib\log4j-slf4j-impl-2.8.2.jar;C:\apache-storm-1.1.1\lib\minlog-1.3.0.jar;C:\apache-storm-1.1.1\lib\objenesis-2.1.jar;C:\apache-storm-1.1.1\lib\reflectasm-1.10.1.jar;C:\apache-storm-1.1.1\lib\ring-cors-0.1.5.jar;C:\apache-storm-1.1.1\lib\servlet-api-2.5.jar;C:\apache-storm-1.1.1\lib\slf4j-api-1.7.21.jar;C:\apache-storm-1.1.1\lib\storm-core-1.1.1.jar;C:\apache-storm-1.1.1\lib\storm-rename-hack-1.1.1.jar
  2017-10-11 17:26:20.582 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:java.library.path=/usr/local/lib:/opt/local/lib:/usr/lib;C:\JAVA\jdk1.8.0_131\bin;C:\JAVA\jdk1.8.0_131\lib;C:\JAVA\jdk1.8.0_131\jre\bin;C:\JAVA\jdk1.8.0_131\jre\lib
  2017-10-11 17:26:20.582 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:java.io.tmpdir=C:\Users\rbliton\AppData\Local\Temp\
  2017-10-11 17:26:20.582 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:java.compiler=&lt;NA&gt;
  2017-10-11 17:26:20.582 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:os.name=Windows 10
  2017-10-11 17:26:20.583 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:os.arch=amd64
  2017-10-11 17:26:20.583 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:os.version=10.0
  2017-10-11 17:26:20.583 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:user.name=rbliton
  2017-10-11 17:26:20.583 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:user.home=C:\Users\rbliton
  2017-10-11 17:26:20.583 o.a.s.s.o.a.z.ZooKeeper main [INFO] Client
  environment:user.dir=C:\apache-storm-1.1.1\bin
  2017-10-11 17:26:20.585 o.a.s.s.o.a.z.ZooKeeper main [INFO] Initiating
  client connection, connectString=localhost:2181 sessionTimeout=20000
  watcher=org.apache.storm.shade.org.apache.curator.ConnectionState@2216effc
  2017-10-11 17:26:20.801 o.a.s.s.o.a.z.ClientCnxn main-SendThread(
  127.0.0.1:2181) [INFO] Opening socket connection to server
  127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL
  (unknown error)
  2017-10-11 17:26:20.803 o.a.s.s.o.a.z.ClientCnxn main-SendThread(
  127.0.0.1:2181) [INFO] Socket connection established to
  127.0.0.1/127.0.0.1:2181, initiating session
  2017-10-11 17:26:20.826 o.a.s.s.o.a.z.ClientCnxn main-SendThread(
  127.0.0.1:2181) [INFO] Session establishment complete on server
  127.0.0.1/127.0.0.1:2181, sessionid = 0x15f0d3b46a70016, negotiated timeout
  = 20000
  2017-10-11 17:26:20.845 o.a.s.s.o.a.c.f.s.ConnectionStateManager
  main-EventThread [INFO] State change: CONNECTED
  2017-10-11 17:26:20.856 o.a.s.s.o.a.c.f.i.CuratorFrameworkImpl
  Curator-Framework-0 [INFO] backgroundOperationsLoop exiting
  2017-10-11 17:26:20.867 o.a.s.s.o.a.z.ZooKeeper main [INFO] Session:
  0x15f0d3b46a70016 closed
  2017-10-11 17:26:20.869 o.a.s.z.Zookeeper main [INFO] Staring ZK Curator
  2017-10-11 17:26:20.870 o.a.s.s.o.a.c.f.i.CuratorFrameworkImpl main [INFO]
  Starting
  2017-10-11 17:26:20.869 o.a.s.s.o.a.z.ClientCnxn main-EventThread [INFO]
  EventThread shut down
  2017-10-11 17:26:20.870 o.a.s.s.o.a.z.ZooKeeper main [INFO] Initiating
  client connection, connectString=localhost:2181/storm sessionTimeout=20000
  watcher=org.apache.storm.shade.org.apache.curator.ConnectionState@4417af13
  2017-10-11 17:26:20.880 o.a.s.s.o.a.z.ClientCnxn
  main-SendThread(0:0:0:0:0:0:0:1:2181) [INFO] Opening socket connection to
  server 0:0:0:0:0:0:0:1/0:0:0:0:0:0:0:1:2181. Will not attempt to
  authenticate using SASL (unknown error)
  2017-10-11 17:26:20.881 o.a.s.s.o.a.z.ClientCnxn
  main-SendThread(0:0:0:0:0:0:0:1:2181) [INFO] Socket connection established
  to 0:0:0:0:0:0:0:1/0:0:0:0:0:0:0:1:2181, initiating session
  2017-10-11 17:26:20.932 o.a.s.s.o.a.z.ClientCnxn
  main-SendThread(0:0:0:0:0:0:0:1:2181) [INFO] Session establishment complete
  on server 0:0:0:0:0:0:0:1/0:0:0:0:0:0:0:1:2181, sessionid =
  0x15f0d3b46a70017, negotiated timeout = 20000
  2017-10-11 17:26:20.933 o.a.s.s.o.a.c.f.s.ConnectionStateManager
  main-EventThread [INFO] State change: CONNECTED
  2017-10-11 17:26:20.952 o.a.s.l.Localizer main [INFO] Reconstruct localized
  resource: C:\apache-storm-1.1.1\storm-local\supervisor\usercache
  2017-10-11 17:26:20.954 o.a.s.l.Localizer main [WARN] No left over
  resources found for any user during reconstructing of local resources at:
  C:\apache-storm-1.1.1\storm-local\supervisor\usercache
  2017-10-11 17:26:20.962 o.a.s.d.s.Supervisor main [INFO] Starting
  supervisor for storm version '1.1.1'.
  2017-10-11 17:26:21.005 o.a.s.d.s.Slot main [WARN] SLOT [MY PC NAME]:6700
  Starting in state EMPTY - assignment null
  2017-10-11 17:26:21.006 o.a.s.d.s.Slot main [WARN] SLOT [MY PC NAME]:6701
  Starting in state EMPTY - assignment null
  2017-10-11 17:26:21.006 o.a.s.d.s.Slot main [WARN] SLOT [MY PC NAME]:6701
  Starting in state EMPTY - assignment null
  2017-10-11 17:26:21.009 o.a.s.d.s.Slot main [WARN] SLOT [MY PC NAME]:6703
  Starting in state EMPTY - assignment null
  2017-10-11 17:26:21.020 o.a.s.d.s.Container main [INFO] GET worker-user for
  964b34c1-d7e3-4f22-9ee2-a0664c10294e
  2017-10-11 17:26:21.022 o.a.s.d.s.Container main [INFO] Cleaning up
  5ef774ff-f24c-4810-9330-5e1291bd7539:964b34c1-d7e3-4f22-9ee2-a0664c10294e
  2017-10-11 17:26:21.023 o.a.s.d.s.Container main [INFO] GET worker-user for
  964b34c1-d7e3-4f22-9ee2-a0664c10294e
  2017-10-11 17:26:21.024 o.a.s.d.s.AdvancedFSOps main [INFO] Deleting path
  C:\apache-storm-1.1.1\storm-local\workers\964b34c1-d7e3-4f22-9ee2-a0664c10294e\heartbeats
  2017-10-11 17:26:21.029 o.a.s.d.s.AdvancedFSOps main [INFO] Deleting path
  C:\apache-storm-1.1.1\storm-local\workers\964b34c1-d7e3-4f22-9ee2-a0664c10294e\pids
  2017-10-11 17:26:21.032 o.a.s.d.s.AdvancedFSOps main [INFO] Deleting path
  C:\apache-storm-1.1.1\storm-local\workers\964b34c1-d7e3-4f22-9ee2-a0664c10294e\tmp
  2017-10-11 17:26:21.034 o.a.s.d.s.AdvancedFSOps main [INFO] Deleting path
  C:\apache-storm-1.1.1\storm-local\workers\964b34c1-d7e3-4f22-9ee2-a0664c10294e
  </code></pre>
  
  <p>here are my Nimbus logs at the same time:</p>
  
  <pre><code>2017-10-11 17:26:22.189 o.a.s.d.nimbus timer [INFO] Executor
  storm-kafka-topology1-2-1507756303:[2 2] not alive
  2017-10-11 17:26:22.189 o.a.s.d.nimbus timer [INFO] Executor
  storm-kafka-topology1-2-1507756303:[3 3] not alive
  2017-10-11 17:26:22.189 o.a.s.d.nimbus timer [INFO] Executor
  storm-kafka-topology1-2-1507756303:[1 1] not alive
  2017-10-11 17:26:22.189 o.a.s.d.nimbus timer [INFO] Executor
  storm-kafka-topology1-2-1507756303:[4 4] not alive
  2017-10-11 17:26:22.190 o.a.s.d.nimbus timer [INFO] Executor
  kafkaTopology-1-1507755826:[2 2] not alive
  2017-10-11 17:26:22.190 o.a.s.d.nimbus timer [INFO] Executor
  kafkaTopology-1-1507755826:[3 3] not alive
  2017-10-11 17:26:22.190 o.a.s.d.nimbus timer [INFO] Executor
  kafkaTopology-1-1507755826:[1 1] not alive
  2017-10-11 17:26:22.192 o.a.s.s.EvenScheduler timer [INFO] Available slots:
  (["5ef774ff-f24c-4810-9330-5e1291bd7539" 6700]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6701]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6702]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6703])
  2017-10-11 17:26:22.192 o.a.s.s.EvenScheduler timer [INFO] Available slots:
  (["5ef774ff-f24c-4810-9330-5e1291bd7539" 6701]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6702]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6703])
  2017-10-11 17:26:22.195 o.a.s.d.nimbus timer [INFO] Setting new assignment
  for topology id storm-kafka-topology1-2-1507756303:
  #org.apache.storm.daemon.common.Assignment{:master-code-dir "storm-local",
  :node-&gt;host {"5ef774ff-f24c-4810-9330-5e1291bd7539" "
  LNAR-PC0611K6.corp.capgemini.com"}, :executor-&gt;node+port {[4 4]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6701], [3 3]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6701], [2 2]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6701], [1 1]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6701]}, :executor-&gt;start-time-secs
  {[1 1] 1507757182, [2 2] 1507757182, [3 3] 1507757182, [4 4] 1507757182},
  :worker-&gt;resources {["5ef774ff-f24c-4810-9330-5e1291bd7539" 6701] [0.0 0.0
  0.0]}, :owner "rbliton"}
  2017-10-11 17:26:22.201 o.a.s.d.nimbus timer [INFO] Setting new assignment
  for topology id kafkaTopology-1-1507755826:
  #org.apache.storm.daemon.common.Assignment{:master-code-dir "storm-local",
  :node-&gt;host {"5ef774ff-f24c-4810-9330-5e1291bd7539" "
  LNAR-PC0611K6.corp.capgemini.com"}, :executor-&gt;node+port {[2 2]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6700], [1 1]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6700], [3 3]
  ["5ef774ff-f24c-4810-9330-5e1291bd7539" 6700]}, :executor-&gt;start-time-secs
  {[1 1] 1507757182, [2 2] 1507757182, [3 3] 1507757182}, :worker-&gt;resources
  {["5ef774ff-f24c-4810-9330-5e1291bd7539" 6700] [0.0 0.0 0.0]}, :owner
  "rbliton"}
  2017-10-11 17:26:23.209 o.a.s.d.nimbus pool-14-thread-25 [INFO] Created
  download session for kafkaTopology-1-1507755826-stormjar.jar with id
  bed36ea8-1d05-4d80-8006-c2bfb40ed8f6
  2017-10-11 17:26:23.801 o.a.s.d.nimbus pool-14-thread-7 [INFO] Created
  download session for kafkaTopology-1-1507755826-stormcode.ser with id
  7227688a-4381-48d5-ac27-c6a6e03f5a5d
  2017-10-11 17:26:23.837 o.a.s.d.nimbus pool-14-thread-11 [INFO] Created
  download session for kafkaTopology-1-1507755826-stormconf.ser with id
  d4d6712b-55ec-46fe-8e9c-6df068d65133
  2017-10-11 17:26:23.913 o.a.s.d.nimbus pool-14-thread-20 [INFO] Created
  download session for storm-kafka-topology1-2-1507756303-stormjar.jar with
  id 3b7263a0-fd39-4caf-b90b-3deaf3999308
  2017-10-11 17:26:24.496 o.a.s.d.nimbus pool-14-thread-64 [INFO] Created
  download session for storm-kafka-topology1-2-1507756303-stormcode.ser with
  id cd88098a-22c7-44c3-b709-34a202bc4952
  2017-10-11 17:26:24.529 o.a.s.d.nimbus pool-14-thread-63 [INFO] Created
  download session for storm-kafka-topology1-2-1507756303-stormconf.ser with
  id e7478249-7082-4edb-93bb-3746f39db06e
  2017-10-11 17:28:29.931 o.a.s.d.nimbus timer [INFO] Executor
  storm-kafka-topology1-2-1507756303:[2 2] not alive
  2017-10-11 17:28:29.931 o.a.s.d.nimbus timer [INFO] Executor
  storm-kafka-topology1-2-1507756303:[3 3] not alive
  2017-10-11 17:28:29.931 o.a.s.d.nimbus timer [INFO] Executor
  storm-kafka-topology1-2-1507756303:[1 1] not alive
  2017-10-11 17:28:29.932 o.a.s.d.nimbus timer [INFO] Executor
  storm-kafka-topology1-2-1507756303:[4 4] not alive
  2017-10-11 17:28:29.932 o.a.s.d.nimbus timer [INFO] Executor
  kafkaTopology-1-1507755826:[2 2] not alive
  2017-10-11 17:28:29.932 o.a.s.d.nimbus timer [INFO] Executor
  kafkaTopology-1-1507755826:[3 3] not alive
  2017-10-11 17:28:29.932 o.a.s.d.nimbus timer [INFO] Executor
  kafkaTopology-1-1507755826:[1 1] not alive
  2017-10-11 17:28:29.936 o.a.s.d.nimbus timer [INFO] Setting new assignment
  for topology id storm-kafka-topology1-2-1507756303:
  #org.apache.storm.daemon.common.Assignment{:master-code-dir "storm-local",
  :node-&gt;host {}, :executor-&gt;node+port {}, :executor-&gt;start-time-secs {[1 1]
  1507757182, [2 2] 1507757182, [3 3] 1507757182, [4 4] 1507757182},
  :worker-&gt;resources {}, :owner "rbliton"}
  2017-10-11 17:28:29.943 o.a.s.d.nimbus timer [INFO] Setting new assignment
  for topology id kafkaTopology-1-1507755826:
  #org.apache.storm.daemon.common.Assignment{:master-code-dir "storm-local",
  :node-&gt;host {}, :executor-&gt;node+port {}, :executor-&gt;start-time-secs {[1 1]
  1507757182, [2 2] 1507757182, [3 3] 1507757182}, :worker-&gt;resources {},
  :owner "rbliton"}
  </code></pre>