Apr 18, 2013

java: invalid flag: -target=1.6 intellij idea

When I ran my test cases, I got this message "error: java: invalid flag: -target=1.6". I search this -"target=1.6" phrase in my project. So I re installed Intellij idea and removed .idea directory and .iml file. But I got same messages.
Finally I solved this problem by removing Additional command line parameters of java compiler.


Apr 11, 2013

How to add new node to an existing Aerospike Cluster - Using multicast

Modify /etc/citrusleaf/citrusleaf.conf as my example.
network {
service {
address any
port 3000
reuse-address
network-interface-name bond0x #If you use non standard interface name, Use this config.
#standard interface e.g. eth0, bond0, WLAN0.
}
heartbeat {
mode multicast
address 239.1.99.108
port 9918
interface-address 172.28.206.72 #You must set this config,
#if you wnat to add new node to an existing cluster.
#Each node must have unique ip address!!!
#Just set this config as node's ip addres.
interval 150
timeout 15
}
fabric {
address any
port 3001
}
info {
address any
port 3003
}
}
view raw citrusleaf.conf hosted with ❤ by GitHub

After modifying just start new node, it will be added an existing cluster automatically. You can confirm it on /var/log/citrusleaf.log with the following message.
Apr 11 2013 08:10:42 GMT: INFO (info): (base/thr_info.c:3078)  migrates in progress ( 1426 , 0 ) ::: ClusterSize 2 ::: objects 1
view raw gistfile1.md hosted with ❤ by GitHub


Tip(?).
I changed ip address to 172.28.206.73 - it's wrong address -,  after I got succeeded with above configuration. So I fixed it to 172.28.206.72 and restarted node. But I got some non normal message.
I issued the command and failed to get expected result - ClusterSize 2 -.
Apr 11 2013 05:17:23 GMT: INFO (paxos): (fabric/paxos.c:1948) Cluster Integrity Check: Detected succession list discrepancy between node bb9f5e6171cb190 and self bb935d8171cb190
Apr 11 2013 05:17:23 GMT: INFO (paxos): (fabric/paxos.c:1990) CLUSTER INTEGRITY FAULT. [Phase 1 of 2] To fix, issue this command across all nodes:  dun:nodes=bb9f5e6171cb190
Apr 11 2013 05:17:24 GMT: INFO (info): (base/thr_info.c:3071)  system memory: free 12087228kb ( 99 percent free )
Apr 11 2013 05:17:24 GMT: INFO (info): (base/thr_info.c:3078)  migrates in progress ( 0 , 0 ) ::: ClusterSize 1 ::: objects 0

$ clinfo -v 'dun:nodes=bb9f5e6171cb190'

Apr 11 2013 08:26:27 GMT: INFO (info): (base/thr_info.c:3078)  migrates in progress ( 0 , 0 ) ::: ClusterSize 1 ::: objects 1
view raw gistfile1.md hosted with ❤ by GitHub

I fixed this event by restarting all nodes.

Install and Run Aerospike Community Edition on CentOS 6.2

This installation is just for CentOS 6.2. If you use other OS like Ubuntu, please see Aerospike Standard Installation.

Step 1. Download Aerospike Database Server rpm packages
You can download here.

Step 2. Untar file
$ tar -xzf citrusleaf-community-server-2.6.0-el6.tgz


Step 3. Install the Aerospike Server
$ sudo rpm -i citrusleaf-community-tools-2.6.0-1.el6.x86_64.rpm
$ sudo rpm -i citrusleaf-community-server-2.6.0-1.el6.x86_64.rpm


Step 4. Run the Aerospike Server for Testing
$ sudo /etc/init.d/citrusleaf start
[sudo] password for me:
Starting citrusleaf: [ OK ]
$ sudo /etc/init.d/citrusleaf status
cld は停止しています
view raw .sh hosted with ❤ by GitHub

Oops! I got a error message. It means "CLD is stopped!".  Let me see the log.
Apr 11 2013 02:58:17 GMT: WARNING (cf:misc): (id.c:163) can't get physical address, tried eth, bond, wlan. fatal: 19 No such device
Apr 11 2013 02:58:17 GMT: CRITICAL GLOBAL (config): (base/cfg.c:687) could not get unique id and/or ip address
critical error: backtrace: frame 0 /usr/bin/cld() [0x46d3ff]
critical error: backtrace: frame 1 /usr/bin/cld() [0x406f2f]
critical error: backtrace: frame 2 /usr/bin/cld() [0x403b8f]
critical error: backtrace: frame 3 /lib64/libc.so.6(__libc_start_main+0xfd) [0x3212a1ecdd]
critical error: backtrace: frame 4 /usr/bin/cld() [0x4036a9]

Aha! Aerospike can't get ip address by eth, bond, wlan. Wait! my network interface name is "bond0.2032". If they use regular expression, it would be solved. But I can't fix it, so I changed my configuration file - /etc/citrusleaf/citrusleaf.conf - as blow. I just added network-interface-name item.

......

network {
        service {
                address any
                port 3000
                reuse-address
                network-interface-name bond0.2032

......

I ran it again and got succeeded.
$ sudo /etc/init.d/citrusleaf status
cld (pid 19246) を実行中...
[bae_joongjin@atlas-proxy01 ~]$ sudo grep cake /var/log/citrusleaf.log
Apr 11 2013 04:18:24 GMT: INFO (as): (base/as.c:527) service ready: soon there will be cake!
view raw successStart.sh hosted with ❤ by GitHub


Step 5. Verify Installation
I used the Aerospike command line interface tool to verity installation. It is installed as /opt/citrusleaf/bin/cli and lined in /usr/bin/cli. So you can use it normally.
$ cli -h 127.0.0.1 -n test -o set -k Aerospike -b name -v "Aerospike, Inc."
succeeded: key = Aerospike set= bin= name value= Aerospike, Inc.
$ cli -h 127.0.0.1 -n test -o set -k Aerospike -b address -v "Mountain View, CA 94043"
succeeded: key = Aerospike set= bin= address value= Mountain View, CA 94043
$ cli -h 127.0.0.1 -n test -o set -k Aerospike -b email -v "info@aerospike.com"
succeeded: key = Aerospike set= bin= email value= info@aerospike.com
$ cli -h 127.0.0.1 -n test -o get -k Aerospike
{'email': 'info@aerospike.com', 'name': 'Aerospike, Inc.', 'address': 'Mountain View, CA 94043'}


It's simple, right?

Apr 10, 2013

How to install Jenkins and plugins offline.

I tried to the following commands that are introduced on Installing Jenkins on Red Hat distributions.
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins


But I got failed. This server is not connected to internet. So I downloaded rpm package from RedHat Linux RPM packages for Jenkins and git, git-client plugins from Jenkins plugins download site to my MBA. And I uploaded them to the server and executed as blow.

sudo yum install jenkins-1.510-1.1.noarch.rpm
cp /my/local/git*.hpi /var/lib/jenkins/plugins
sudo chown jenkins:jenkins /var/lib/jenkins/plugins/git*.hpi
sudo service jenkins start