Oracle REST Data Services (ORDS) provides web services for an Oracle Database and allows for access to the database over the web. In a recent YouTube video I showed how to use ORDS in the new Oracle Developer DB Virtual Machine and briefly mentioned how to find the running ORDS process. Let’s go into that in more detail. In this article, we will discuss how to check if ORDS is running in a standalone ORDS deployments as well as deployments on Apache Tomcat and Oracle WebLogic Server.
- Checking ORDS on Standalone Deployments
- Checking ORDS on Apache Tomcat
- Checking ORDS on Oracle WebLogic Server
- What about Windows systems?
Checking ORDS on Standalone Deployments
On a unix based system, the simplest way to check if ORDS is running is to use the jps command. This command will list all Java process that are currently running on the system. It is important to note that in order for jps to work, the JDK must be installed and the PATH environment variable must be set correctly. The jps command accepts a number of options and the most useful in this case are
-mto display the arguments passed to the
-lto display the full path name to the ords.war location. Pass that through a grep for ords to find the ords specific java process.
-v displays the arguments passed to the JVM.
jps -mlv | grep ords 8545 /home/oracle/ords/ords.war --config /home/oracle/ords_config serve --secure --port 443 -Doracle.dbtools.cmdline.home=/home/oracle/ords -Duser.language=en -Duser.region=US -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dnashorn.args=--no-deprecation-warning -Doracle.dbtools.cmdline.ShellCommand=ords -Duser.timezone=UTC
If ORDS is running in standalone mode, you should see a process with ords.war in the path. If this process is listed, then ORDS is running. Note that due to the
-v option you also see the Java option
oracle.dbtools.cmdline.home used. That should be the folder that the
ords.war is found in and should also be the distribution directory. In the above example, the distribution directory is
/home/oracle/ords/ and the ORDS command used to start ORDS was actually
/home/oracle/ords/bin/ords --config /home/oracle/ords_config serve --secure --port 443
Another approach is to use the
ps command. This command will list all processes currently running on the system. To check if ORDS is running, use the command
ps -ef | grep ords.war. If you see a process with ords.war as the command, then ORDS is running.
[oracle@localhost ~]$ ps -ef | grep ords.war oracle 8545 8516 2 21:13 pts/1 00:00:49 /home/oracle/java/jdk-11.0.17/bin/java -Doracle.dbtools.cmdline.home=/home/oracle/ords -Duser.language=en -Duser.region=US -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dnashorn.args=--no-deprecation-warning -Doracle.dbtools.cmdline.ShellCommand=ords -Duser.timezone=UTC -jar /home/oracle/ords/ords.war --config /home/oracle/ords_config serve --secure --port 443 oracle 9554 3521 0 21:42 pts/0 00:00:00 grep --color=auto ords.war
You’ll also see similar information as with the
jps command but also the
java executable used at start up too. Note that access to run
ps is not always guaranteed and it main not be available for the user you are logged in as.
One note about the command line arguments one can see for the running Java processes. It can be seen by other users. This is one of the reasons that ORDS does not accept a password as a command line option. That password would be visible to anyone able to list the running processes. Either through
Checking ORDS on Apache Tomcat
If it’s enabled, use the Tomcat manager web application, or at the very least the catalina log files, to confirm that ORDS web application is deployed and started. If not, then jps on the command line is the next logical choice.
When ORDS is deployed on Apache Tomcat, you can use the
jps command to check if the server is running and get further information about where the
ords.war might be deployed. Run
jps -mlv as before but this time grep for the
jps -mlv | grep catalina 88 org.apache.catalina.startup.Bootstrap start --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dconfig.url=/u01/oracle/properties/config -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp
The above indicates that
/usr/local/tomcat and most people use the automatic web application deployment by placing the
ords.war in the
ls -la /usr/local/tomcat/webapps/ total 92384 drwxr-xr-x 1 root root 62 Apr 11 06:40 . drwxr-xr-x 1 root root 77 Apr 11 06:40 .. drwxr-x--- 5 root root 67 Apr 11 05:38 ords -rw-r--r-- 1 root root 94599760 Apr 10 19:45 ords.war drwxr-xr-x 3 root root 45 Apr 11 05:38 ROOT
That directory listing shows the
ords.war file and that it has been exploded by Tomcat into the
ords directory. It’s not a guarantee that ORDS was deployed successfully, one would have to check the Tomcat logs, but it is a good indicator.
Checking ORDS on Oracle WebLogic Server
If it’s enabled, use the WebLogic console or WLST to confirm that ORDS web application is deployed and started.
Similar to Apache Tomcat, the Oracle WebLogic Server is a Java application so yet again, it is the
jps utility that is the starting point to get information on the server(s) running and their configuration.
jps -mvl | grep weblogic 80 weblogic.Server -Djava.security.egd=file:/dev/./urandom -Dlaunch.use.env.classpath=true -Dweblogic.Name=AdminServer -Djava.security.policy=/u01/oracle/wlserver/server/lib/weblogic.policy -Dconfig.url=/u01/oracle/properties/config -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -javaagent:/u01/oracle/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/u01/oracle/wlserver/server -Dweblogic.home=/u01/oracle/wlserver/server
The output indicates that the
/u01/oracle/wlserver/server. Unlike with Tomcat, one is not going to find a straight forward web application deployment directory under the
weblogic.home. There’s a little more digging required to check if a server is configured to deploy ORDS and we’ll use the
weblogic.Name parameter ( AdminServer in this case) to when digging deeper. The
weblogic.home just indicates where the server java application is being executed from. The server runtime configuration is being picked up separately. In the majority of installations that will be in a related
user_projects/domains directory found two levels up. For the above WLS instance that would be
That directory may have the configuration for multiple domains but quite often there is just one:
base_domain. From there you can get a little more information on how the server identified by the above
weblogic.Name. The domain configuration is persisted in
/u01/oracle/user_projects/domains/base_domain/config/config.xml and you can see there is an app-deployment configuration targetting the AdminServer.
<?xml version="1.0" encoding="UTF-8"?> <domain xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd" xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <name>base_domain</name> <domain-version>184.108.40.206.0</domain-version> ... <server> <name>AdminServer</name> <ssl> <name>AdminServer</name> <enabled>true</enabled> </ssl> <listen-address/> </server> ... <app-deployment> <name>ords</name> <target>AdminServer</target> <source-path>/u01/oracle/ords/ords.war</source-path> <staging-mode>nostage</staging-mode> </app-deployment> ... </domain>
If you see this
app-deployment configuration in place it is not a complete guarantee that ORDS successfully deployed when the server started but it is a good indication.
What about Windows systems?
The syntax for path separates might be different but the same
jps utility options apply and the relative file locations will also be the same for standalone, Tomcat and WebLogic.
In summary, the
jps utility, also known as the Java Virtual Machine Process Status Tool, that comes with your Java SE distribution is your friend. Just from the command line, it can guide you in discovering more about the ORDS instance running on your machine irrespective of deployment mode.