Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Trying to configure the NiFi cluster state provider with the Redis implementation against a Google Cloud Platform Memorystore instance.
I can see that there is no state saved in the redis instance.
When trying to clear state of a processor:
2023-07-11 17:57:39,007 ERROR [NiFi Web Server-22] o.a.nifi.web.api.config.ThrowableMapper An unexpected error has occurred: java.lang.NullPointerException. Returning Internal Server Error response.
java.lang.NullPointerException: null
at org.apache.nifi.redis.state.RedisStateProvider.lambda$replace$1(RedisStateProvider.java:248)
at org.apache.nifi.redis.state.RedisStateProvider.withConnection(RedisStateProvider.java:313)
at org.apache.nifi.redis.state.RedisStateProvider.replace(RedisStateProvider.java:207)
at org.apache.nifi.redis.state.RedisStateProvider.clear(RedisStateProvider.java:263)
at org.apache.nifi.controller.state.manager.StandardStateManagerProvider$1.clear(StandardStateManagerProvider.java:395)
at org.apache.nifi.controller.state.StandardStateManager.clear(StandardStateManager.java:85)
at org.apache.nifi.web.dao.impl.StandardComponentStateDAO.clearState(StandardComponentStateDAO.java:58)
at org.apache.nifi.web.dao.impl.StandardComponentStateDAO.clearState(StandardComponentStateDAO.java:72)
at org.apache.nifi.web.dao.impl.StandardComponentStateDAO$$FastClassBySpringCGLIB$$51589743.invoke(<generated>)
However this action results in creating the key in the Redis instance:
# redis-cli -h ... -p ... -a ... --tls --cacert /tmp/server-ca.pem ...:6378> KEYS * 1) "nifi/components/46025cdf-0189-1000-ffff-ffffc11ae372" ...:6378> GET "nifi/components/46025cdf-0189-1000-ffff-ffffc11ae372" "{\"version\":0,\"encodingVersion\":1,\"stateValues\":{}}"
The configuration in state-management.xml is looking like:
<cluster-provider> <id>redis-provider</id> <class&gt;org.apache.nifi.redis.state.RedisStateProvider</class&gt; <property name="Redis Mode">Standalone</property> <property name="Connection String">...:6378</property> <property name="Password">...</property> <property name="Enable TLS">true</property> </cluster-provider>
CA cert has been added in the NiFi truststore.
Still debugging the code to figure out the issue and will also add additional logs.
Attachments
Issue Links
- links to