A VMware Tanzu GemFire member may fail to start automatically following a reboot or service restart. The process terminates unexpectedly, and log analysis reveals a "StringIndexOutOfBoundsException" Java exception during the log rollover initialization. This behavior is triggered when external log rotation tools create files in the active log directory using a naming convention that conflicts with the internal GemFire log management handler.
Symptoms:
java.lang.StringIndexOutOfBoundsException.org.apache.geode.internal.io.MainWithChildrenRollingFileHandler.calcNextChildId).*.log-YYYY-MM-DD[-HH].External log rotation (e.g., Linux logrotate) produces files with a timestamp suffix (such as *.log-YYYY-MM-DD-HH) that matches the internal log naming patterns used by GemFire. When the MainWithChildrenRollingFileHandler attempts to process these existing historical log files during the startup sequence, it encounters a parsing error, resulting in a StringIndexOutOfBoundsException and a failed member startup.
logrotate).dateformat or suffix in your log rotation script to use a naming convention that does not overlap with GemFire’s internal patterns. A recommended pattern is _archived_%Y%m%d_%H instead of -YYYY-MM-DD-HH.log-file-size-limit=### (e.g., 100MB) to your gemfire.properties or server configuration.log-disk-space-limit=#### (e.g., 1000MB) to your gemfire.properties or server configuration.