Archive for category Howto

(Fixed) I/O error trying to sync with MASTER: connection lost

Error:

[2162] 26 Aug 15:26:26.795 # I/O error trying to sync with MASTER: connection lost

Above error happened when there is poor network connection, and you do the slave sync first time.

Possible Solution: increase slave buffer from 256m 64m 60 to 512M 128m 120

x.x.x.x:6379> config get client-output-buffer-limit
1) “client-output-buffer-limit”
2) “normal 0 0 0 slave 268435456 67108864 60 pubsub 33554432 8388608 60”
Read the rest of this entry »

No Comments

Install ZeroMQ plugin for MySQL

Following steps in CentOS 6.x

Download cmake , use the binary one. such as: cmake-3.2.3-Linux-x86_64.sh
http://www.cmake.org/download/

Install Cmake
chmod +x cmake-3.2.3-Linux-x86_64.sh
./cmake-3.2.3-Linux-x86_64.sh

Get mysql zeromq plugin:
git clone https://github.com/netkiller/mysql-zmq-plugin.git
Read the rest of this entry »

No Comments

OS Tuning tips for Hadoop Cluster

1.Decrease swappiness.
Reason:
A value from 0 to 100 which controls the degree to which the system swaps. A high value prioritizes system performance, aggressively swapping processes out of physical memory when they are not active. A low value prioritizes interactivity and avoids swapping processes out of physical memory for as long as possible, which decreases response latency. The default value is 60.

Default value: 60
Recommend value: 5
Online Change: Y
Action:
# update online
echo 5 > /proc/sys/vm/swappiness

# update permanently , edit /etc/sysctl.conf and add following line:
vm.swappiness = 5
Read the rest of this entry »

No Comments

Migrate existing hadoop to CDH

Don’t need to sell CDH’s benefits. you should know it before want to migrate 🙂

Very Important, The following has been tested in my lab, all goes fine. can’t grantee if also works for you.
I migrate from Apache Hadoop 2.2 to CDH 5.3 or 5.4 all works.

## Backup namenode
# cd /mnt/hadoop/hdfs/name
# tar -cvf /root/nn_backup_data.tar .

.
./current/fsimage
..
./current/edits
./image/
./image/fsimage

## Install CDH WITHOUT create any service.
Read the rest of this entry »

No Comments

How to upgrade WAP4400N firmware from 1.2.14 to 1.2.19

Seems it’s a old wireless Router. no new firmware released now.

Why I want to upgrade firmeware ? just for fun. didn’t feel much improvement. 🙂
Just got a official link
http://osdn.jp/projects/sfnet_officiallinksysfirmware/downloads/wap4400n/1.2.19/WAP4400N_GPL_v1.2.19.tar.bz2/

I had to use an GCC 3.x box. so I choose CentOS 4.8. so old.

Download firmware from above link, following the cross compile guide. will be straight forward.
Packages installed: gcc bison flex gcc-c++ zlib-devel
After a looong compile. got the new firemware 1.2.19.

Upgrade by your own risk 🙂

Get the firmware: http://www.linuxdict.com/soft/wap4400n_v1219.img

No Comments

Howto: Restore VG with LVM backup.

Like cbr in VxVM, LVM has also backup in /etc/lvm/archive/, so if you accidentally remove VG, or VG got destroyed. you can try following procedure.

Note: better do disk2disk copy before doing following. No grantee for your data.

[root@mytesthost:~]# cd /etc/lvm/archive/

[root@mytesthost:/etc/lvm/archive]# ls -lart .
total 36
-rw——- 1 root root 919 Oct 22 13:34 VG-data_00000-1897227548.vg
-rw——- 1 root root 923 Oct 22 13:51 VG-data_00001-659586034.vg
Read the rest of this entry »

,

No Comments

Solution: how to use perl convert XLSX to csv

We need xls2csv and Spreadsheet::ParseXLSX
get xls2csv from cpan
https://metacpan.org/release/Spreadsheet-ParseXLSX

Make modification on xls2csv

## add option -t means type. xls or xlsx.
< getopts('x:b:t:c:a:qshvWw:n:f', %O); Read the rest of this entry »

No Comments

Solution: how to use perl convert XLSX to csv

We need xls2csv and Spreadsheet::ParseXLSX
get xls2csv from cpan
https://metacpan.org/release/Spreadsheet-ParseXLSX

Make modification on xls2csv

## add option -t means type. xls or xlsx.
< getopts('x:b:t:c:a:qshvWw:n:f', \%O); Read the rest of this entry »

No Comments

update single esxi host from 5.1 to 5.5

1. download the latest esxi offline bundle.
ESXi 5.5 Update 1 Offline Bundle
File size: 624 MB File type: zip

2. upload the offline bundle to esxi host with client or scp

3. update the esxi with ssh
~ # esxcli software profile update -d /vmfs/volumes/vmdata/iso/update-from-esxi5.5-5.5_update01.zip -p ESXi-5.5.0-20140302001-standard
Update Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
VIBs Installed: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.550.0.0.1331820 …
VIBs Removed: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.510.0.0.799733 …

Btw, -p means profile name. you can get the profile name from offline bundle zip. file. update-from-esxi5.5-5.5_update01.zip->metadata.zip->profiles

,

No Comments

Install Virtualbox 4.3.10 Addons for RHEL7

When trying to play new Redhat release, RHEL7 as my working desktop.
You may hit following error when you install Virtualbox addons


/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeMapUser’:
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1542:26: error: ‘struct mm_struct’ has no member named ‘numa_next_reset’
pTask->mm->numa_next_reset = jiffies + 0x7fffffffffffffffUL;
^
make[2]: *** [/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxguest] Error 2

you need update memobj-r0drv-linux.c,
tips: you can quick cp /tmp/vbox.0 out when it decompress completed. then copy the new file in.
Ref: https://www.virtualbox.org/ticket/12638

No Comments