我正在设置一个Apache Storm系统但是在让程序一致运行时遇到了问题。我在三台服务器上设置了风暴,但它只在一台服务器上运行。我认为这个问题存在于命令的路径中。
我一直在使用storm-starter来设置程序,并使用RollingTopWords在本地测试它。当我运行以下命令$ storm jar storm-starter-*.jar storm.starter.RollingTopWords
时,计算机停止一秒钟,然后我收到以下错误:
无法找到或加载主类storm.starter.RollingTopWords
jar存储在目录/ apache / storm / examples / storm-starter / target中。让我知道,如果我能提供任何其他信息会有所帮助,因为我现在感到有点绝望。
以下是程序无法正常工作的整个输出。
正在运行:/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:/首页/ scix3 /阿帕奇/风暴/ lib中/的JLine-2.11.jar:/home/scix3/apache/storm/lib/servlet-api-2.5.jar:/home/scix3/apache/storm/lib/disruptor-2.10.1。罐子:/home/scix3/apache/storm/lib/log4j-over-slf4j-1.6.6.jar:/home/scix3/apache/storm/lib/clojure-1.5.1.jar:/家庭/ scix3 /阿帕奇/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:/家庭/ scix3 /阿帕奇/风暴/ 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:/家庭/ scix3 /阿帕奇/风暴/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:/家庭/ scix3 /阿帕奇/风暴/ lib中/的logback经典-1.0.13.jar:/home/scix3/apache/storm/lib/tools.logging-0.2.3.jar:/家庭/ scix3 /阿帕奇/风暴/ lib中/ asm- 4.0.jar:/home/scix3/apache/storm/lib/jetty-6.1.26.jar:/home/scix3/apache/storm/lib/snakeyaml-1.11.jar:/家庭/ scix3 /阿帕奇/风暴/ 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:/家庭/ scix3 /阿帕奇/风暴/ LIB /公地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: / HO我/ scix3 /阿帕奇/风暴/ lib目录/ objenesis-1.2.jar:/home/scix3/apache/storm/lib/commons-logging-1.1.3.jar:/家庭/ scix3 /阿帕奇/风暴/ lib中/环 - 核心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
答案 0 :(得分:3)
错误的主要问题
Could not find or load main class storm.starter.RollingTopWords
云是。
launch configuration
。
在构建jar时你必须非常小心,它会要求你选择目标文件夹并启动配置(启动配置应该是同一个项目)main class
。在远程群集中使用Stormsubmitter
之前,请检查一次天气是否正常localcluster
答案 1 :(得分:1)
要检查问题是否风暴无法找到jar,您可以尝试发布
storm jar /fullpath/my-storm-jar.jar Classname
您可以确定其他很少的事情