Health Check Tool

1. Overview

The IoTDB Health Check Tool is designed to inspect the runtime environment of IoTDB nodes. It assists users in verifying the node’s environment both before deployment and during operation, providing detailed inspection reports.

IoTDB version requirement: Must not be lower than v1.3.2

2. Prerequisites

Linux Systems

  • nc (netcat) tool: Installed by default; user must have execution permissions.
  • lsof or netstat: At least one must be installed; user must have execution permissions.

To verify tool installation:

Check nc: nc -h

Check lsof: lsof -v

Windows Systems

  • PowerShell: Enabled by default.

3. Inspection Items

  • Check port occupancy on the node’s server (Windows/Linux).
  • Verify port connectivity between the current node and other cluster nodes (Windows/Linux).
  • Check JDK installation (JAVA_HOME) (Windows/Linux).
  • Inspect system memory allocation and IoTDB memory configuration (Windows/Linux).
  • Validate directory access permissions (Windows/Linux).
  • Ensure the system’s maximum number of open files meets requirements (≥ 65535) (Linux only).
  • Confirm swap is disabled (Windows/Linux).

4. Usage Instructions

4.1 Command Format

1. health_check.sh/health_check.bat -ips <Remote_IP+Ports> -o <all(default)/remote/local>

4.2 Parameter Descriptions

Parameter Description ​Required
-ips Remote server IPs and ports. Supports multiple servers. Format: ip port1 port2, ip2 port2-1 port2-2 Optional
-o Scope of check: local (local machine), remote (remote server ports), all (both). Default: all Optional

5. Usage Examples

5.1 Example 1: Check All

1. health_check.sh/health_check.bat -ips 172.20.31.19 6667 18080,10.0.6.230 10311

Output:

1. Check: Installation Environment(JDK)
2. Requirement: JDK Version >=1.8
3. Result: JDK Version 11.0.21

5. Check: Installation Environment(Memory)
6. Requirement: Allocate sufficient memory for IoTDB
7. Result: Total Memory 7.8Gi, 2.33 G allocated to IoTDB ConfigNode, 3.88 G allocated to IoTDB DataNode

9. Check: Installation Environment(Directory Access)
10. Requirement: IoTDB needs write permissions for data/datanode/data, data/datanode/consensus, data/datanode/system, data/datanode/wal, data/confignode/system, data/confignode/consensus, ext/pipe, ext/udf, ext/trigger.
11. Result:
12. data/datanode/data has write permission
13. data/datanode/consensus has write permission
14. data/datanode/system has write permission
15. data/datanode/wal has write permission
16. data/confignode/system has write permission
17. data/confignode/consensus has write permission
18. ext/pipe has write permission
19. ext/udf has write permission
20. ext/trigger has write permission

22. Check: Network(Local Port)
23. Requirement: Ports 16668, 10730, 11742, 10750, 10760, 10710, 10720 must be unoccupied
24. Result:
25. Ports 16668, 10730, 11742, 10750, 10760, 10710, 10720 are free

27. Check: Network(Remote Port Connectivity)
28. Requirement: 172.20.31.19:6667, 18080 and 10.0.6.230:10311 must be accessible
29. Result:
30. Inaccessible server ports:
31. IP: 10.0.6.230, Ports: 10311

33. Check: System Settings(Maximum Open Files Number)
34. Requirement: >= 65535
35. Result: 65535

37. Check: System Settings(Swap)
38. Requirement: Disabled
39. Result: Disabled.

5.2 Example 2: Local Check

1. health_check.sh/health_check.bat -o local

Output:

1. Check: Installation Environment(JDK)
2. Requirement: JDK Version >=1.8
3. Result: JDK Version 11.0.21

5. Check: Installation Environment(Memory)
6. Requirement: Allocate sufficient memory for IoTDB
7. Result: Total Memory 7.8Gi, 2.33 G allocated to IoTDB ConfigNode, 3.88 G allocated to IoTDB DataNode

9. Check: Installation Environment(Directory Access)
10. Requirement: IoTDB needs data/datanode/data,data/datanode/consensus,data/datanode/system,data/datanode/wal,data/confignode/system,data/confignode/consensus,ext/pipe,ext/udf,ext/trigger write permission.
11. Result:
12. data/datanode/data has write permission
13. data/datanode/consensus has write permission
14. data/datanode/system has write permission
15. data/datanode/wal has write permission
16. data/confignode/system has write permission
17. data/confignode/consensus has write permission
18. ext/pipe has write permission
19. ext/udf has write permission
20. ext/trigger has write permission

22. Check: Network(Local Port)
23. Requirement: Port 16668 10730 11742 10750 10760 10710 10720 is not occupied
24. Result:
25. Port 16668  10730  11742  10750  10760  10710  10720  is free

27. Check: System Settings(Maximum Open Files Number)
28. Requirement: >= 65535
29. Result: 65535

31. Check: System Settings(Swap)
32. Requirement: disabled
33. Result: disabled.

5.3 Example 3: Remote Check

1. health_check.sh/health_check.bat -o remote -ips 172.20.31.19 6667 18080,10.0.6.230 10311

Output:

1. Check: Network(Remote Port Connectivity)
2. Requirement: 172.20.31.19:6667, 18080 and 10.0.6.230:10311 must be accessible
3. Result:
4. Inaccessible server ports:
5. IP: 10.0.6.230, Ports: 10311

6. FAQs

6.1 How to Adjust Memory Allocation

  • Modify MEMORY_SIZE in confignode-env.sh.
  • Modify MEMORY_SIZE in datanode-env.sh.

6.2 How to Modify Max Open Files Limit

  • To avoid “too many open files” errors:
1. # Check current limit
2. ulimit -n
3. # Temporarily set
4. ulimit -n 65535
5. # Permanently set
6. echo "* soft nofile 65535" >> /etc/security/limits.conf
7. echo "* hard nofile 65535" >> /etc/security/limits.conf
8. # Verify after re-login
9. ulimit -n  # Should return 65535

6.3 How to Disable Swap and Why

  • Why Disable: IoTDB performance degrades when using swap.
  • Steps:
1. # Disable swap
2. echo "vm.swappiness = 0" >> /etc/sysctl.conf
3. # Clear swap data and reload
4. swapoff -a && swapon -a
5. # Apply settings without reboot
6. sysctl -p
7. # Verify swap is 0
8. free -m