OCF_HEARTBEAT_TOMCAT(7)

πŸ’– ocf_heartbeat_tomcat β€” the manual, but make it cute πŸ’–

okay bestie, you're holding OCF_HEARTBEAT_TOMCAT(7) and honestly? it's giving "cluster resource but make it servlet energy" 🫢. Sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

ocf_heartbeat_tomcat β€” manages a Tomcat servlet environment instance. yes, that Tomcat. the Java one. the icon πŸ‘‘


🌸 SYNOPSIS 🌸

tomcat [start | stop | status | monitor | meta-data | validate-all]

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically: this is a resource script for Tomcat πŸ’…. It manages a Tomcat instance as a cluster resource. That's it, that's the whole vibe. Your cluster babysits Tomcat now, no cap.


πŸŽ€ SUPPORTED PARAMETERS πŸŽ€

This is the main character section, fr fr. Every single knob you can turn:

  • tomcat_name β€” the name of the resource, added as a Java parameter in JAVA_OPTS:
-Dname=<tomcat_name>

to the Tomcat process on start. It's used to make sure the process is still running, and it must be unique. (unique, optional, string, default "tomcat")

  • script_log β€” the log file, used during start and stop operations. (unique, optional, string, default "/var/log/tomcat.log")
  • tomcat_stop_timeout β€” time-out for the stop operation. DEPRECATED, bestie, don't build your life around it. (optional, integer, no default)
  • tomcat_suspend_trialcount β€” maximum number of times to retry the stop operation before suspending and killing Tomcat. DEPRECATED. And lowkey it does not retry. (optional, integer, no default)
  • tomcat_user β€” the user who starts Tomcat. (optional, string, default "root")
  • statusurl β€” URL for state confirmation. (optional, string, default "http://127.0.0.1:8080")
  • max_stop_time β€” number of seconds to wait during a stop before drastic measures (force kill πŸ”₯) are used on the tomcat process. This number MUST be less than your cluster stop timeout for the resource. The default value is five seconds before the timeout value of the stop operation. When it is over this value, it stops a process in kill commands. Heads up: this parameter is only effective on Tomcat 6 or later. (optional, integer, no default)
  • java_home β€” home directory of Java. required, so like, you gotta. (required, string, no default)
  • java_opts β€” Java JVM options used on start and stop. (optional, string, no default)
  • catalina_home β€” home directory of Tomcat. also required 🫢 (required, string, no default)
  • catalina_base β€” instance directory of Tomcat. (unique, optional, string, no default)
  • catalina_out β€” log file name of Tomcat. (unique, optional, string, default "/logs/catalina.out")
  • catalina_pid β€” a PID file name for Tomcat. (unique, optional, string, no default)
  • force_systemd β€” force use of systemd when available. (optional, string, default "1")
  • tomcat_start_script β€” absolute path to the custom tomcat start script to use. (optional, string, no default)
  • tomcat_start_opts β€” Tomcat start options. (optional, string, no default)
  • catalina_opts β€” Catalina options, for the start operation only. (optional, string, no default)
  • catalina_tmpdir β€” temporary directory of Tomcat. (unique, optional, string, no default)
  • catalina_rotate_log β€” rotate catalina.out flag. (optional, boolean, default NO)
  • catalina_rotatetime β€” catalina.out rotation interval (seconds). (optional, integer, default 86400)
  • java_endorsed_dirs β€” Java_endorsed_dirs of tomcat. (unique, optional, string, no default)
  • logging_config β€” Logging_config of tomcat. (unique, optional, string, no default)
  • logging_manager β€” Logging_manager of tomcat. (unique, optional, string, no default)

⭐ SUPPORTED ACTIONS ⭐

This resource agent supports the following actions (operations), and yes every one of them is doing the lord's work:

  1. start β€” starts the resource. Suggested minimum timeout: 60s.
  2. stop β€” stops the resource. Suggested minimum timeout: 120s.
  3. status β€” performs a status check. Suggested minimum timeout: 60s.
  4. monitor β€” performs a detailed status check. Suggested minimum timeout: 30s. Suggested interval: 10s.
  5. meta-data β€” retrieves resource agent metadata (internal use only πŸ”’). Suggested minimum timeout: 5s.
  6. validate-all β€” performs a validation of the resource configuration. Suggested minimum timeout: 5s.

🌈 EXAMPLE CRM SHELL 🌈

Here's what it looks like to set up a tomcat resource using the crm(8) shell:

primitive p_tomcat ocf:heartbeat:tomcat \
  params \
    java_home=string \
    catalina_home=string \
  op monitor depth="0" timeout="30s" interval="10s"

πŸ’œ EXAMPLE PCS πŸ’œ

And the same energy, but with pcs(8):

pcs resource create p_tomcat ocf:heartbeat:tomcat \
  java_home=string \
  catalina_home=string \
  op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="10s"

πŸ‘‘ SEE ALSO πŸ‘‘

http://clusterlabs.org/ β€” go say hi, they're iconic.


πŸ’Œ AUTHOR πŸ’Œ

ClusterLabs contributors (see the resource agent source for information about individual authors). absolute legends, every one of them 🫢


and that's the whole page, bestie! this was resource-agents UNKNOWN (yes, the version is literally "UNKNOWN", we don't talk about it πŸ’€), dated 04/08/2026, and it lives at OCF_HEARTBEAT_TOMCAT(7). slay, go manage that servlet βœ¨πŸŽ€

πŸ“¦ where this page comes from