elastic-job console

Elastic job是当当开源的分布式任务调度框架,基于成熟的Quartz与Zookeeper封装。其中elastic-job-lite-console运维平台通过与zookeeper关联,实现任务的监控。

首先使用git 拉取最新的代码,版本是2.1.5 git地址 https://github.com/dangdangdotcom/elastic-job.git

进入目录elastic-job-lite 》 elastic-job-lite-console。关于运维平台的搭建,相关的文档如下

http://dangdangdotcom.github.io/elastic-job/elastic-job-lite/02-guide/web-console/

具体操作是使用maven的mvn install 打包,获得elastic-job-lite-console-{version}.tar.gz 将此文件在linux上解压缩

tar -zxvf elastic-job-lite-console-2.1.5.tar.gz 就获得了我们想要的运维平台部署代码。

切换进入。使用bin/start.sh 就可以使用ip:8899端口查看。

至此这是官方帮助文档中的几条描述,实现起来非常简单。

在此过程中,遇到以下几个坑。

1》执行bin/start.sh 出现错误bash: ./a.sh: /bin/bash^M: bad interpreter: No such file or directory

这个错误是由于在linux上这个文件的格式是dos,原因可能是由于我在windows上执行的mvn install导致的问题!

解决方法:使用vi编辑start.sh进入末行模式:set ff 显示fileformat=dos那么就可是修改如下 :set fileformat=unix 最后保存:x或:wq。此错误不再出现。

2》执行bin/start.sh 发现如下主要的错误信息:Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.model.core.LeafInfo

Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)

不知道是否是我install的时候出错了?查看该项目的java.version是1.7。我更改成了1.8并且linux上也是1.8

查找stackovflow加上了如下maven依赖到console的pom.xml中

groupId com.sun.xml.bind

artifactId jaxb-impl

version 2.2.11

groupId com.sun.xml.bind

artifactId jaxb-core

version 2.2.11

重新install 这个才算解决了。

至此,该运维平台成功启动(记得防火墙对8899端口的限制)

浏览器上输入ip:port 登陆(默认是root/root)后进入dashboard。注册需要在全局配置中

添加注册中心名称,其中注册中心地址是zookeeper部署的ip:port ,命名空间一定要与任务对应得命名空间一致,才能查看到该命名空间下的任务状态。

Zookeeper 基本安装很简单,可参考 http://www.jianshu.com/p/d0e642f5464b


启动好后,默认的ip:8899 进行访问

你可能感兴趣的:(elastic-job console)