View Post

Ubiquity Unifi cannot locate Java Home

After installing ubiquity unifi, you may face error saying that the UniFi fail to start because it fail to locate java home; the solution is simple which just required to edit the JAVA_HOME on the init script : $ vim /etc/init.d/unifi Find the JAVA_HOME=/usr/lib/jvm//usr/lib/jvm/java-7-openjdk-amd64 and add your instance architecture type after that string. For example : JAVA 8 : JAVA_HOME=/usr/lib/jvm/java-8-oracle JAVA 7 …

View Post

Repair UniFi mongodb database

Suddenly got an error today, the UniFi portal can’t be accessed even though i check at the server the service is running. Have tried to restart both the service and the server itself but still nothing, checking the error log on server show nothing suspicious. Checking the netstat also show java indeed is running on port 8443 Before you tried …

How to chroot ssh user using Jailkit

Jailkit is a set of utilities to limit user accounts to specific files using chroot() and or specific commands. Jailkit is known to be used in network security appliances from several leading IT security firms, internet servers from several large enterprise organizations, internet servers from internet service providers, as well as many smaller companies and private users that need to secure …

SSHD error: buffer_get_ret: trying to get more bytes 257 than in buffer 76

If you have run similar error in your /var/log/auth : Jun 28 08:01:06 server sshd[2484]: error: buffer_get_ret: trying to get more bytes 257 than in buffer 76 Jun 28 08:01:06 server sshd[2484]: error: buffer_get_string_ret: buffer_get failed Jun 28 08:01:06 server sshd[2484]: error: buffer_get_bignum2_ret: invalid bignum Check your .ssh/authorized_keys file and make sure your key is in one line only, start …

View Post

Install newrelic nginx plugin on Ubuntu

Add nginx repository to your /etc/apt/sources.list (replace codename with your ubuntu codename ex: 14.04 – trusty ): Download nginx PGP key and add it to your server (eliminate warnings about missing PGP key during installation) : Update your repository and install the plugin : Insert your newrelic licence key on your newrelic nginx plugin page: And finally start your agent with …

View Post

Linux list file & folder size, sort by size

Let’s say i have a large number of files stored in /var/www directory. How do I sort and print sizes using du -h command under Ubuntu Linux LTS version 14.04 or any other Linux distributions? The code is : To list disk usage and sort :