unable to start mongodb local server

Recently I explore mongoDB document database using multinode cluster, somehow, after I turn off the machine, I got the following errors

Address already in use for socket:

I found some related articles, this and that, and the following answer by Sacha is work for me,

In this case, type the following command

ps wuax | grep mongo

You should see something that looks like this

User           31936   0.5 0.4 2719784 35624   ?? S     7:34pm   0:09.98 mongod
User           31945   0.0 0.0 2423368   184 s000 R+   8:24pm   0:00.00 grep mongo

Now enter the kill command for the mongod instance (31936 in this case):

kill 31936

MYSQL ERROR 1045 (28000): Access denied

When accessing mysql from phpmyadmin, suddenly it fails, and it shows warning Error 1045, after reading some tutorial and tips, I followed instruction from https://help.ubuntu.com/community/MysqlPasswordReset and find in ubuntuforum, posted by Senior_Buckethed, then i rewrite this for reminder and the benefit for anyone else who read this:

First I stopped the mysql daemon

sudo /etc/init.d/mysql stop

then I restarted the mysql daemon process using the –skip-grant-tables option:

sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &

I then restart mysql client:

mysql -u root

I then used this command from the mysql prompt to be able to change password:


I now reset password with:

SET PASSWORD FOR root@'localhost' = PASSWORD('xxxxxxxx');

where xxxxxxxx is my password.
The instructions now tell me that since I have a root account, I should use this command to be able to connect from anywhere:

UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';

Once you get a successful message, flush privileges:


Then stop and restart the mysql daemon:

sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start

I then log into mysql with the following command:

tid@ubuntu:~$ mysql -u root -p

when it should ask you for a password. Once entered, you should be logged into mysql as root:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 47
Server version: 5.5.29-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

and testing, I again enter

tid@ubuntu:~$ mysql -u root -p
Enter password:

And I log into mysql.

jzmq does not build in ubuntu 12.04

Its been working flawlessly on ubuntu 11 and 10, but once we move the env to 12.04, the compilation failed on “make“:

ubuntu@ip-10-72-110-107:~/zeromq-jzmq-fe47a77$ make
Making all in src
make[1]: Entering directory /home/ubuntu/zeromq-jzmq-fe47a77/src' make[1]: *** No rule to make targetclassdist_noinst.stamp’, needed by org/zeromq/ZMQ.class'. Stop. make[1]: Leaving directory/home/ubuntu/zeromq-jzmq-fe47a77/src’
make: *** [all-recursive] Error 1

and here is the solution

Detail step on Ubuntu 12.04

touch src/classdist_noinst.stamp
cd src/
CLASSPATH=.:./.:$CLASSPATH javac -d . org/zeromq/ZMQ.java org/zeromq/App.java org/zeromq/ZMQForwarder.java org/zeromq/EmbeddedLibraryTools.java org/zeromq/ZMQQueue.java org/zeromq/ZMQStreamer.java org/zeromq/ZMQException.java
cd ..

Another solution :

It looks like automake used to use classdist_noinst.stamp as a flag file, and has since switched toclassnoinst.stamp.

Changing classdist_noinst.stamp to classnoinst.stamp in src/Makefile.am and then re-running./autogen.sh seems to fix the issue, though I’m not sure how to handle that in a way that works for all versions of automake.


Installing package (“forecast”) in R

I already have RHive installed, then for the next step, I woul like try to install forecast package of R. This is my share thought while installing forecast package in R

1. Open R shell

$ sudo R

2. In the R shell, install forecast package

> install.packages(“forecast”)

while installing forecast package, in the console will print this following information

” also installing the dependencies ‘quadprog’, ‘tseries’, ‘fracdiff’, ‘RcppArmadillo’ ”

However, i found some problem, for example

  • Cannot find /Install Rcpp
    Solution : install packages Rcpp inside R shell  : > install.packages(“Rcpp”)
  • Cannot find some compiler

    /usr/bin/ld: cannot find -llapack
    /usr/bin/ld: cannot find -lblas

  • Cannot install RcppArmadillo
    Solution : install packages RcppArmadillo inside R shell –> install.packages(“RcppArmadillo”)
  • RcppArmadillo cannot be installed
    solution : try to install this package : $ sudo apt-get install r-base-dev , then once again try to install RcppArmadillo inside R shell

This following step will be the best practice for installing packages (“forecast”) in R (version 3.0.2)

  1. Install / re install specific version of R
  2. Install this following packages, by following these step
  • Go to R shell
  • $ sudo R
  • > install.packages(“Rcpp”)
  • > install.packages(“RcppArmadillo”)
  • > install.packages(“quadprog”)
  • > install.packages(“fracdiff”)
  • > install.packages(“forecast”)

Note : when installing package forecast also installing the dependencies ‘quadprog’, ‘tseries’, ‘fracdiff’, ‘RcppArmadillo’

Connecting R with Hive (RHive)

Previously, you have to install Rhive package in R, you can follow this post

Running RHive

In the R Console

> library(RHive)
> Sys.setenv(HIVE_HOME=”/usr/local/hive”)
> Sys.setenv(HADOOP_HOME=”/usr/local/hadoop”)
> rhive.init()
> rhive.connect(“ipaddress of hive server”)


> rhive.connect(“localhost”)
> rhive.connect(“


> rhiveConnection<-rhive.connect(“ipaddress of hive server”)
> rhive.init()

try hive query in rhive

> rhive.query(“<hiveQL-query>”)


> rhive.query(“show databases”)

close connection

> rhive.close()

Installing RHive in Ubuntu 12.04

I install RHive using this environment :

  1. OS : Ubuntu 12.04
  2. Java : 1.7. update 21
  3. Hadoop : 1.3
  4. Hive : 0.11.0
  5. R : 3.0.2

installing r
source : http://craig-russell.co.uk/2012/05/08/install-r-on-ubuntu.html#.Ub6yY3UW0ak

list of r mirror : http://cran.r-project.org/mirrors.html


1. type these command in terminal
$ gpg –keyserver keyserver.ubuntu.com –recv-key E084DAB9
$ gpg -a –export E084DAB9 | sudo apt-key add –

2. edit sources.list (/etc/apt/sources.list) and add this following line
deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu precise/

3. install r
$ sudo apt-get update
$ sudo apt-get install r-base

5. Installing rJava
– installing from aptitude
$ sudo apt-get install r-cran-rjava

6. installing rserver
– installing from aptitude
$ sudo apt-get install r-cran-rserve

7. Add package RHive in R
– run R
$ R (or alternative : $ sudo R)
– in R shell, install RHive package, by run these
> install.packages(“rJava”)
> install.packages (“RHive”)

Alternative (simple step):
Directly install RHive inside R shell
1. Configure Java
$ R CMD javareconf -e
2. run R
$ R → or alternative
$ sudo R
3. install RHive package, type this command in R shell
> install.packages(“RHive”)

Next : connecting R with Hive

install everpad (evernote) in Linux 12.04

I reblogged this tutorial from this site :

install everpad (evernote client) in Ubuntu 13.10

Everpad is an unofficial Evernote client for Linux, it syncs your Linux machine much the way the native Evernote programs do with Windows and Mac.

Everpad is well integrated with Ubuntu Unity Desktop, it supports indicator applet and unity lens. It also works great with other DE, include Xfce and Gnome.

Install Everpad:

Press Ctrl+Alt+T on your keyboard to open terminal. When it opens, run command below to add the PPA:

sudo add-apt-repository ppa:nvbn-rm/ppa

Then update and install this app:

sudo apt-get update; sudo apt-get install everpad

Once installed, open Everpad from Unity Dash.