Example of emergency situations

I am just getting started with the Twitter Storm framework on OS X 10.9.5. However, I am having a problem running the sample topologies in a storm start: https://github.com/apache/storm/tree/master/examples/storm-starter .

Following the readme, I am trying to deploy the topology locally by calling

sudo mvn exec:java -Dstorm.topology=storm.starter.WordCountTopology

      

The topology runs for less than a minute and then fails:

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project storm-starter: An exception occured while executing the Java class. java.lang.InterruptedException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project storm-starter: An exception occured while executing the Java class. java.lang.InterruptedException
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. java.lang.InterruptedException
    at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:352)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: java.lang.RuntimeException: java.lang.InterruptedException
    at backtype.storm.util$wrap_in_runtime.invoke(util.clj:44)
    at backtype.storm.zookeeper$exists_node_QMARK_$fn__907.invoke(zookeeper.clj:102)
    at backtype.storm.zookeeper$exists_node_QMARK_.invoke(zookeep`enter code here`er.clj:98)
    at backtype.storm.zookeeper$mkdirs.invoke(zookeeper.clj:114)
    at backtype.storm.cluster$mk_distributed_cluster_state$reify__1757.mkdirs(cluster.clj:119)
    at backtype.storm.cluster$mk_storm_cluster_state$reify__2214.report_error(cluster.clj:397)
    at backtype.storm.daemon.executor$throttled_report_error_fn$fn__3547.invoke(executor.clj:179)
    at backtype.storm.daemon.executor$fn__3767$fn$reify__3812.reportError(executor.clj:737)
    at backtype.storm.task.OutputCollector.reportError(OutputCollector.java:223)
    at backtype.storm.task.ShellBolt.die(ShellBolt.java:303)
    at backtype.storm.task.ShellBolt.access$800(ShellBolt.java:68)
    at backtype.storm.task.ShellBolt$1.run(ShellBolt.java:137)
    at java.lang.Thread.run(Thread.java:695)
Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at org.apache.storm.zookeeper.ClientCnxn.submitRequest(ClientCnxn.java:1342)
    at org.apache.storm.zookeeper.ZooKeeper.exists(ZooKeeper.java:1040)
    at org.apache.storm.curator.framework.imps.ExistsBuilderImpl$2.call(ExistsBuilderImpl.java:172)
    at org.apache.storm.curator.framework.imps.ExistsBuilderImpl$2.call(ExistsBuilderImpl.java:161)
    at org.apache.storm.curator.RetryLoop.callWithRetry(RetryLoop.java:107)
    at org.apache.storm.curator.framework.imps.ExistsBuilderImpl.pathInForeground(ExistsBuilderImpl.java:157)
    at org.apache.storm.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:148)
    at org.apache.storm.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:36)
    at backtype.storm.zookeeper$exists_node_QMARK_$fn__907.invoke(zookeeper.clj:101)
    ... 11 more

      

Any help would be greatly appreciated.

+3


source to share


5 answers


I believe the problem you are seeing is the result of closing the cluster:

See [./src/jvm/storm/starter/WordCountTopology.java]:



...
else {
  conf.setMaxTaskParallelism(3);

  LocalCluster cluster = new LocalCluster();
  cluster.submitTopology("word-count", conf, builder.createTopology());

  Thread.sleep(10000); //<----- HERE

  cluster.shutdown();  //<----- HERE
}

      

+4


source


Storm 0.9.3 multi-lang does not support backward compatibility, and the WordCountTopology.java

storm start example has not been updated for the changes.



In addition to the Node.js implementation, the multi-lang protocol has improved significantly in terms of reliability and error handling capabilities. As a result, the multi-language API has changed in a non-backward compatible way . Users with existing multi-language topologies should consult the Python, Ruby, and JavaScript multi-lang examples to determine the impact prior to upgrading.

+3


source


I had the same problem and don't have a complete fix yet, but the error stems from python. If you look at the WordCountTopology class, you see the following constructor for the inner SplitSentence class:

public SplitSentence() {
  super("python", "splitsentence.py");
}

      

And if you replace that with Java code, namely, give this class an execute () method where String-splits are produced, everything works fine.

So something with python doesn't work, although the python code works and breaks lines. Hope this helped at least a little!

+2


source


As @ booleys1012 pointed out, this is because when running mvn exec: java -Dstorm.topology = storm.starter.WordCountTopology and doesn't give any parameters to send to the cluster it starts in LocalCluster (simulated storm cluster for testing topologies). This will be for 10 seconds and will call cluster.shutdown () which causes it to throw InterruptedException when you see an error. This is not expected to be a storm problem.

+1


source


A bit late for this question I think, but I'm just getting started with Apache Storm on macOS Sierra and found this error came up when installing newer versions. Finally, I followed the directions from this link I found:

http://www.haroldnguyen.com/blog/category/storm/

So, I installed version 0.9.2 and everything worked like a charm!

ps. I also tried this on Ubuntu 16.04 and it worked great too.

0


source







All Articles