参考文献
http://www.cnblogs.com/panfeng412/archive/2012/11/30/how-to-install-and-deploy-storm-cluster.html
按照这个文献安装相应的支持软件

参考文献
http://blog.csdn.net/u011362822/article/details/42463695
提醒我一个关于zeromq的./configure时候的错误

参考文献
http://uohzoaix.github.io/studies/2014/04/15/stormCluster/
提醒我两个关于jzmq安装时候的错误处理

在~/.bashrc中配置
#storm
export STORM_HOME="/home/jason/StormProcessing/apache-storm-1.0.1"
export PATH=$STORM_HOME/bin:$PATH

在storm的配置文件中这样去配置

 storm.zookeeper.servers:
- "192.168.60.129"
- "192.168.60.132"
- "192.168.60.133"
storm.local.dir: "/home/jason/StormProcessing/apache-storm-1.0.1/workdir" nimbus.host: "192.168.60.129" supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703

这个配置文件的格式的要求比较严格要小心

在其中的一个节点运行下面的命令,让这个节点成为nimbus:
Nimbus: 在Storm主控节点上运行"bin/storm nimbus >/dev/null 2>&1 &"启动Nimbus后台程序,并放到后台执行;

在其他的节点运行下面的命令,成为supervisor:
Supervisor: 在Storm各个工作节点上运行"bin/storm supervisor >/dev/null 2>&1 &"启动Supervisor后台程序,并放到后台执行;

在nimbus运行下面的命令去看ui监控的情况:
UI: 在Storm主控节点上运行"bin/storm ui >/dev/null 2>&1 &"启动UI后台程序,并放到后台执行,启动后可以通过http://{nimbus host}:8080观察集群的worker资源使用情况、Topologies的运行状态等信息。

[小总结]
bin/storm nimbus >/dev/null >& &
bin/storm ui >/dev/null >& &
bin/storm supervisor >/dev/null >& &
storm/bin/storm logviewer >/dev/null >& &

https://192.168.60.129:8080/
发现没什么东西

事实上我的后台程序,没运行就出错退出了。
为了看到出错的问题
我不再用后台运行了

