简体   繁体   English

Apache Storm找不到Storm Starter的主要类别

[英]Apache storm can not find main class of storm starter

I am setting up an Apache Storm system but am having problems getting the program to run consistently. 我正在设置一个Apache Storm系统,但是在使程序一致运行时遇到了问题。 I have set up storm on three servers but it only works consistently on one. 我在三台服务器上设置了风暴,但它只能在一台服务器上持续工作。 I think the issue lies somewhere in the path of the command. 我认为问题出在命令路径的某处。

I have been using storm-starter to set up the program and have tested it locally with RollingTopWords. 我一直在使用Storm-starter来设置程序,并使用RollingTopWords在本地对其进行了测试。 When I run the following command $ storm jar storm-starter-*.jar storm.starter.RollingTopWords the computer stalls a second then i get the following error: 当我运行以下命令$ storm jar storm-starter-*.jar storm.starter.RollingTopWords ,计算机将停顿一秒钟,然后出现以下错误:

Could not find or load main class storm.starter.RollingTopWords 无法找到或加载主类storm.starter.RollingTopWords

The jar is stored in the directory /apache/storm/examples/storm-starter/target . 罐子存储在目录/ apache / storm / examples / storm-starter / target中。 Let me know if there is any other information I can provide that would be of help because I'm feeling a little desperate at this point. 让我知道我是否可以提供其他任何信息,因为在这一点上我感到有些绝望。

The following is the entire output for the program that doesn't work. 以下是无法正常运行的程序的全部输出。

