[ 
https://issues.apache.org/jira/browse/NIFI-11794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743204#comment-17743204
 ] 

ASF subversion and git services commented on NIFI-11794:
--------------------------------------------------------

Commit 8a61d5bdbf60a0f4cec3e9ded1488bee3f495859 in nifi's branch 
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=8a61d5bdbf ]

NIFI-11794 - Fix NPE + configure max attempts for Redis State Provider (#7473)

Signed-off-by: Otto Fowler<ottobackwa...@gmail.com>

This closes #7473.


> RedisStateProvider failing when clearing state with local scope
> ---------------------------------------------------------------
>
>                 Key: NIFI-11794
>                 URL: https://issues.apache.org/jira/browse/NIFI-11794
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>            Priority: Major
>             Fix For: 1.latest, 2.latest
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> 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:
> {code:java}
> 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>)
>  {code}
> However this action results in creating the key in the Redis instance:
> {code:java}
> # 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\":{}}"
> {code}
> The configuration in state-management.xml is looking like:
> {code:java}
>     <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> {code}
> CA cert has been added in the NiFi truststore.
> Still debugging the code to figure out the issue and will also add additional 
> logs.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to