In this method we will start and run Falcon Deploy web application as an operating system service using the Tomcat Server bundled with Falcon Deploy WAR file. This method does not require you to install or configure Tomcat or any other webserver or servlet container.
The checks below are done as
JAVA_HOME environment variables are set.
# Check that you are logged in as 'falcon' user > id uid=11777(falcon) gid=11777(deploy) groups=11777(deploy),10(wheel) # Check FALCON_HOME is set. > echo $FALCON_HOME /falcon_deploy/app # Check ORACLE_HOME is set. echo $ORACLE_HOME /u01/app/oracle/product/instantclient_12_2 # Check LD_LIBRARY_PATH is set. echo $LD_LIBRARY_PATH /u01/app/oracle/product/instantclient_12_2 # Check JAVA_HOME is set. echo $JAVA_HOME /usr/lib/jvm/jre
FALCON_HOME does not return the above value, refer to pre-installation document to complete the setup.
sqlplus is in the path.
> sqlplus SQL*Plus: Release 18.104.22.168.0 Production on Wed Oct 17 17:39:49 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved. Enter user-name:
sqlplus is not working, check that you have completed the Oracle Client installation. If you have installed the Oracle full client it comes with
sqlplus and is usually in the
$ORACLE_HOME/bin directory. If you have installed the Oracle Instant Client, you have to download and install
sqlplus separately. In this case,
sqlplus can be in the root folder of
java is in the path.
> java -version openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
Copy the downloaded falcon-deploy-ver.war to
FALCON_HOME directory on the server. Once copied, update the permission of the WAR file. This step ensures WAR is executable and is accessible only to
falcon user and
> cd /falcon_deploy/app > ls -ltr -rwxr--r-- 1 root deploy 53387165 Oct 23 17:25 falcon-deploy-1.0.war > sudo chown falcon:deploy falcon-deploy-1.0.war > sudo chmod 770 falcon-deploy-1.0.war > ls -ltr falcon-deploy-1.0.war -rwxrwx--- 1 falcon deploy 53387165 Oct 23 17:25 falcon-deploy-1.0.war
Install and run using bundled Tomcat Server as an Operating System Service
The steps below are for a Linux operating system. Refer to your operating system manual for equivalent steps or commands.
Falcon Deploy can be installed and run as a Unix/Linux service using
systemd. This method makes it very easy to install and manage Falcon Deploy in production environments.
Here, we cover installation as a systemd service. This method is the successor to the popular init system and is now being used by many modern Linux distributions.
Create a file named
/etc/systemd/system directory. Here is an example configuration. The service can accept a wide variety of configuration. Refer to your operating system manual page for customizing your configuration.
[Unit] Description=Falcon Deploy After=syslog.target network.target [Service] User=falcon Group=deploy Environment=ORACLE_HOME=/u01/app/oracle/product/instantclient_12_2 Environment=LD_LIBRARY_PATH=/u01/app/oracle/product/instantclient_12_2 Environment=FALCON_HOME=/falcon_deploy/app Environment=JAVA_HOME=/usr/lib/jvm/jre Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -server -Xms512m -Xmx1024m -XX:+UseParallelGC' ExecStart=/falcon_deploy/app/falcon-deploy-1.0.war SuccessExitStatus=143 UMask=2007 [Install] WantedBy=multi-user.target
- Description – A free-form string describing the unit. This is intended for use in UIs to show descriptive information along with the unit name. The description should contain a meaningful name usually describing the service.
- After – This option ensures that the configured unit is started after the listed unit finished starting up.
- User ‐ The operating system user.
- Group ‐ The operating system group.
- Environment – ORACLE_HOME ‐ The location of the installed Oracle Client software.
- Environment – LD_LIBRARY_PATH ‐ The location of the installed Oracle Client software libraries.
- Environment – FALCON_HOME ‐ This parameter is required for successful startup of the application.
- Environment – JAVA_HOME ‐ The location of JRE. This can also be the JDK home path.
- Environment – JAVA_OPTS ‐ Here we specify the Java virtual machine (JVM) options. These are recommended and some are for optimal performance of the Java application. You may have to adjust the
-Xms(Initial Java heap size) and
-Xmx(Maximum Java heap size) based on the available RAM and the load on the system.
- ExecStart ‐ Command that is executed when this service starts.
- SuccessExitStatus ‐ Takes a list of exit status definitions that, when returned by the main service process, will be considered successful termination. This is in addition to the normal successful exit code 0 and the signals SIGHUP, SIGINT, SIGTERM, and SIGPIPE.
- UMask ‐ Set the umask to 2007 so all files created in the
falcon_deploy*directories have the group set to
deployand no permissions to users outside the group.
- WantedBy ‐ Units that require this service unit. Most daemons are grouped under
multi-user.target, and it requires
basic.targetto be up. This means that all services grouped under basic.target will be started before the ones in multi-user.target
The common configuration items are configured in the generic
[Install] sections. The service specific configuration options are configured in the
Notify systemd of new service file
After service is configured, we have to notify systemd of new service file. Execute the below command to complete the notification.
> sudo systemctl daemon-reload
Enable auto start on system boot.
> sudo systemctl enable falcon.service
Start Falcon Service
falcon user, start the service and check the output for successful startup of the service.
# Start the service > sudo systemctl start falcon.service # Check the service status > sudo systemctl status falcon.service ● falcon.service - Falcon Deploy Loaded: loaded (/etc/systemd/system/falcon.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2018-10-17 21:40:46 UTC; 22min ago Main PID: 5837 (falcon-deploy-1.0.war) CGroup: /system.slice/falcon.service ├─5837 /bin/bash /falcon_deploy/app/falcon-deploy-1.0.war └─5851 /usr/bin/java -Dsun.misc.URLClassPath.disableJarChecking=true -jar /falcon_deploy/app/falcon-deploy-1.0.war # Check the log > sudo journalctl -f -u falcon.service Oct 17 21:40:46 ip-10-0-1-248.ec2.internal systemd: Started Falcon Deploy. Oct 17 21:40:46 ip-10-0-1-248.ec2.internal systemd: Starting Falcon Deploy... Oct 17 21:40:49 ip-10-0-1-248.ec2.internal falcon-deploy-1.0.war: 21:40:49.138 [main] INFO com.Falcon.FalconApplication - Starting FalconApplication v1.0 on ip-10-0-1-248.ec2.internal with PID 5851 (/falcon_deploy/app/falcon-deploy-1.0.war started by falcon in /falcon_deploy/app) Oct 17 21:41:00 ip-10-0-1-248.ec2.internal falcon-deploy-1.0.war: 21:41:00.054 [main] INFO com.Falcon.FalconApplication - Started FalconApplication in 12.15 seconds (JVM running for 13.645)
You can use the following commands to start/stop the
> sudo systemctl start falcon.service > sudo systemctl stop falcon.service > sudo systemctl restart falcon.service > sudo systemctl status falcon.service
To check the console log, use
# To check the console log, use > sudo journalctl --unit=falcon # To see real time logs, use the -f option. > sudo journalctl -f -u falcon.service # Use -n to specify the number of lines to view in the log. > sudo journalctl -f -n 1000 -u falcon.service
The commands above give the console log and may be useful to debug if application does not start. To view logs from Falcon Deploy applicaiton, check the log file at
Open a web browser and enter the address – the server and port where application is running. The address is of the form
This will launch the Falcon Deploy Installation and Configuration (Helper) application. If you see this screen, the installation is successful.