You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2024/03/14 09:30:00 UTC
[jira] [Commented] (NIFI-12891) ElasticSearchClientService fails config verification with Nullpointer before first enable
[ https://issues.apache.org/jira/browse/NIFI-12891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17827019#comment-17827019 ]
ASF subversion and git services commented on NIFI-12891:
--------------------------------------------------------
Commit 275dcc1e5084908deef8259f7f6d3807d7432463 in nifi's branch refs/heads/main from Bob Paulin
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=275dcc1e50 ]
NIFI-12891: Update ElasticSearchClientService member variables on verify
This closes #8496
Signed-off-by: Chris Sampson <ch...@gmail.com>
> ElasticSearchClientService fails config verification with Nullpointer before first enable
> -----------------------------------------------------------------------------------------
>
> Key: NIFI-12891
> URL: https://issues.apache.org/jira/browse/NIFI-12891
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Bob Paulin
> Priority: Minor
> Time Spent: 20m
> Remaining Estimate: 0h
>
> If a user clicks the "Verify Properties" button before the ElasticSearchClientService Controller Service is first enabled it fails to verify the connection. This is due to a null pointer that occurs because both the responseEncoding and objectmapper is not set in the verify method before the test. This gives the user the incorrect error that the connection failed even though the connection would have succeed.
>
> Recommend managing these variables in the verify method.
>
> ```
> 2024-03-12 15:36:39,437 WARN [Verify Controller Service Config Thread-1] o.a.n.e.ElasticSearchClientServiceImpl ElasticSearchClientServiceImpl[id=46f88c3f-53ce-3fb6-6014-995ad23028de] Unable to connect to Elasticsearch
> org.apache.nifi.elasticsearch.ElasticsearchException: java.lang.NullPointerException
> at org.apache.nifi.elasticsearch.ElasticSearchClientServiceImpl.parseResponse(ElasticSearchClientServiceImpl.java:566)
> at org.apache.nifi.elasticsearch.ElasticSearchClientServiceImpl.getElasticsearchRoot(ElasticSearchClientServiceImpl.java:329)
> at org.apache.nifi.elasticsearch.ElasticSearchClientServiceImpl.verifyRootConnection(ElasticSearchClientServiceImpl.java:336)
> at org.apache.nifi.elasticsearch.ElasticSearchClientServiceImpl.verify(ElasticSearchClientServiceImpl.java:243)
> at org.apache.nifi.controller.service.StandardControllerServiceNode.verifyConfiguration(StandardControllerServiceNode.java:531)
> at org.apache.nifi.web.dao.impl.StandardControllerServiceDAO.verifyConfiguration(StandardControllerServiceDAO.java:433)
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> at java.base/java.lang.reflect.Method.invoke(Method.java:580)
> at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:751)
> at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
> at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:751)
> at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:703)
> at org.apache.nifi.web.dao.impl.StandardControllerServiceDAO$$SpringCGLIB$$0.verifyConfiguration(<generated>)
> at org.apache.nifi.web.StandardNiFiServiceFacade.performControllerServiceConfigVerification(StandardNiFiServiceFacade.java:2945)
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> at java.base/java.lang.reflect.Method.invoke(Method.java:580)
> at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:751)
> at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
> at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:751)
> at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:703)
> at org.apache.nifi.web.StandardNiFiServiceFacade$$SpringCGLIB$$0.performControllerServiceConfigVerification(<generated>)
> at org.apache.nifi.web.api.ControllerServiceResource.lambda$performAsyncConfigVerification$28(ControllerServiceResource.java:1108)
> at org.apache.nifi.web.api.concurrent.AsyncRequestManager$2.run(AsyncRequestManager.java:119)
> at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
> at java.base/java.lang.Thread.run(Thread.java:1583)
> Caused by: java.lang.NullPointerException: null
> at java.base/java.util.Objects.requireNonNull(Objects.java:233)
> at java.base/java.lang.String.<init>(String.java:1425)
> at org.apache.nifi.elasticsearch.ElasticSearchClientServiceImpl.parseResponse(ElasticSearchClientServiceImpl.java:559)
> ... 35 common frames omitted
> ```
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)