jason@ubuntu:~/StormProcessing/apache-storm-1.0./bin$ storm nimbus
Traceback (most recent call last):
File "/home/jason/StormProcessing/apache-storm-1.0.1/bin/storm.py", line , in <module>
main()
File "/home/jason/StormProcessing/apache-storm-1.0.1/bin/storm.py", line , in main
(COMMANDS.get(COMMAND, unknown_command))(*ARGS)
File "/home/jason/StormProcessing/apache-storm-1.0.1/bin/storm.py", line , in nimbus
jvmopts = parse_args(confvalue("nimbus.childopts", cppaths)) + [
File "/home/jason/StormProcessing/apache-storm-1.0.1/bin/storm.py", line , in confvalue
p = sub.Popen(command, stdout=sub.PIPE)
File "/usr/lib/python2.7/subprocess.py", line , in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line , in _execute_child
raise child_exception
OSError: [Errno ] Exec format error
File "/home/jason/StormProcessing/apache-storm-1.0.1/bin/storm.py", line , in <module>
main()
File "/home/jason/StormProcessing/apache-storm-1.0.1/bin/storm.py", line , in main
(COMMANDS.get(COMMAND, unknown_command))(*ARGS)
File "/home/jason/StormProcessing/apache-storm-1.0.1/bin/storm.py", line , in supervisor
jvmopts = parse_args(confvalue("supervisor.childopts", cppaths)) + [
File "/home/jason/StormProcessing/apache-storm-1.0.1/bin/storm.py", line , in confvalue
p = sub.Popen(command, stdout=sub.PIPE)
File "/usr/lib/python2.7/subprocess.py", line , in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line , in _execute_child
raise child_exception

可以看到仿佛是权限或者是python的问题

那么关闭ubuntu的防火墙
ufw disable
ufw enable//重新开启防火墙

因为我没安装python本身自己带python
所以配置一下就行了
#python
export PYTHON_HOME="/usr/lib/python2.7"
export PATH=$PYTHON_HOME:$PATH

但是还是出现很多的错误根本运行不起来
而且发现虽然这些需要的脚本都在$PATH路径下
但是用sudo执行的时候还是找不到命令
有时候zookeeper根本启动不起来

所以每次运行比如
sudo ./zkServer.sh start
sudo ./zkServer.sh status
sudo ./storm nimbus
sudo ./storm supervisor
的时候都需要跑到相应的bin路径下才可以

无奈没法运行就全部重启,然后就可以看到亲爱的UI界面了

启动拓扑
storm jar allmycode.jar org.me.MyTopology arg1 arg2 arg3
allmycode.jar是包含Topology实现代码的jar包
org.me.MyTopology的main方法是Topology的入口
arg1、arg2和arg3为org.me.MyTopology执行时需要传入的参数
停止拓扑
storm kill {toponame}
其中,{toponame}为Topology提交到Storm集群时指定的Topology任务名称。

为了真实的看到效果
参考文献
http://blog.csdn.net/loloxiaoz3/article/details/19294289
按照上面的方法,下载一个例子程序
使用maven编译storm_starter源码
下载:git clone https://github.com/nathanmarz/storm-starter.git
编译:sudo mvn -f m2-pom.xml compile
打包:sudo mvn -f m2-pom.xml package
删除:sudo mvn -f m2-pom.xml clean
mvn -f 表示强制使用 m2-pom来编译

但是mvn下载的Jar包比较慢,到现在还没看到结束的迹象,估计今天看不到UI了。

向storm集群提交storm_starter中的example
提交topology:
sudo storm jar storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar storm.starter.WordCountTopology WordCount
终止topology:
storm kill WordCount

STORM_0002_在做好的zookeeper集群上搭建storm的开发环境的更多相关文章

  1. zookeeper集群的搭建以及hadoop ha的相关配置

    1.环境 centos7 hadoop2.6.5 zookeeper3.4.9 jdk1.8 master作为active主机,data1作为standby备用机,三台机器均作为数据节点,yarn资源 ...

  2. Solr集群的搭建以及使用(内涵zookeeper集群的搭建指南)

    1   什么是SolrCloud SolrCloud(solr 云)是Solr提供的分布式搜索方案,当你需要大规模,容错,分布式索引和检索能力时使用 SolrCloud.当一个系统的索引数据量少的时候 ...

  3. 大数据平台搭建-zookeeper集群的搭建

    本系列文章主要阐述大数据计算平台相关框架的搭建,包括如下内容: 基础环境安装 zookeeper集群的搭建 kafka集群的搭建 hadoop/hbase集群的搭建 spark集群的搭建 flink集 ...

  4. Docker 一步搞定 ZooKeeper 集群的搭建

    Docker 一步搞定 ZooKeeper 集群的搭建 背景 原来学习 ZK 时, 我是在本地搭建的伪集群, 虽然说使用起来没有什么问题, 但是总感觉部署起来有点麻烦. 刚好我发现了 ZK 已经有了 ...

  5. centos7下安装zookeeper&zookeeper集群的搭建

    一.centos7下安装zookeeper 1.zookeeper 下载地址 https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 2.安装步骤 ...

  6. Hadoop集群上搭建Ranger

    There are two types of people in the world. I hate both of them. Hadoop集群上搭建Ranger 在搭建Ranger工程之前,需要完 ...

  7. centos7 zookeeper集群的搭建

    说明:该集群的搭建是为了服务于solr集群,请参考我的关于solr集群搭建的博客. 1.创建solr-cloud目录 mkdir /usr/local/solr-cloud 2.将解压的apache- ...

  8. Zookeeper集群快速搭建

    Zookeeper集群快速搭建 1.cd /usr/local/zookeeper/conf(如在192.168.212.101服务器) mv zoo_sample.cfg zoo.cfg 修改con ...

  9. 转-在Mac OS上搭建Python的开发环境

    在Mac OS上搭建Python的开发环境   本文转载自:http://www.jb51.net/article/76931.htm 一. 安装python mac系统其实自带了一个python的执 ...

随机推荐

  1. PL/SQL快捷键

    F8 执行所选中的SQL语句 当光标在sql语句末尾/开头 时 按Shift  Home /Shift  End 选中该语句

  2. kvm虚拟机virt-manager启动报错

    安装kvm,用virt-manager启动时报错如下: Traceback (most recent call last):  File "/usr/share/virt-manager/v ...

  3. Android:Intent传递数据的几种类型和源码实现

    public class Intent implements Parcelable, Cloneable {   //... private String mAction; private Uri m ...

  4. 十步完全理解 SQL(转载)

    英文出处:Lukas Eder. 很多程序员视 SQL 为洪水猛兽.SQL 是一种为数不多的声明性语言,它的运行方式完全不同于我们所熟知的命令行语言.面向对象的程序语言.甚至是函数语言(尽管有些人认为 ...

  5. html 和 html5(一)(表格 | 列表 | 提交按钮 | 单选 |复选 | 框架 | 脚本 | html字符实体 )

    一.框架 使用iframe来显示目录链接页面 iframe可以显示一个目标链接的页面 目标链接的属性必须使用iframe的属性,如下实例: 实例 <iframe src="demo_i ...

  6. fragment相关

    1.鸿洋大神前两年写的,从最基础的开始详解.对常用的方法都做了精炼的总结,分上下两篇 http://blog.csdn.net/lmj623565791/article/details/3797096 ...

  7. Java异常捕获之try-catch-finally-return的执行顺序-转载

    情况1:try块中没有抛出异常try和finally块中都有return语句 public static int NoException(){ int i=10; try{ System.out.pr ...

  8. 1014 C语言文法定义与C程序的推导过程 程序:冒泡算法C程序(语法树)

    阅读并理解提供给大家的C语言文法文件. 参考该文件写出一个自己好理解版的现实版的完整版的C语言文法. 给出一段C程序,画出用上述文法产生这段C程序的完整语法树. 程序:冒泡算法C程序 点此文字查看原图 ...

  9. c#游戏 剪刀石头

    电脑using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace sh ...

  10. Alignment

    Alignment Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 14547 Accepted: 4718 Descriptio ...