IOT Application Health Check

1. Overview

This guide describes how to monitor and verify the health status of the IOT application after startup. It covers log analysis, service verification, and troubleshooting procedures.

Edit ${APP_HOME}/bin/app.env to adjust settings such as database connection, ACS WS parameters, ports, hazelcast connection, LDAP configuration.

2. Startup issues troubleshooting

Sometimes files after editing in linux need to be transferred from CRLF format to LF.

If application is not started, execute from bin folder:

sed -i 's/\r$//' start.sh
sed -i 's/\r$//' app.env

3. Post-Startup Directory Structure

After successful application startup, the following directories are automatically created:

  • ${APP_HOME}/logs/ - Contains all application logs

  • ${APP_HOME}/app/static/support-center/ - Contains deployed Support Center Angular UI files

  • ${APP_HOME}/app/static/management-console/ - Contains deployed Management Console Angular UI files

4. Primary Log Files

4.1. Main Application Log

Location: ${APP_HOME}/logs/iot_web.log

This file contains the complete Spring Boot application startup process and is the primary source for diagnosing startup issues.

4.2. Additional Log Files

  • HikariCP Connection Pool Log: ${APP_HOME}/logs/hikari.log – database connection pool info

  • ACS Web Service Log: ${APP_HOME}/logs/acsws.log – ACS WS communication logs

  • Liquibase Migration Log: ${APP_HOME}/logs/liquibase.log – database migration details

5. Critical Startup Checkpoints

5.1. 1. Database Initialization

Look for successful database initialization in iot_web.log:

INFO [main] liquibase.lockservice.null Successfully acquired change log lock
INFO [main] liquibase.changelog.null Creating database history table with name: iotw.DATABASECHANGELOG
INFO [main] liquibase.changelog.null ChangeSet db.changelog/ui/init.xml::createIotw::vadim ran successfully
INFO [main] liquibase.lockservice.null Successfully released change log lock

What it means: Database schema has been successfully created/updated. Adjust database settings in app.env:

DB_VENDOR=mysql
DB_HOST=localhost
MYSQL_USER=ftacs
MYSQL_PASSWORD=ftacs
MYSQL_SCHEMA_IOTW=iotw

5.2. 2. Hazelcast Connection

Verify distributed cache connectivity:

INFO [hz.client_1.internal-1] HazelcastClient is CLIENT_CONNECTED

What it means: Application connected to Hazelcast cluster. Hazelcast configuration in app.env:

HZ_MEMBERS=127.0.0.1:5701
HZ_CLIENT_CONFIG=${CONF_DIR}/hazelcast-client.xml

5.3. 3. Spring Boot Application Startup Completion

Check for successful startup:

INFO [main] com.friendly.iot.web.config.FtIotWebApp : Started FtIotWebApp in 24 seconds

5.4. 4. Cache Initialization

Monitor cache loading:

INFO [main] com.friendly.commons.cache.CpeParameterNameCache - Cache size 23420

6. Service Availability Verification

6.1. Database Verification

Check required tables in iotw schema:

USE iotw;
SHOW TABLES;

6.3. Health Check Endpoints

  • Application Version:

curl http://localhost:${HTTP_PORTS}/iot-webservice/iotw/System/version
  • Service Status:

curl http://localhost:${HTTP_PORTS}/iot-webservice/iotw/System/information

7. Monitoring Commands

7.1. Log Monitoring

tail -f ${LOG_DIR}/iot_web.log
tail -f ${LOG_DIR}/hikari.log
tail -f ${LOG_DIR}/acsws.log
tail -f ${LOG_DIR}/liquibase.log
grep -i error ${LOG_DIR}/iot_web.log

7.2. Process Monitoring

ps aux | grep java
netstat -tulpn | grep :${HTTP_PORTS}
netstat -tulpn | grep :${HTTPS_PORTS}

8. Troubleshooting

8.1. Database Connection Failed

Check DB_HOST, DB_VENDOR, and credentials in app.env.

8.2. Hazelcast Connection Failed

Check HZ_MEMBERS and network connectivity.

8.3. Port Conflicts

Check HTTP_PORTS/HTTPS_PORTS in app.env.

8.4. Log Analysis

grep -i "error\|exception\|failed" ${LOG_DIR}/iot_web.log
grep -i "database\|sql\|liquibase" ${LOG_DIR}/iot_web.log
grep -i "memory\|heap\|gc" ${LOG_DIR}/iot_web.log

9. Performance Monitoring

Monitor JVM, memory, and network connections using:

jstat -gc $(pgrep java)
top -p $(pgrep java)
ss -tulpn | grep java
← Back | Home