Running: /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java -client -Dstorm.options= -Dstorm.home=/home/scix3/apache/storm -Dstorm.log.dir=/home/scix3/apache/storm/logs -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /home/scix3/apache/storm/lib/kryo-2.21.jar:/home/scix3/apache/storm/lib/core.incubator-0.1.0.jar:/home/scix3/apache/storm/lib/commons-fileupload-1.2.1.jar:/home/scix3/apache/storm/lib/ring-servlet-0.3.11.jar:/home/scix3/apache/storm/lib/clj-stacktrace-0.2.2.jar:/home/scix3/apache/storm/lib/jline-2.11.jar:/home/scix3/apache/storm/lib/servlet-api-2.5.jar:/home/scix3/apache/storm/lib/disruptor-2.10.1.jar:/home/scix3/apache/storm/lib/log4j-over-slf4j-1.6.6.jar:/home/scix3/apache/storm/lib/clojure-1.5.1.jar:/home/scix3/apache/storm/lib/commons-exec-1.1.jar:/home/scix3/apache/storm/lib/logback-core-1.0.13.jar:/home/scix3/apache/storm/lib/jetty-util-6.1.26.jar:/home/scix3/apache/storm/lib/slf4j-api-1.7.5.jar:/home/scix3/apache/storm/lib/carbonite-1.4 运行:/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java -client -Dstorm.options = -Dstorm.home = / home / scix3 / apache / storm -Dstorm.log.dir = / home / scix3 / apache / storm / logs -Djava.library.path = / usr / local / lib:/ opt / local / lib:/ usr / lib -Dstorm.conf.file = -cp / home / scix3 / apache /风暴/lib/kryo-2.21.jar:/home/scix3/apache/storm/lib/core.incubator-0.1.0.jar:/home/scix3/apache/storm/lib/commons-fileupload-1.2.1。 jar:/home/scix3/apache/storm/lib/ring-servlet-0.3.11.jar:/home/scix3/apache/storm/lib/clj-stacktrace-0.2.2.jar:/ home / scix3 / apache /storm/lib/jline-2.11.jar:/home/scix3/apache/storm/lib/servlet-api-2.5.jar:/home/scix3/apache/storm/lib/disruptor-2.10.1.jar:/主页/scix3/apache/storm/lib/log4j-over-slf4j-1.6.6.jar:/home/scix3/apache/storm/lib/clojure-1.5.1.jar:/home/scix3/apache/storm/ lib / commons-exec-1.1.jar:/home/scix3/apache/storm/lib/logback-core-1.0.13.jar:/home/scix3/apache/storm/lib/jetty-util-6.1.26。 jar:/home/scix3/apache/storm/lib/slf4j-api-1.7.5.jar:/home/scix3/apache/storm/lib/carbonite-1.4 .0.jar:/home/scix3/apache/storm/lib/compojure-1.1.3.jar:/home/scix3/apache/storm/lib/minlog-1.2.jar:/home/scix3/apache/storm/lib/commons-lang-2.5.jar:/home/scix3/apache/storm/lib/tools.macro-0.1.0.jar:/home/scix3/apache/storm/lib/reflectasm-1.07-shaded.jar:/home/scix3/apache/storm/lib/tools.cli-0.2.4.jar:/home/scix3/apache/storm/lib/math.numeric-tower-0.0.1.jar:/home/scix3/apache/storm/lib/logback-classic-1.0.13.jar:/home/scix3/apache/storm/lib/tools.logging-0.2.3.jar:/home/scix3/apache/storm/lib/asm-4.0.jar:/home/scix3/apache/storm/lib/jetty-6.1.26.jar:/home/scix3/apache/storm/lib/snakeyaml-1.11.jar:/home/scix3/apache/storm/lib/hiccup-0.3.6.jar:/home/scix3/apache/storm/lib/clj-time-0.4.1.jar:/home/scix3/apache/storm/lib/jgrapht-core-0.9.0.jar:/home/scix3/apache/storm/lib/clout-1.0.1.jar:/home/scix3/apache/storm/lib/chill-java-0.3.5.jar:/home/scix3/apache/storm/lib/commons-io-2.4.jar:/home/scix3/apache/storm/lib/joda-time-2.0.jar:/home/scix3/apache/storm/lib/storm-core-0.9.4.jar:/home/ .0.jar:/home/scix3/apache/storm/lib/compojure-1.1.3.jar:/home/scix3/apache/storm/lib/minlog-1.2.jar:/ home / scix3 / apache / storm / lib / commons-lang-2.5.jar:/home/scix3/apache/storm/lib/tools.macro-0.1.0.jar:/home/scix3/apache/storm/lib/reflectasm-1.07-shaded.jar: /home/scix3/apache/storm/lib/tools.cli-0.2.4.jar:/home/scix3/apache/storm/lib/math.numeric-tower-0.0.1.jar:/home/scix3/apache /storm/lib/logback-classic-1.0.13.jar:/home/scix3/apache/storm/lib/tools.logging-0.2.3.jar:/home/scix3/apache/storm/lib/asm-4.0 .jar:/home/scix3/apache/storm/lib/jetty-6.1.26.jar:/home/scix3/apache/storm/lib/snakeyaml-1.11.jar:/ home / scix3 / apache / storm / lib / hiccup-0.3.6.jar:/home/scix3/apache/storm/lib/clj-time-0.4.1.jar:/home/scix3/apache/storm/lib/jgrapht-core-0.9.0.jar: /home/scix3/apache/storm/lib/clout-1.0.1.jar:/home/scix3/apache/storm/lib/chill-java-0.3.5.jar:/home/scix3/apache/storm/lib /commons-io-2.4.jar:/home/scix3/apache/storm/lib/joda-time-2.0.jar:/home/scix3/apache/storm/lib/storm-core-0.9.4.jar:/家/ scix3/apache/storm/lib/objenesis-1.2.jar:/home/scix3/apache/storm/lib/commons-logging-1.1.3.jar:/home/scix3/apache/storm/lib/ring-core-1.1.5.jar:/home/scix3/apache/storm/lib/ring-jetty-adapter-0.3.11.jar:/home/scix3/apache/storm/lib/commons-codec-1.6.jar:/home/scix3/apache/storm/lib/json-simple-1.1.jar:/home/scix3/apache/storm/lib/ring-devel-0.3.11.jar:storm-starter- .jar:/home/scix3/apache/storm/conf:/home/scix3/apache/storm/bin -Dstorm.jar=storm-starter- .jar storm.starter.RollingTopWords Error: Could not find or load main class storm.starter.RollingTopWords scix3 / apache / storm / lib / objenesis-1.2.jar:/home/scix3/apache/storm/lib/commons-logging-1.1.3.jar:/ home / scix3 / apache / storm / lib / ring-core- 1.1.5.jar:/home/scix3/apache/storm/lib/ring-jetty-adapter-0.3.11.jar:/home/scix3/apache/storm/lib/commons-codec-1.6.jar:/ home /scix3/apache/storm/lib/json-simple-1.1.jar:/home/scix3/apache/storm/lib/ring-devel-0.3.11.jar:storm-starter- .jar:/ home / scix3 / apache / storm / conf:/ home / scix3 / apache / storm / bin -Dstorm.jar = storm- starter- .jar storm.starter.RollingTopWords错误:找不到或加载主类storm.starter.RollingTopWords

The main issue for the error 错误的主要问题
Could not find or load main class storm.starter.RollingTopWords cloud be. Could not find or load main class storm.starter.RollingTopWords云。

  1. Check the launch configuration while building the jar. 在构建jar时检查launch configuration you must be very careful while building the jar ,it asks you to choose destination folder and launch configuration(launch configuration should be of same project) 您在构建jar时必须非常小心,它会要求您选择目标文件夹并启动配置(启动配置应属于同一项目)
  2. You might have missed the main class in your project. 您可能错过了项目中的main class

Before using Stormsubmitter in Remote cluster, check once weather it works properly localcluster 在远程群集中使用Stormsubmitter之前,请先检查一下它是否可以正常工作localcluster

To check if the problem is with storm unable to find the jar, you can try issuing 要检查问题是否与风暴无法找到罐子有关,可以尝试发出

storm jar /fullpath/my-storm-jar.jar Classname

Few other things you can make sure 您可以确保的其他几件事

  1. The jar is compiled properly/jar contains the RollingTopWords class jar正确编译/ jar包含RollingTopWords类
  2. storm.yaml points to the correct nimubs (This seems less probable, as the the connection is being made and there is an attempt to load the topology) storm.yaml指向正确的nimub(这似乎不太可能,因为正在建立连接并且尝试加载拓扑)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM