We noticed that one of our Java applications that is deployed on Elastic Beanstalk has hourly service interruption. Each outage only lasts for about 40 - 60 seconds. By looking at the CloudWatch, the ELB has intermittent 5xx errors every one hour, like 09:01, 10:01, 11:01 ... After some investigations, I found it out that it … Continue reading Hourly Intermittent Elastic Beanstalk Service Interruption
Category: Linux
Double SSH Hops example
Client -ssh only--> Jumpbox00 -ssh only--> Jumpbox01 --http only-> Internal network Here is how to ssh to jumpbox01, and visit websites in internal networks from Client. 1) Ensure you have a private key that is trusted by both jumpbox00 and jumpbox01. For example, jb.pem under ~/.ssh/, then run the following command: ssh-add ~/.ssh/jb.pem 2) Add the following … Continue reading Double SSH Hops example
Run query via Sumologic API
SumoLogic query can also be run via API. Here is a bash example that I wrote to get the nginx access logs. By default it searches the logs in the past 10 minutes, but you can overwrite it by adding a parameter. Here is the script. It is also can be found in my github. #!/bin/bash … Continue reading Run query via Sumologic API
Troubleshoot high CPU usage java process
This is a real troubleshooting example that I just did yesterday for a high CPU usage java application. The application uses tomcat and runs on AWS EC2. Login into the box, and change to root user so you can see all users' process. sudo su - Install htop if you have not installed it before, the run it. … Continue reading Troubleshoot high CPU usage java process
LuaXML_lib.so: wrong ELF class: ELFCLASS32
In a recent project, we use OpenResty (Scalable Web Platform by Extending NGINX with Lua) as API gateway. Nginx hosts the webserver, and Lua script stores the logic. One of our Lua files needs LuaXml modue to parse xml files. But the module is not installed by default in OpenResty. So we get this error … Continue reading LuaXML_lib.so: wrong ELF class: ELFCLASS32