jstorm 使用过程中遇到的问题
1:Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
原因:jar文件的问题,google下,发现和maven打包有关系!
和研发同时沟通后需要:就是maven打包时的配置问题
2: 如果一个jar文件有太多的日志输出,出现了错误也会一下子刷屏过去了,通过该方法可以将日志完全写到一个文件里面,方便查看错误,
jstorm jar /*/txOdds-1.0.1-SNAPSHOT.jar com.*.*.TestStatictics > txodds3.txt 2>&1
3:Exception in thread "main" java.lang.RuntimeException: TopologyAssignException(msg:Fail to sumbit topology, Root cause:there's no enough worker. allocWorkerNum=11, availableWorkerNum=4
原因:我有3台supervisor,每个机器开4个worker,总共就12个worker,已经运行了两个jar包,用掉了些worker,剩余不到11个worker,配置文件里面需要用到11个worker,我这里只有4个可用的worker,故有此错误
Topology.properties 里面有allocWorkerNum 的设置,后来我将测试的topology下显示的都给kill 掉了,等worker释放掉了,就没有此问题了!当然也可以增加worker的数目,
4:
Caused by: java.io.IOException: Found multiple defaults.yaml resources.
/usr/local/jdk/bin/java
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/txOdds-1.0.1-SNAPSHOT.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/deploy/jstorm/lib/logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Exception in thread "main" java.lang.ExceptionInInitializerError
at backtype.storm.command.config_value.main(config_value.java:45)
Caused by: java.lang.RuntimeException: java.io.IOException: Found multiple defaults.yaml resources. You're probably bundling the Storm jars with your topology jar. [jar:file:/home/hadoop/txOdds-1.0.1-SNAPSHOT.jar!/defaults.yaml, jar:file:/home/hadoop/deploy/jstorm/jstorm-core-2.1.0.jar!/defaults.yaml]
at com.alibaba.jstorm.utils.LoadConf.findAndReadYaml(LoadConf.java:70)
at backtype.storm.utils.Utils.readDefaultConfig(Utils.java:291)
at backtype.storm.utils.Utils.readStormConfig(Utils.java:364)
at backtype.storm.utils.Utils.(Utils.java:64)
... 1 more
Caused by: java.io.IOException: Found multiple defaults.yaml resources. You're probably bundling the Storm jars with your topology jar. [jar:file:/home/hadoop/txOdds-1.0.1-SNAPSHOT.jar!/defaults.yaml, jar:file:/home/hadoop/deploy/jstorm/jstorm-core-2.1.0.jar!/defaults.yaml]
at com.alibaba.jstorm.utils.LoadConf.getConfigFileInputStream(LoadConf.java:94)
at com.alibaba.jstorm.utils.LoadConf.findAndReadYaml(LoadConf.java:50)
... 4 more
Failed to get config java.library.path
原因:打包时将defaults.yaml文件给打包进去了,在jar文件里删除defaults.yawl文件即可!
阅读(7804) | 评论(0) | 转发(0) |