Member since
12-03-2017
148
Posts
25
Kudos Received
11
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1179 | 11-03-2023 12:17 AM | |
2901 | 12-12-2022 09:16 PM | |
1102 | 07-14-2022 03:25 AM | |
1762 | 07-28-2021 04:42 AM | |
2031 | 06-23-2020 10:08 PM |
07-01-2022
11:39 AM
Hello Experts, I am trying to upgrade nifi from 1.12.1 version to 1.16.3. I have a script 'ECMAScript' which was working fine in 1.12.1and now behaving different in 1.16.3. Below is the portion of code giving error in 1.16 version when 'xyzId' is null. But it just logs null as expected in 1.12 version var xyzId = flowFile.getAttribute('xyzId'); log.info(xyzId); Below is the error in 1.16 version when null value received for above line (log.info() line throws below error) imer-Driven Process Thread-8] o.a.nifi.processors.script.ExecuteScript ExecuteScript[id=bae38131-0181-1000-29af-196312cdd9d9] ExecuteScript[id=bae38131-0181-1000-29af-196312cdd9d9] failed to process due to org.apache.nifi.processor.exception.ProcessException: java.lang.RuntimeException: java.lang.NoSuchMethodException: Can't unambiguously select between fixed arity signatures [(org.apache.nifi.logging.LogMessage), (java.lang.String)] of the method org.apache.nifi.controller.TerminationAwareLogger.info for argument types [null]; rolling back session org.apache.nifi.processor.exception.ProcessException: java.lang.RuntimeException: java.lang.NoSuchMethodException: Can't unambiguously select between fixed arity signatures [(org.apache.nifi.logging.LogMessage), (java.lang.String)] of the method org.apache.nifi.controller.TerminationAwareLogger.info for argument types [null] at org.apache.nifi.processors.script.ExecuteScript.onTrigger(ExecuteScript.java:245) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1283) at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:214) at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:103) at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: Can't unambiguously select between fixed arity signatures [(org.apache.nifi.logging.LogMessage), (java.lang.String)] of the method org.apache.nifi.controller.TerminationAwareLogger.info for argument types [null] at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:397) at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449) at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406) at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402) at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) at org.apache.nifi.script.impl.JavascriptScriptRunner.run(JavascriptScriptRunner.java:39) at org.apache.nifi.processors.script.ExecuteScript.onTrigger(ExecuteScript.java:228) ... 11 common frames omitted Caused by: java.lang.NoSuchMethodException: Can't unambiguously select between fixed arity signatures [(org.apache.nifi.logging.LogMessage), (java.lang.String)] of the method org.apache.nifi.controller.TerminationAwareLogger.info for argument types [null] at jdk.internal.dynalink.beans.OverloadedMethod.throwAmbiguousMethod(OverloadedMethod.java:225) at jdk.nashorn.internal.scripts.Script$299$\^eval\_.:program(<eval>:13) at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637) at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494) at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393) ... 18 common frames omitted Any idea how to fix this? I want to avoid checking null values for logging also Thanks Mahendra
... View more
Labels:
- Labels:
-
Apache NiFi
02-03-2022
09:13 AM
Hello Experts, I am looking for a regex to configure in "RouteOnContent" processor of Nifi so that based on specific string in flow file content I can route FF. FF content : ● rclone.service - Rclone(file transfer tool) Remote Service
Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-02-03 09:46:01 UTC; 6h ago
Main PID: 23647 (rclone)
Tasks: 13
Memory: 61.3M
CPU: 5.143s
CGroup: /system.slice/rclone.service
└─23647 /usr/bin/rclone rcd --rc-no-auth --rc-job-expire-duration=60m --cache-tmp-upload-path=/tmp/rclone/upload I want to search for the string "Active: active (running)" in flow file content, if present route to different path. I tried few regex but did not work as expected. Any suggestion would be much appreciated. Thanks Mahendra
... View more
Labels:
- Labels:
-
Apache NiFi
01-19-2022
08:35 AM
Hi @ckumar - thanks for the reply. I think that screenshot lacked info may be due to my permission issue. Same issue has been posted by team mate here - https://community.cloudera.com/t5/Support-Questions/NiFi-Node-showing-2-nodes-and-not-respecting-node-down-fault/td-p/334221 Please take a look at the screenshot attachment there which has more info. And i can login from all 3 nodes ui, and in all nodes it shows up only 1 & 2.
... View more
01-19-2022
07:34 AM
Hello Experts, I have a 3 node nifi cluster with host name as nifi-hatest-01, nifi-hatest-02, nifi-hatest-03. nifi-hatest-01 is primary node at the moment and I can see (in logs) it is receiving heartbeats from 02 & 03. And if I create flows in any one of the 3 nodes it gets sycned to all nodes. But the problem now is the 3rd node (nifi-hatest-03) does not show up in the "cluster" tab of Nifi UI. Any idea what could be the issue? any suggestion would be much appreciated. @MattWho @GangWar @smdas Thanks Mahendra
... View more
Labels:
- Labels:
-
Ambari Blueprints
-
Apache NiFi
11-18-2021
02:40 AM
Below is the app log - 2021-11-18 16:07:13,819 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.util.ServiceConfigurationError: org.apache.nifi.processor.Processor: Provider org.apache.nifi.processors.windows.event.log.ConsumeWindowsEventLog could not be instantiated java.util.ServiceConfigurationError: org.apache.nifi.processor.Processor: Provider org.apache.nifi.processors.windows.event.log.ConsumeWindowsEventLog could not be instantiated at java.util.ServiceLoader.fail(ServiceLoader.java:232) at java.util.ServiceLoader.access$100(ServiceLoader.java:185) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at org.apache.nifi.nar.StandardExtensionDiscoveringManager.loadExtensions(StandardExtensionDiscoveringManager.java:156) at org.apache.nifi.nar.StandardExtensionDiscoveringManager.discoverExtensions(StandardExtensionDiscoveringManager.java:131) at org.apache.nifi.nar.StandardExtensionDiscoveringManager.discoverExtensions(StandardExtensionDiscoveringManager.java:117) at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:1042) at org.apache.nifi.NiFi.<init>(NiFi.java:158) at org.apache.nifi.NiFi.<init>(NiFi.java:72) at org.apache.nifi.NiFi.main(NiFi.java:301) Caused by: java.lang.NoSuchFieldError: SIZE at com.sun.jna.platform.win32.WinBase.<clinit>(WinBase.java:52) at com.sun.jna.platform.win32.Kernel32Util.getComputerName(Kernel32Util.java:60) at org.apache.nifi.processors.windows.event.log.ConsumeWindowsEventLog.<init>(ConsumeWindowsEventLog.java:178) at org.apache.nifi.processors.windows.event.log.ConsumeWindowsEventLog.<init>(ConsumeWindowsEventLog.java:164) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380) ... 9 common frames omitted 2021-11-18 16:07:13,820 INFO [Thread-19] org.apache.nifi.NiFi Initiating shutdown of Jetty web server... 2021-11-18 16:07:13,820 INFO [Thread-19] org.apache.nifi.NiFi Jetty web server shutdown completed (nicely or otherwise).
... View more
11-15-2021
10:09 AM
I tried to change the package name of these 2 dependencies with the help of maven shade plugin, shade has places these dependencies classes in new package. Still whenever I add any of these dependenies to maven/jar nifi is failing to start !!!
... View more
11-12-2021
07:49 AM
Hello Experts, I have implemented a custom log appender which inserts log messages to ElasticSearch. Custom appender class works fine when it is run independently as executable jar. But when I add this custom appender jar file to nifi "lib" directory, nifi stopped working - its not able to start. I have below 2 dependencies in my appender jar - <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>7.15.0</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>7.15.0</version> </dependency> And Nifi has multiple processors related to ElasticSearch so the nar files of these processors also have same classes which are present in above 2 dependencies. This looks to be the issue. I need these ElasticSearch dependencies classes at bootstrap level for logger to get initialised. But the nar files get loaded at later point, so I cant depend on the classes which are part of nar files. What is the better approach to solve this issue ? Any suggestion would be much appreciated. Thanks Mahendra
... View more
Labels:
- Labels:
-
Apache NiFi
09-20-2021
05:26 AM
Hello, We are running single node nifi in 8 core machine and configured 'Maxmum Timer driven thread count' as 300. Once in a while Nifi get totally stuck (wont accept flowfiles) and also no app log will generate till we restart nifi manually. So wondering if its due to nifi thread starvation... In below article 'NiFi Thread starvation' section its mention that system will stuck in resource competition cycle. https://community.cloudera.com/t5/Community-Articles/NiFi-HDF-Dataflow-Optimization-Part-2-of-2/ta-p/245113 So any idea if nifi needs more threads than system available core then will there be any chance of nifi to get stuck ? @Wynner Thanks, Mahendra
... View more
Labels:
- Labels:
-
Apache NiFi
09-17-2021
04:16 AM
You can write a simple custom processor which uses local caching (like Caffeine cache implementation) with cache expiry time as ur window time and build the logic. May be you can store words in cache and keep updating the count or something like that
... View more
08-08-2021
11:51 PM
@Green_ - Can I have a custom appender configured in logback.xml to collect logs and put that in MongoDB ? would that be possible with nifi logs ?
... View more