安装 cassandra 小记

简介:

 

这是我为公司机器上安装cassandra的小记:


The details are as follows:


 

(1)    I create a folder named cassandra-data in ~ as the data storage.


(2)    Configure the cluster name,data file directory, commitlog ,caches as follows:



edit the ~/apache-cassandra-1.0.7/conf/cassandra.yaml file ,


What I modified is as follows:


cluster_name: 'platformportal'

data_file_directories:

-          /home/portal/cassandra-data

commitlog_directory: /home/portal/cassandra-data/commitlog

saved_caches_directory: /home/portal/cassandra-data/saved_caches

 

(3)    Configure the Cassandra server’s log directory as follows:


edit the ~/apache-cassandra-1.0.7/conf/log4j-server.properties file,


Modify the log4j.appender.R.file to be /home/portal/cassandra-data/system.log

 

(4)    Start the cassandra process as follows:


cd ~/apache-cassandra-1.0.7/bin

./cassandra


(5)    Check whether the single-node ring of Cassandra cluster is working:


portal@abc :~/apache-cassandra-1.0.7/bin$ ./nodetool ring -h 172.29.54.6

Address         DC          Rack        Status State   Load            Owns    Token

  1. 172.29.54.6     datacenter1 rack1       Up     Normal  36.12 KB        100.00% 38455503507887643999897014288678782440

 


(6)    Install the ops Cassandra admin (JMX console)


I install it in ~/opscenter-2.1.2 folder



First ,since the JMX console is open to public, so we need to configure the ip address that can be reachable from other physical machine.


we edit ~/opscenter-2.1.2/conf/opscenterd.conf file ,and change the interface from 127.0.0.1 to 172.29.54.6



Second , start the admin console as follows:


cd ~/opscenter-2.1.2

./opscenter



(7)    In order to get the real-time data from Cassandra to Cassandra jmx admin ,we need to install the Cassandra agent as the bridge between cassandra node and jmx-console.


It is in ~/opscenter-2.1.2/agent folder



First ,configure it ,we run the following command:


cd ~/opscenter-2.1.2/agent/bin

./setup 172.29.54.6 172.29.54.6

After this step ,there is a file named address.yaml which will be created in the folder ~/opscenter-2.1.2/agent/conf  folder,this file manages the address that the agent “talks” with



Second ,start the agent as follows:


cd ~/opscenter-2.1.2/agent/bin

./opscenter-agent



(8)    Unluckily, I met with the following issue:



  File "build/lib/python2.7/site-packages/opscenterd/SslUtils.py", line 3, in <module>

 

          File "/home/portal/opscenter-2.1.2/lib/py-debian/2.7/amd64/OpenSSL/__init__.py", line 11, in <module>

            import rand, crypto, SSL, tsafe

        exceptions.ImportError: libssl.so.0.9.8: cannot open shared object file: No such file or directory

 

(9)    Then I need to clarify which libssl I have installed using the following command:


dpkg -l | grep libssl

 

and it shows


portal@abc:~/opscenter-2.1.2/log$ dpkg -l | grep libssl

ii  libssl1.0.0                            1.0.0e-2ubuntu4.6                       SSL shared libraries

ii  libssl1.0.0:i386                       1.0.0e-2ubuntu4.6                       SSL shared libraries

 


So the problem is clear ,we don&rsquo;t have correct version of libssl which is needed by Cassandra opsagent ,so we install the correct one:


sudo apt-get install libssl0.9.8

then ,it works.



(10)But actually, the JMX console displays no data from Cassandra node,we read the agent.log and it shows as follows:


ERROR [StompConnection receiver] 2012-08-08 00:42:40,119 failed connecting to 172.29.54.6:61620:java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)


This is because the communication between agent and opscenter is SSL secured ,so what we need to do is to remove ssl as follows:


edit ~/opscenter-2.1.2/conf/opscentered.conf, add the following line at the end of file:

use_ssl=false



 monitor the Cassandra through the JMX console: http://172.29.54.6:8888/opscenter/index.html





本文转自 charles_wang888 51CTO博客,原文链接:http://blog.51cto.com/supercharles888/980738,如需转载请自行联系原作者

目录
相关文章
|
存储 SQL 分布式计算
MongoDB、Cassandra 和 HBase 三种 NoSQL 数据库比较
Hadoop 获得了许多大数据应用的信誉,但实际情况是,NoSQL数据库是一直处于更加广泛部署和更广泛的发展中的技术。尽管选择 Hadoop 作为应用存储,相对来说更直接简单。但是,具体采用什么样的 NoSQL 数据库是个值得思考的问题,毕竟,还有超过100种的 NoSQL 数据库。
2936 0
MongoDB、Cassandra 和 HBase 三种 NoSQL 数据库比较
|
NoSQL MongoDB 数据库
cassandra vs mongoDB in 2019,如何选型
提到NoSQL数据库,MongoDB和Cassandra可能看起来很相似,但却完全不同。两者都有类似的用例,但不适用于交易数据(即记账系统)。 谁使用这些数据库? Cassandra和MongoDB两者都有强大的追随者,其中都不乏一些大牌用户 Cassandra: Cassandra,于2008年发布,已被许多组织使用,包括AppScale,Constant Contact,Digg,Facebook,IBM,Instagram,Spotify,Netflix和Reddit。
5959 1
|
存储 运维 自然语言处理
Cassandra 的过去、现在、未来
11月16日在北京,由DataFun和阿里云联合举办的首场Cassandra中文社区线下meetup,阿里云高级技术专家陈江分享了Cassandra的发展历程、优势特点、适合的使用场景、不推荐的场景,以及即将发布的4.0特性。
2246 0
Cassandra 的过去、现在、未来
|
存储 监控 NoSQL
为什么选择Cassandra
cassandra概况 为什么选择Cassandra?cassandra到底有那些令人印象深刻的特点呢?不急,我们先来看下cassandra目前的大体概况。 理论扎实,师出名门 cassandra不仅吸收了dynamo论文中的如何做分布式,如何做副本复制,故障容错等方面成功的经验,又吸取了google bigtable中的LSM单机引擎层面精华。
4638 0
|
NoSQL Apache 开发工具
Cassandra 安装部署
python版本:2.7 jdk版本:1.8 Cassandra版本:3.11.2 官网: http://cassandra.
2063 0
|
存储 NoSQL 数据库
mongodb分布式集群搭建手记
一、架构简介 目标 单机搭建mongodb分布式集群(副本集 + 分片集群),演示mongodb分布式集群的安装部署、简单操作。 说明 在同一个vm启动由两个分片组成的分布式集群,每个分片都是一个PSS(Primary-Secondary-Secondary)模式的数据副本集; Config副本集采用PSS(Primary-Secondary-Secondary)模式。
7978 0

热门文章

最新文章