Introduction
This specific article will show how to check a running service or process. It focus on checking Wildfly Java Application Server whether it is running or not. It is useful to check the status of the service after starting it. There are a few steps for checking Wildfly Java Application Server to make sure that it is running normally.
Steps for Checking Wildfly Java Application Server’s service or process
Below, those steps for checking the status is in the list as follow :
1. Checking the port listening for incoming request. After successfully running Wildfly Java Application Server, there will be several ports listening for requests. By default, those ports are 8080, 9990 and 8443. The command pattern to check for a listening port by also displaying its pid is in the following pattern :
netstat -tulpn | grep port_numbre
The following is an example for executing the above command to check the listening port :
root@hostname ~# netstat -tulpn | grep 8080 tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 6001/java root@hostname ~#
The above output command is for checking the default service for requesting to access Java-based web application running in Wildfly. That web application must exist at first through a deployment process in Wildfly Java Application Server.
root@hostname ~# netstat -tulpn | grep 9990 tcp 0 0 0.0.0.0:9990 0.0.0.0:* LISTEN 6001/java root@hostname ~#
Continue on checking the associated port, the above output command is showing the checking process of port 9990. It is a specific port by default for listening request to access Wildfly administration console webpage.
root@hostname ~# netstat -tulpn | grep 8443 tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 6001/java root@hostname ~#
The last port is port 8443. It is a secure port for accessing deployed application in Wildfly by default. Make sure that all those ports are currently listening for incoming requests.
2. Another step is for checking the status of the process. There are specific command for doing it with using the following pattern :
ps aux | grep filter_character
The following is the execution of the above command to show it as an example :
root@hostname ~# ps aux | grep wildfly root 5953 0.0 0.0 70632 3912 pts/8 S 06:00 0:00 runuser wildfly -l /opt/wildfly-17.0.1.Final/bin/standalone.sh wildfly 5954 0.0 0.0 18504 3048 pts/8 S 06:00 0:00 -bash /opt/wildfly-17.0.1.Final/bin/standalone.sh wildfly 6001 0.6 2.2 2251624 368804 pts/8 Sl 06:00 0:18 java -D[Standalone] -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/wildfly-17.0.1.Final/standalone/log/server.log -Dlogging.configuration=file:/opt/wildfly-17.0.1.Final/standalone/configuration/logging.properties -jar /opt/wildfly-17.0.1.Final/jboss-modules.jar -mp /opt/wildfly-17.0.1.Final/modules org.jboss.as.standalone -Djboss.home.dir=/opt/wildfly-17.0.1.Final -Djboss.server.base.dir=/opt/wildfly-17.0.1.Final/standalone root 12496 0.0 0.0 23960 1088 pts/8 S+ 06:45 0:00 grep wildfly root@hostname ~#
root@hostname ~# ps aux | grep 6001 wildfly 6001 0.5 2.2 2251624 368804 pts/8 Sl 06:00 0:19 java -D[Standalone] -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/wildfly-17.0.1.Final/standalone/log/server.log -Dlogging.configuration=file:/opt/wildfly-17.0.1.Final/standalone/configuration/logging.properties -jar /opt/wildfly-17.0.1.Final/jboss-modules.jar -mp /opt/wildfly-17.0.1.Final/modules org.jboss.as.standalone -Djboss.home.dir=/opt/wildfly-17.0.1.Final -Djboss.server.base.dir=/opt/wildfly-17.0.1.Final/standalone root 12923 0.0 0.0 23960 1000 pts/8 S+ 06:54 0:00 grep 6001 root@hostname ~#
As in the above output displays, there are several filter_character in the above example. It is either using the PID of the process of ‘6001’ or using part of the process name itself, ‘wildfly. Both of it shows a process of running Wildfly Java Application Server.
2 thoughts on “How to Check Wildfly Java Application Server running service or process”