Martin created NIFI-10165:
-----------------------------
Summary: Out of heap space when using date function in
HttpNotificationService
Key: NIFI-10165
URL: https://issues.apache.org/jira/browse/NIFI-10165
Project: Apache NiFi
Issue Type: Bug
Affects Versions: 1.16.3
Reporter: Martin
Configured a bootstrap [HTTP Notification
Service|https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#http-notification-service],
and ran out of java heap space (OutOfMemoryError). The NiFi bootstrap process
might be a bit too strict in terms of maximum heap size?
{{bootstrap-notifications-services.xml:}}
<services>
<service>
<id>slack-notification</id>
<class>org.apache.nifi.bootstrap.notification.http.HttpNotificationService</class>
<property name="URL">SLACK_WEBHOOK_URL</property>
<property name="Truststore Filename">./conf/truststore.jks</property>
<property name="Truststore Type">JKS</property>
<property name="Truststore
Password">NIFI_SECURITY_TRUSTSTORE_PASSWORD</property>
<property name="Keystore Filename">./conf/keystore.jks</property>
<property name="Keystore Type">JKS</property>
<property name="Keystore
Password">NIFI_SECURITY_KEYSTORE_PASSWORD</property>
<property name="Key Password">NIFI_SECURITY_KEY_PASSWORD</property>
<property name="notification.timestamp">${now()}</property>
</service>
</services>
Nifi starts fine if I replace the date function:
{code:java}
<property name="notification.timestamp">${now()}</property> {code}
with a static value:
{code:java}
<property name="notification.timestamp">2022-06-23 19:14:00.000</property>
{code}
Exception:
{code:java}
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at org.antlr.runtime.DFA.unpackEncodedString(DFA.java:191)
at
org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionLexer.<clinit>(AttributeExpressionLexer.java:5261)
at
org.apache.nifi.attribute.expression.language.compile.ExpressionCompiler.compile(ExpressionCompiler.java:259)
at
org.apache.nifi.attribute.expression.language.Query.prepare(Query.java:365)
at
org.apache.nifi.attribute.expression.language.Query.prepare(Query.java:304)
at
org.apache.nifi.attribute.expression.language.StandardPropertyValue.<init>(StandardPropertyValue.java:59)
at
org.apache.nifi.bootstrap.NotificationServiceManager$3.getProperty(NotificationServiceManager.java:254)
at
org.apache.nifi.bootstrap.notification.NotificationValidationContext.getProperty(NotificationValidationContext.java:79)
at
org.apache.nifi.components.AbstractConfigurableComponent.validate(AbstractConfigurableComponent.java:106)
at
org.apache.nifi.bootstrap.NotificationServiceManager.loadNotificationServices(NotificationServiceManager.java:148)
at org.apache.nifi.bootstrap.RunNiFi.loadServices(RunNiFi.java:397)
at org.apache.nifi.bootstrap.RunNiFi.<init>(RunNiFi.java:169)
at org.apache.nifi.bootstrap.RunNiFi.main(RunNiFi.java:286) {code}
Slack thread for reference:
https://apachenifi.slack.com/archives/C0L9VCD47/p1656004191002929?thread_ts=1656003162.860329&cid=C0L9VCD47
--
This message was sent by Atlassian Jira
(v8.20.7#820007)