jstorm 安裝

1.主要看阿里官網[url]https://github.com/alibaba/jstorm/wiki/%E5%A6%82%E4%BD%95%E5%AE%89%E8%A3%85[/url]

2.linux環境默認已經安裝了Python

3.Zookeeper安裝省略

4.jstorm2.1.1依賴jdk7
查看linux docker是32位還是64:uname -a
5.下載JDK
jdk-7u60-linux-x64.tar.gz
解壓設置profile,生效source,驗證java -version
6.下載jstorm-2.1.1
7.解壓設置home與bin
export JSTORM_HOME=/XXXXX/XXXX

export PATH=$PATH:$JSTORM_HOME/bin
8.source生效
9.配置$JSTORM_HOME/conf/storm.yaml

storm.zookeeper.servers:
- "192.168.192.83"

storm.zookeeper.root: "/jstorm"

# cluster.name: "default"

#nimbus.host/nimbus.host.start.supervisor is being used by $JSTORM_HOME/bin/start.sh
#it only support IP, please don't set hostname
# For example
nimbus.host: "192.168.192.83"
#nimbus.host: "localhost"
#nimbus.host.start.supervisor: false

# %JSTORM_HOME% is the jstorm home directory
storm.local.dir: "%JSTORM_HOME%/data"
# please set absolute path, default path is JSTORM_HOME/logs
# jstorm.log.dir: "absolute path"

# java.library.path: "/usr/local/lib:/opt/local/lib:/usr/lib"


# if supervisor.slots.ports is null,
# the port list will be generated by cpu cores and system memory size
# for example,
# there are cpu_num = system_physical_cpu_num/supervisor.slots.port.cpu.weight
# there are mem_num = system_physical_memory_size/(worker.memory.size * supervisor.slots.port.mem.weight)
# The final port number is min(cpu_num, mem_num)
# supervisor.slots.ports.base: 6800
# supervisor.slots.port.cpu.weight: 1.2
# supervisor.slots.port.mem.weight: 0.7
# supervisor.slots.ports: null
supervisor.slots.poRts:
- 6800
- 6801
- 6802
- 6803

9.啓動調度任務:jstorm nimbus
啓動報錯:
[ERROR 2016-10-28 14:47:50 c.a.j.s.FollowerRunnable:85 main] get nimbus host error!
java.lang.Exception: the hostname which Nimbus get is localhost
at com.alibaba.jstorm.schedule.FollowerRunnable.<init>(FollowerRunnable.java:82) ~[jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.initFollowerThread(NimbusServer.java:275) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.launchServer(NimbusServer.java:121) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.main(NimbusServer.java:95) [jstorm-core-2.1.1.jar:na]
[ERROR 2016-10-28 14:47:50 c.a.j.d.n.NimbusServer:137 main] Fail to run nimbus
java.lang.RuntimeException: java.lang.Exception: the hostname which Nimbus get is localhost
at com.alibaba.jstorm.schedule.FollowerRunnable.<init>(FollowerRunnable.java:86) ~[jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.initFollowerThread(NimbusServer.java:275) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.launchServer(NimbusServer.java:121) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.main(NimbusServer.java:95) [jstorm-core-2.1.1.jar:na]
Caused by: java.lang.Exception: the hostname which Nimbus get is localhost
at com.alibaba.jstorm.schedule.FollowerRunnable.<init>(FollowerRunnable.java:82) ~[jstorm-core-2.1.1.jar:na]
... 3 common frames omitted

10.主要解決Hostname
修改/etc/hosts以及使用命令hostname -i
查看直到顯示非127.0.0.1以及localhost
11.遠程後臺運行:nohup jstorm nimbus &
12.task任務節點同理:nohup jstorm supervisor &
13.最後安裝tomcat7 啓動ui
14.[url]http://192.168.192.83:8880/jstorm-ui-2.1.1/cluster?name=jstorm[/url]


[img]http://dl2.iteye.com/upload/attachment/0121/0092/baad5890-dcc2-3e60-9659-16b73fba61a7.png[/img]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章