Boris, Bryan found the bug, we were setting the results object to null in one place instead of an empty collection. I've written up NIFI-5230 [1] to cover it, and issued a PR [2] to fix it.
Regards, Matt [1] https://issues.apache.org/jira/browse/NIFI-5230 [2] https://github.com/apache/nifi/pull/2734 On Tue, May 22, 2018 at 5:00 PM, Boris Tyukin <bo...@boristyukin.com> wrote: > Hi Bryan, > > yes, here is the trace: > > 2018-05-22 16:00:49,339 WARN [NiFi Web Server-805] > o.a.n.controller.StandardProcessorNode Failed during validation > java.lang.NullPointerException: null > at > org.apache.nifi.processors.script.InvokeScriptedProcessor.customValidate(InvokeScriptedProcessor.java:476) > at > org.apache.nifi.components.AbstractConfigurableComponent.validate(AbstractConfigurableComponent.java:126) > at > org.apache.nifi.controller.AbstractConfiguredComponent.validate(AbstractConfiguredComponent.java:363) > at > org.apache.nifi.controller.StandardProcessorNode.isValid(StandardProcessorNode.java:995) > at > org.apache.nifi.groups.StandardProcessGroup.getCounts(StandardProcessGroup.java:300) > at > org.apache.nifi.groups.StandardProcessGroup.getCounts(StandardProcessGroup.java:334) > at > org.apache.nifi.groups.StandardProcessGroup.getCounts(StandardProcessGroup.java:334) > at > org.apache.nifi.web.controller.ControllerFacade.getControllerStatus(ControllerFacade.java:583) > at > org.apache.nifi.web.controller.ControllerFacade$$FastClassBySpringCGLIB$$5a42ba54.invoke(<generated>) > at > org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) > at > org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) > at > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) > at > org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) > at > org.apache.nifi.web.controller.ControllerFacade$$EnhancerBySpringCGLIB$$e1de9216.getControllerStatus(<generated>) > at > org.apache.nifi.web.StandardNiFiServiceFacade.getControllerStatus(StandardNiFiServiceFacade.java:2712) > at > org.apache.nifi.web.StandardNiFiServiceFacade$$FastClassBySpringCGLIB$$358780e0.invoke(<generated>) > at > org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) > at > org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) > at > org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) > at > org.apache.nifi.web.NiFiServiceFacadeLock.proceedWithReadLock(NiFiServiceFacadeLock.java:155) > at > org.apache.nifi.web.NiFiServiceFacadeLock.getLock(NiFiServiceFacadeLock.java:120) > at sun.reflect.GeneratedMethodAccessor333.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) > at > org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) > at > org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) > at > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) > at > org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) > at > org.apache.nifi.web.StandardNiFiServiceFacade$$EnhancerBySpringCGLIB$$6298ded6.getControllerStatus(<generated>) > at > org.apache.nifi.web.api.FlowResource.getControllerStatus(FlowResource.java:862) > at sun.reflect.GeneratedMethodAccessor384.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76) > at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148) > at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191) > at > org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200) > at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103) > at > org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493) > at > org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415) > at > org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104) > at > org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277) > at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272) > at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268) > at org.glassfish.jersey.internal.Errors.process(Errors.java:316) > at org.glassfish.jersey.internal.Errors.process(Errors.java:298) > at org.glassfish.jersey.internal.Errors.process(Errors.java:268) > at > org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289) > at > org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256) > at > org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703) > at > org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416) > at > org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370) > at > org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389) > at > org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342) > at > org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634) > at > org.apache.nifi.web.filter.RequestLogger.doFilter(RequestLogger.java:66) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621) > at > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) > at > org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) > at > org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) > at > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) > at > org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) > at > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) > at > org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) > at > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) > at > org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:60) > at > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) > at > org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:60) > at > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) > at > org.apache.nifi.web.security.NiFiAuthenticationFilter.authenticate(NiFiAuthenticationFilter.java:84) > at > org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:58) > at > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) > at > org.apache.nifi.web.security.NiFiAuthenticationFilter.authenticate(NiFiAuthenticationFilter.java:84) > at > org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:58) > at > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) > at > org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) > at > org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) > at > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) > at > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621) > at org.apache.nifi.web.filter.TimerFilter.doFilter(TimerFilter.java:51) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1613) > at > org.apache.nifi.web.server.JettyServer$2.doFilter(JettyServer.java:981) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:541) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1593) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1239) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1141) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:118) > at > org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:561) > at > org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) > at org.eclipse.jetty.server.Server.handle(Server.java:564) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) > at > org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:258) > at > org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:147) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) > at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:748) > 2018-05-22 16:00:53,830 WARN [NiFi Web Server-793] > o.a.n.controller.StandardProcessorNode Failed during validation > java.lang.NullPointerException: null > at > org.apache.nifi.processors.script.InvokeScriptedProcessor.customValidate(InvokeScriptedProcessor.java:476) > at > org.apache.nifi.components.AbstractConfigurableComponent.validate(AbstractConfigurableComponent.java:126) > at > org.apache.nifi.controller.AbstractConfiguredComponent.validate(AbstractConfiguredComponent.java:363) > at > org.apache.nifi.controller.StandardProcessorNode.isValid(StandardProcessorNode.java:995) > at > org.apache.nifi.controller.FlowController.getProcessorStatus(FlowController.java:3210) > at > org.apache.nifi.controller.FlowController.getGroupStatus(FlowController.java:2800) > > > On Tue, May 22, 2018 at 4:41 PM, Bryan Bende <bbe...@gmail.com> wrote: >> >> Is there a stacktrace in nifi-app.log at the time you got the validation >> error? >> >> On Tue, May 22, 2018 at 4:35 PM, Boris Tyukin <bo...@boristyukin.com> >> wrote: >> > I tried both along with nifi restart. >> > >> > it kinda works now. But this is CRAZY. If someone can explain this, I >> > would >> > give a hug :) >> > >> > My steps: >> > >> > 1. Drop new InvokeScriptedProcessor on canvas. Open properties and point >> > it >> > to my groovy file on NFS. Pick Groovy as a lang. Hit Apply >> > 2. Go back in the processor properties to populate my custom properties. >> > Hit >> > apply >> > --> Error bulletin popup - cannot validate bla bla >> > >> > 3. Open properties again. change path to groovy script to 1234. Apply >> >>> obviously error message that script does not exist >> > >> > 4. Open properties again and change path BACK to NFS path from step 1. >> > This >> > is exactly the same file/path. Hit Apply >> >>> All works now, no errors >> > >> > After NiFi restart processor still works, no errors. But if I start over >> > from step 1, I have to repeat all steps again. >> > >> > On Tue, May 22, 2018 at 4:22 PM, Shawn Weeks <swe...@weeksconsulting.us> >> > wrote: >> >> >> >> Were you disabling the processor or just stopping it? I've found with >> >> the >> >> scripted processors they will get in an odd state and that's the only >> >> way to >> >> reset it. >> >> >> >> >> >> Shawn >> >> >> >> ________________________________ >> >> From: Boris Tyukin <bo...@boristyukin.com> >> >> Sent: Tuesday, May 22, 2018 3:07:36 PM >> >> To: users@nifi.apache.org >> >> Subject: Re: InvokeScriptedProcessor from a shared folder >> >> >> >> well it works now...after I recreated processor 3 times and was >> >> changing >> >> parameters back and forth and now that error is gone. >> >> >> >> we did not change permissions on nfs or file so not sure why nifi did >> >> not >> >> like it at first. >> >> >> >> On Tue, May 22, 2018 at 3:32 PM, Boris Tyukin <bo...@boristyukin.com> >> >> wrote: >> >> >> >> Hello, >> >> >> >> I created a custom groovy processor and saved it in a file. That file >> >> was >> >> placed on NFS share and I pointed NiFi's InvokeScriptedProcessor to it. >> >> >> >> When I started a processor, I got a weird error that it failed custom >> >> validation. >> >> >> >> If I copy that file out of NFS to a local directory, it works fine. >> >> >> >> It seems that NiFi is trying to obtain a file lock or something that >> >> NFS >> >> does not support. >> >> >> >> Can someone shed some light on this? We were hoping to keep scripted >> >> processors on NFS so they accessible from all the nodes and also >> >> deployed to >> >> a single place. >> >> >> >> Thanks, >> >> Boris >> >> >> >> >> > > >