Kafka indexing task fails with RollingFileAppender related error

I have vanilla Druid 0.17 installed on a mid sized cluster. The coordinator-overlord.log was easily filling up GB’s of space very quickly and I found that it was using ConsoleAppender so I updated it to use RollingFileAppender. The log4j.xml now looks like this:

<?xml version="1.0" encoding="UTF-8"?>
 <PatternLayout>

   <Pattern>%d{ISO8601} %p [%t] %c - %m%n</Pattern>

 </PatternLayout>

 <Policies>

   <TimeBasedTriggeringPolicy interval="1" modulate="true"/>

   <SizeBasedTriggeringPolicy size="100 MB"/>

 </Policies>

 <DefaultRolloverStrategy max="10"/>
 <AppenderRef ref="RollingFile"/>

``

I updated the jvm.config for each service by adding -Dservice=<SERVICE_NAME>. After making this change, my Kafka indexing task has been failing close to every 10 minutes and in the log, I see the following:

2020-04-01 13:06:58,702 main ERROR An exception occurred processing Appender RollingFile java.util.regex.PatternSyntaxException: Illegal repetition near index 0
${sys:service}-service-2020-04-01.(\d+).log.*
^
        at java.util.regex.Pattern.error(Pattern.java:1957)
        at java.util.regex.Pattern.closure(Pattern.java:3159)
        at java.util.regex.Pattern.sequence(Pattern.java:2136)
        at java.util.regex.Pattern.expr(Pattern.java:1998)
        at java.util.regex.Pattern.compile(Pattern.java:1698)
        at java.util.regex.Pattern.<init>(Pattern.java:1351)
        at java.util.regex.Pattern.compile(Pattern.java:1028)
        at org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy.getEligibleFiles(AbstractRolloverStrategy.java:124)
        at org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy.getEligibleFiles(AbstractRolloverStrategy.java:98)
        at org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy.getEligibleFiles(AbstractRolloverStrategy.java:90)
        at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.purgeAscending(DefaultRolloverStrategy.java:212)
        at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.purge(DefaultRolloverStrategy.java:199)
        at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.rollover(DefaultRolloverStrategy.java:326)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:362)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:278)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:218)
        at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:267)
        at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
        at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
        at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
        at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
        at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:448)
        at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:433)
        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:417)
        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:403)
        at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
        at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146)
        at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2091)
        at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1993)
        at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1852)
        at org.apache.logging.slf4j.Log4jLogger.info(Log4jLogger.java:179)
        at org.apache.druid.java.util.common.logger.Logger.info(Logger.java:94)
        at org.apache.druid.initialization.Initialization$ServiceLoadingFromExtensions.addAllFromFileSystem(Initialization.java:186)
        at org.apache.druid.initialization.Initialization$ServiceLoadingFromExtensions.<init>(Initialization.java:166)
        at org.apache.druid.initialization.Initialization$ServiceLoadingFromExtensions.<init>(Initialization.java:152)
        at org.apache.druid.initialization.Initialization.lambda$getFromExtensions$0(Initialization.java:146)
        at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853)
        at org.apache.druid.initialization.Initialization.getFromExtensions(Initialization.java:144)
        at org.apache.druid.cli.Main.main(Main.java:98)

``