-
Download Torrents in Raspberry Pi - Transmission
Download Torrents in Raspberry Pi using Transmission INSTALLATION & CONFIGURATION sudo apt install transmission-daemon sudo systemctl start transmission-daemon sudo systemctl enable transmission-daemon (auto-start on reboot) sudo nano /etc/transmission-daemon/settings.json allow your IP addre... Read More
-
Hide Tomcat Server Information on Azure App Service
Hide Tomcat Server Information on Azure App Service The default error page of Tomcat shows the Tomcat version: You could hide the version information by adding a Valve to Tomcat’s configuration file server.xml. TOMCAT VALVES A Valve element represents a component that will be inserted into the request processing pipeline for the associat... Read More
-
Log Originating Client IP on Linux App Service (Tomcat)
Log Originating Client IP on Linux App Service (Tomcat) The X-Forwarded-For (XFF) header is a de-facto standard header for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or a load balancer. When traffic is intercepted between clients and servers, server access logs contain the IP address o... Read More
-
Using Minikube on Linux (Ubuntu)
Minikube quickly sets up a local Kubernetes cluster, which is great for learning! These are the pre-requisites, as of today, as per the minikube documentation: 2 CPUs or more 2GB of free memory 20GB of free disk space Internet connection Container or virtual machine manager, such as: Docker, Hyperkit, Hyper-V, KVM, Parallels, Podman, Virtua... Read More
-
Remove Server Header from Nginx (Linux WebApp - Wordpress Image)
The Docker Image appsvcorg/wordpress-alpine-php:0.72 for WordPress uses Nginx. In order to remove the Server header of Nginx, you can follow the below steps: CREATE A DOCKERFILE FROM appsvcorg/wordpress-alpine-php:0.72 RUN apk update && apk add nginx-mod-http-headers-more COPY nginx.conf /etc/nginx/ CREATE nginx.conf file user ngin... Read More
-
Enable trace logs - Java Function App
Enable trace logs - Java Function App The Java Functions use azure-functions-java-library which uses java.util.logging for logging. You could print the logs using the following code: code snippet context.getLogger().fine("context logtest fine"); context.getLogger().finer("context logtest finer"); context.getLogger().finest("context logtest fi... Read More
-
Using opencv-python on Linux App Service
The opencv-python module in Python has certain OS level dependencies, which could be missing in certain environment or Docker images. You could obviously create your own Custom Docker Image and use that to run Python application on Azure WebApp for Containers. But that comes up with an overhead of maintaining the Docker Image. In order to use op... Read More
-
curl <3
One of the most useful command line tools which I have come across is CURL. In this blog, I will mention some of ways we can make use of curl. I will keep adding more as and when I learn. You can use -I paramter to get the HTTP response code, headers etc. The browsers can cache data so sometimes you are not sure if tha response is f... Read More
-
Detect Tomcat Version change on Azure App Service when using Auto-Update... and more
When using Auto-Update for various stacks on Azure App Service, one of the common problems is to get notified when the version changes. We could follow the official announcement page for any major changes. We can also create automation scripts to send notifications when such a change occurs. There are different ways in which this can be done. Th... Read More
-
DBCP on Azure App Service Linux (MySQL)
Many Apache projects support interaction with a relational database. Creating a new connection for each user can be time consuming (often requiring multiple seconds of clock time), in order to perform a database transaction that might take milliseconds. Opening a connection per user can be unfeasible in a publicly-hosted Internet application whe... Read More
-
Enable Tomcat Manager app on Linux WebApp on Azure
Tomcat Manager application is a simple way to deploy WAR files on Tomcat Server. Although, the default Linux WebApp which uses the Tomcat image does not have the manager app pre-installed, we can do it using the steps metioned in this blog. It should be okay to use the Manager App when running on a single instance. However, it is recommended to ... Read More
-
Download files from Azure Linux WebApp using pscp
There are multiple ways of downloading files from Azure WebApps, some of which include: FTP Kudu VFS API There is another way, which does not require you to login to the Azure Portal, and it can be used for any Docker container which has SSH enabled. Refer to the following documentation on how to configu... Read More
-
Custom JRE/JDK on Azure App Service - Windows
Here’s how you can use a Custom JRE/JDK for your Java Application deployed on Azure WebApp: STEPS Upload your JRE/JDK via FTP or you can simply upload it via the Kudu Site. If you have a direct link to the zip file, you can use the curl command to download the zip directly on the WebApp: Example: You can then extract the zip using the ... Read More
-
Using Java Flight Recorder
You can now use Java Flight Recorder on Azure App Services - Linux! Announcement Page What is JFR Java Flight Recorder (JFR) is a tool for collecting diagnostic and profiling data about a running Java application. It is integrated into the Java Virtual Machine (JVM) and causes almost no performance overhead, so it can be used even in heavi... Read More
-
Troubleshoot High Memory Issues - Java Linux WebApp
There are different ways of dealing with Memory Issues. In this blog, I would like to share some steps you can take in order to find what could be causing memory leak. It is always recommended to profile and test your application before deploying it to a Production environment. Using jVisualVM is a great way to quickly check the performance of ... Read More
-
Troubleshoot - JVM Crash - Azure WebApp - Linux
On Azure WebApp Linux, if your JVM is crashing and is unable to come up, you would see a generic “Application Error” message when trying to browse your site. In order to find what might be causing this issue, we could need to determine if the JVM is crashing. If yes, then we can collect the crash dump to find out the root cause of the issue. ST... Read More
-
Troubleshoot High CPU - Java - Azure WebApp - Linux
There are various ways to find what is leading to high CPU usage on any system. Here is something you could do while the issue is going on and you are seeing high CPU usage by a certain Java application hosted on Azure Linux WebApp: Install procps: The Docker Images for the Java Linux WebApps are based on alpine. You can use apk to install pro... Read More
-
Configure IonCube Loader - PHP Linux App Service
Steps: Download the ioncube library and extract it under /home/site directory: wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz tar xvfz ioncube_loaders_lin_x86-64.tar.gz Create a php.ini file under /home/site directory with the following content: zend_extension=/home/site/ioncube/ioncube_loader_... Read More
-
Deploy Spring Boot Application On Azure WebApp via ZipDeploy
Here is one of the simplest ways to deploy a Spring Boot application (JAR with embedded Tomcat) to Azure WebApp (Windows) Steps: Create zip file which contains the JAR file and a web.config Here is a sample web.config which you can use: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <ha... Read More
-
Deploy Azure Java Function App (Windows) via GitHub Actions
Deploy a Java Function App on Azure using GitHub Actions: Create a Java Function App. (You can create it from the Azure Portal) Create a RBAC rule using the following command. We will use this later to authorize GitHub to deploy to Function App. Copy the JSON output from this command: az ad sp create-for-rbac --name "myApp" --r... Read More
-
Deploy NodeJS WebApp via GitHub Actions
Steps to deploy a NodeJS application on Azure App Service GitHub Actions provides a simple way to setting up a pipeline to build and deploy your applications. There are pre-configured / templates to deploy directly to Azure App Services which makes it even easier. The major steps are: Create a new repository on GitHub and push your co... Read More
-
Access SQL Database via Azure Function App - Python
Sample Code - Access Azure SQL Database via Python Function App import logging import azure.functions as func import pypyodbc as pyodbc def main(req: func.HttpRequest) -> func.HttpResponse: logging.info('Python HTTP trigger function processed a request.') server = 'tcp:mydb.database.windows.net' database = 'mydb' usernam... Read More
-
Stop and remove all Docker containers at once
Here is a way on how you can stop and remove all containers which are currenly running: - Stop all containers: docker stop $(docker ps -a -q) - Remove all stopped contains: docker rm $(docker ps -a -q) Read More
-
Create a post in Jekyll via command line
Jekyll needs all the posts to be of a certain format: YEAR-MONTH-DAY-NAME-OF-THE-POST.md It can easily get frustrating to do it manually everytime. I found a really great way to create posts using jekyll-compose: https://github.com/jekyll/jekyll-compose Steps: Add the following to the gemfile: gem 'jekyll-compose', group: [:jekyll_plugins] ... Read More
-
Collecting Thread Dump on Azure WebApp
Below are some of the ways using which you can collect Thread Dump on Azure WebApps (Windows) Using Diagnose & Solve Problems blade of the WebApp: As of now, this works for the Java Versions for which JDK is available on the platform. You can directly go to “Diagnose & Solve Problems” blade and search for “Thread Dump” whi... Read More
-
Access Azure SQL Database using Managed Identity - PHP WebApp
Sample code to access Azure SQL Database from Azure WebApp using Managed Identity How to get the access token Azure WebApp has two environment variables which are used for Managed Identity: MSI_ENDPOINT MSI_SECRET The access token can be retrieved by sending a GET request to the MSI_ENDPOINT with the required para... Read More
-
First Blog Post!
This is my first blog post. Read More