在storm.yaml(版本1.0.0)中,我具有下一个配置:
nimbus.host: "%nimbus%"
升级版本后,我更改为:
nimbus.seeds: ["%nimbus%"]
在用于部署所有拓扑的脚本中,我使用下一个命令(在1.0.0版中)检查风暴列表:
storm list -c nimbus.host=localhost
我遇到下一个错误:
Running: /usr/lib/jvm/java-8-oracle/bin/java -client -Ddaemon.name= -Dstorm.options=nimbus.host%3Dlocalhost -Dstorm.home=/usr/share/storm-1.2.3 -Dstorm.log.dir=/usr/share/storm-1.2.3/logs -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/share/storm-1.2.3/*:/usr/share/storm-1.2.3/lib/*:/usr/share/storm-1.2.3/extlib/*:/usr/share/storm-1.2.3/extlib-daemon/*:/usr/share/storm-1.2.3/conf:/usr/share/storm-1.2.3/bin org.apache.storm.command.list
2952 [main] WARN o.a.s.u.NimbusClient - Using deprecated config nimbus.host for backward compatibility. Please update your storm.yaml so it only has config nimbus.seeds
3033 [main] WARN o.a.s.u.NimbusClient - Ignoring exception while trying to get leader nimbus info from localhost. will retry with a different seed host.
org.apache.storm.thrift.TApplicationException: Internal error processing getLeader
at org.apache.storm.thrift.TServiceClient.receiveBase(TServiceClient.java:79) ~[storm-core-1.2.3.jar:1.2.3]
at org.apache.storm.generated.Nimbus$Client.recv_getLeader(Nimbus.java:1166) ~[storm-core-1.2.3.jar:1.2.3]
at org.apache.storm.generated.Nimbus$Client.getLeader(Nimbus.java:1154) ~[storm-core-1.2.3.jar:1.2.3]
at org.apache.storm.utils.NimbusClient.getConfiguredClientAs(NimbusClient.java:93) [storm-core-1.2.3.jar:1.2.3]
at org.apache.storm.utils.NimbusClient.getConfiguredClientAs(NimbusClient.java:66) [storm-core-1.2.3.jar:1.2.3]
at org.apache.storm.command.list$_main.invoke(list.clj:22) [storm-core-1.2.3.jar:1.2.3]
at clojure.lang.AFn.applyToHelper(AFn.java:152) [clojure-1.7.0.jar:?]
at clojure.lang.AFn.applyTo(AFn.java:144) [clojure-1.7.0.jar:?]
at org.apache.storm.command.list.main(Unknown Source) [storm-core-1.2.3.jar:1.2.3]
Exception in thread "main" org.apache.storm.utils.NimbusLeaderNotFoundException: Could not find leader nimbus from seed hosts [localhost]. Did you specify a valid list of nimbus hosts for config nimbus.seeds?
at org.apache.storm.utils.NimbusClient.getConfiguredClientAs(NimbusClient.java:120)
at org.apache.storm.utils.NimbusClient.getConfiguredClientAs(NimbusClient.java:66)
at org.apache.storm.command.list$_main.invoke(list.clj:22)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at org.apache.storm.command.list.main(Unknown Source)
升级版本时,我将命令更改为:
storm list -c nimbus.seeds=[localhost]
但是,我遇到了下一个错误:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2154)
at clojure.lang.RT.classForName(RT.java:2163)
at clojure.lang.RT.loadClassForName(RT.java:2182)
at clojure.lang.RT.load(RT.java:436)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5753)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:634)
at clojure.core$use.doInvoke(core.clj:5843)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at org.apache.storm.command.config_value$loading__5340__auto____12317.invoke(config_value.clj:16)
at org.apache.storm.command.config_value__init.load(Unknown Source)
at org.apache.storm.command.config_value__init.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2154)
at clojure.lang.RT.classForName(RT.java:2163)
at clojure.lang.RT.loadClassForName(RT.java:2182)
at clojure.lang.RT.load(RT.java:436)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.lang.Var.invoke(Var.java:379)
at org.apache.storm.command.config_value.<clinit>(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Field NIMBUS_SEEDS must be an Iterable but was a class java.lang.String
at org.apache.storm.validation.ConfigValidationUtils$2.validateField(ConfigValidationUtils.java:125)
at org.apache.storm.validation.ConfigValidationUtils$NestableFieldValidator.validateField(ConfigValidationUtils.java:48)
at org.apache.storm.validation.ConfigValidation$ListEntryTypeValidator.validateField(ConfigValidation.java:304)
at org.apache.storm.validation.ConfigValidation$ListEntryTypeValidator.validateField(ConfigValidation.java:299)
at org.apache.storm.validation.ConfigValidation.validateField(ConfigValidation.java:707)
at org.apache.storm.validation.ConfigValidation.validateFields(ConfigValidation.java:742)
at org.apache.storm.validation.ConfigValidation.validateFields(ConfigValidation.java:721)
at org.apache.storm.config$validate_configs_with_schemas.invoke(config.clj:74)
at org.apache.storm.config$read_storm_config.invoke(config.clj:79)
at org.apache.storm.config$fn__975.invoke(config.clj:100)
at org.apache.storm.config__init.load(Unknown Source)
at org.apache.storm.config__init.<clinit>(Unknown Source)
... 35 more
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2154)
at clojure.lang.RT.classForName(RT.java:2163)
at clojure.lang.RT.loadClassForName(RT.java:2182)
at clojure.lang.RT.load(RT.java:436)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5671)
at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
at clojure.core$load_lib.doInvoke(core.clj:5710)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$load_libs.doInvoke(core.clj:5753)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:634)
at clojure.core$use.doInvoke(core.clj:5843)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at org.apache.storm.command.config_value$loading__5340__auto____12317.invoke(config_value.clj:16)
at org.apache.storm.command.config_value__init.load(Unknown Source)
at org.apache.storm.command.config_value__init.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2154)
at clojure.lang.RT.classForName(RT.java:2163)
at clojure.lang.RT.loadClassForName(RT.java:2182)
at clojure.lang.RT.load(RT.java:436)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.lang.Var.invoke(Var.java:379)
at org.apache.storm.command.config_value.<clinit>(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Field NIMBUS_SEEDS must be an Iterable but was a class java.lang.String
at org.apache.storm.validation.ConfigValidationUtils$2.validateField(ConfigValidationUtils.java:125)
at org.apache.storm.validation.ConfigValidationUtils$NestableFieldValidator.validateField(ConfigValidationUtils.java:48)
at org.apache.storm.validation.ConfigValidation$ListEntryTypeValidator.validateField(ConfigValidation.java:304)
at org.apache.storm.validation.ConfigValidation$ListEntryTypeValidator.validateField(ConfigValidation.java:299)
at org.apache.storm.validation.ConfigValidation.validateField(ConfigValidation.java:707)
at org.apache.storm.validation.ConfigValidation.validateFields(ConfigValidation.java:742)
at org.apache.storm.validation.ConfigValidation.validateFields(ConfigValidation.java:721)
at org.apache.storm.config$validate_configs_with_schemas.invoke(config.clj:74)
at org.apache.storm.config$read_storm_config.invoke(config.clj:79)
at org.apache.storm.config$fn__975.invoke(config.clj:100)
at org.apache.storm.config__init.load(Unknown Source)
at org.apache.storm.config__init.<clinit>(Unknown Source)
... 35 more
Running: /usr/lib/jvm/java-8-oracle/bin/java -client -Ddaemon.name= -Dstorm.options=nimbus.seeds%3D%5Blocalhost%5D -Dstorm.home=/usr/share/storm-1.2.3 -Dstorm.log.dir= -Djava.library.path= -Dstorm.conf.file= -cp /usr/share/storm-1.2.3/*:/usr/share/storm-1.2.3/lib/*:/usr/share/storm-1.2.3/extlib/*:/usr/share/storm-1.2.3/extlib-daemon/*:/usr/share/storm-1.2.3/conf:/usr/share/storm-1.2.3/bin org.apache.storm.command.list
Exception in thread "main" java.lang.IllegalArgumentException: Field NIMBUS_SEEDS must be an Iterable but was a class java.lang.String
at org.apache.storm.validation.ConfigValidationUtils$2.validateField(ConfigValidationUtils.java:125)
at org.apache.storm.validation.ConfigValidationUtils$NestableFieldValidator.validateField(ConfigValidationUtils.java:48)
at org.apache.storm.validation.ConfigValidation$ListEntryTypeValidator.validateField(ConfigValidation.java:304)
at org.apache.storm.validation.ConfigValidation$ListEntryTypeValidator.validateField(ConfigValidation.java:299)
at org.apache.storm.validation.ConfigValidation.validateField(ConfigValidation.java:707)
at org.apache.storm.validation.ConfigValidation.validateFields(ConfigValidation.java:742)
at org.apache.storm.validation.ConfigValidation.validateFields(ConfigValidation.java:721)
at org.apache.storm.config$validate_configs_with_schemas.invoke(config.clj:74)
at org.apache.storm.config$read_storm_config.invoke(config.clj:79)
at org.apache.storm.command.list$_main.invoke(list.clj:22)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at org.apache.storm.command.list.main(Unknown Source)
有人可以帮助我解决此错误吗?谢谢。
附加:
1.0.0版本中的配置文件
storm.local.hostname: "%local.ip%"
storm.zookeeper.servers:
- "%zookeeper%"
nimbus.host: "%nimbus%"
# netty transport
storm.messaging.transport: "org.apache.storm.messaging.netty.Context"
storm.messaging.netty.buffer_size: 16384
storm.messaging.netty.max_retries: 10
storm.messaging.netty.min_wait_ms: 1000
storm.messaging.netty.max_wait_ms: 5000
drpc.servers:
- "%nimbus%"
drpc.port: 3772
drpc.invocations.port: 3773
### supervisor.* configs are for node supervisors
# Define the amount of workers that can be run on this machine. Each worker is assigned a port to use for communication
supervisor.slots.ports:
- 6701
- 6702
- 6703
- 6704
- 6705
- 6706
- 6707
- 6708
- 6709
- 6710
- 6711
- 6712
- 6713
- 6714
- 6715
- 6716
- 6717
supervisor.childopts: "-Xmx256m"
#how long supervisor will wait to ensure that a worker process is started
supervisor.worker.start.timeout.secs: 120
#how long between heartbeats until supervisor considers that worker dead and tries to restart it
supervisor.worker.timeout.secs: 30
#how frequently the supervisor checks on the status of the processes it's monitoring and restarts if necessary
supervisor.monitor.frequency.secs: 3
#how frequently the supervisor heartbeats to the cluster state (for nimbus)
supervisor.heartbeat.frequency.secs: 5
supervisor.enable: true
supervisor.cpu.capacity: 200.0
supervisor.memory.capacity.mb: 4096.0
### worker.* configs are for task workers
worker.heap.memory.mb: 1024
worker.childopts: "-Xmx%HEAP-MEM%m -XX:+PrintGCDetails -Xloggc:artifacts/gc.log -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=artifacts/heapdump"
worker.gc.childopts: ""
### check https://github.com/apache/storm/blob/master/conf/defaults.yaml for compelte defaults
logs / nimbus.log中的错误
2019-11-20 17:30:07.158 o.a.s.t.ProcessFunction池14-线程8 [错误]内部错误处理getLeader java.lang.RuntimeException:未找到任何nimbus领导者参与者主机, 您是否启动了Nimbus主机?在 org.apache.storm.zookeeper $ to_NimbusInfo.invoke(zookeeper.clj:241) 〜[storm-core-1.2.3.jar:1.2.3]在 org.apache.storm.zookeeper $ zk_leader_elector $ reify__2212.getLeader(zookeeper.clj:294) 〜[storm-core-1.2.3.jar:1.2.3]在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法) 〜[?:1.8.0_201]在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 〜[?:1.8.0_201]在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 〜[?:1.8.0_201]在java.lang.reflect.Method.invoke(Method.java:498) 〜[?:1.8.0_201]在 clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) 〜[clojure-1.7.0.jar :?]在 clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:313) 〜[clojure-1.7.0.jar :?]在 org.apache.storm.daemon.nimbus $ mk_reified_nimbus $ reify__9284.getLeader(nimbus.clj:2428) 〜[storm-core-1.2.3.jar:1.2.3]在 org.apache.storm.generation.Nimbus $ Processor $ getLeader.getResult(Nimbus.java:4092) 〜[storm-core-1.2.3.jar:1.2.3]在 org.apache.storm.generation.Nimbus $ Processor $ getLeader.getResult(Nimbus.java:4071) 〜[storm-core-1.2.3.jar:1.2.3]在 org.apache.storm.thrift.ProcessFunction.process(ProcessFunction.java:38) 〜[storm-core-1.2.3.jar:1.2.3]在 org.apache.storm.thrift.TBaseProcessor.process(TBaseProcessor.java:39) 〜[storm-core-1.2.3.jar:1.2.3]在 org.apache.storm.security.auth.SimpleTransportPlugin $ SimpleWrapProcessor.process(SimpleTransportPlugin.java:162) 〜[storm-core-1.2.3.jar:1.2.3]在 org.apache.storm.thrift.server.AbstractNonblockingServer $ FrameBuffer.invoke(AbstractNonblockingServer.java:518) 〜[storm-core-1.2.3.jar:1.2.3]在 org.apache.storm.thrift.server.Invocation.run(Invocation.java:18) 〜[storm-core-1.2.3.jar:1.2.3]在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201]在 java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201],位于java.lang.Thread.run(Thread.java:748)[?:1.8.0_201]
答案 0 :(得分:0)
您编写的list命令略有错误。它应该是storm list -c nimbus.seeds='[\"localhost\"]'
。一旦终端解释器完成了字符串,它就必须与storm.yaml中的相同。因此,使用nimbus.seeds='[\"localhost\"]
最终将nimbus.seeds=["localhost"]
之类的字符串传递给Storm。