jstorm 安装

阅读更多
1.主要看阿里官网 https://github.com/alibaba/jstorm/wiki/%E5%A6%82%E4%BD%95%E5%AE%89%E8%A3%85

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.(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.(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.(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. http://192.168.192.83:8880/jstorm-ui-2.1.1/cluster?name=jstorm


jstorm 安装_第1张图片


 
  • jstorm 安装_第2张图片
  • 大小: 64.9 KB
  • 查看图片附件

你可能感兴趣的:(jstorm 安装)