Member since
04-09-2023
3
Posts
0
Kudos Received
0
Solutions
04-13-2023
04:25 PM
I am trying to setup a mongo extractor process using GetMongo with Mongo X509 auth. It works from my Java code using the following properties. 1. Mongo URI - mongodb://C=US,ST=Texas,O=Test Inc.,OU=management:ad.group.372,CN=test.com@host1:10900,host2:10901,host3:10901/eos-uat?replicaSet=testApp&journal=true&authMechanism=MONGODB-X509 2. Keystore 3. Keystore password 4. Trustrore 5. Truststore password I am trying with the same props in Nifi and throws the following error. o.a.nifi.processors.mongodb.GetMongo GetMongo[id=44d0b0a4-0187-1000-c77e-135ce0fedc67] Failed to properly initialize Processor. If still scheduled to run, NiFi will attempt to initialize and run the Processor again after the 'Administrative Yield Duration' has elapsed. Failure is due to java.lang.IllegalArgumentException: Invalid mechanism, MONGODB_x509 does not support passwords java.lang.IllegalArgumentException: Invalid mechanism, MONGODB_x509 does not support passwords at com.mongodb.ConnectionString.createMongoCredentialWithMechanism(ConnectionString.java:893) at com.mongodb.ConnectionString.createCredentials(ConnectionString.java:832) at com.mongodb.ConnectionString.<init>(ConnectionString.java:447) at org.apache.nifi.processors.mongodb.AbstractMongoProcessor.getClientSettings(AbstractMongoProcessor.java:267) at org.apache.nifi.processors.mongodb.AbstractMongoProcessor.createClient(AbstractMongoProcessor.java:256) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:145) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:133) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:78) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:55) at org.apache.nifi.controller.StandardProcessorNode.lambda$initiateStart$8(StandardProcessorNode.java:1736) at org.apache.nifi.engine.FlowEngine$3.call(FlowEngine.java:123) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) SSLContext Service validation passes without any issues for the given keystore, keystore password, truststore, truststore passord. Not sure why the above error is coming.
... View more
Labels:
- Labels:
-
Apache NiFi
04-10-2023
07:28 AM
Thanks for the links. Where to initialize the values in the flow? My requirement is to initialize somewhere and then update the value after invokeHttp. 1. GenerateFlow --> invokeHttp ( GenerateFlow is scheduled to run every 60 mins ) 2. invokeHttp --> updateAttribute As per the flow above, it gets initialized again before the invokeHttp and gets updated after the invokeHttp. But, should be intialized only once and keep updating after the invokeHttp.
... View more
04-09-2023
09:55 AM
I have a dynamic attribute requirement. Current Flow 1. GenerateFlow --> invokeHttp ( GenerateFlow is scheduled to run every 60 mins ) 2. invokeHttp --> updateAttribute I have stTime & endTime to invokeHttp which needs to be changed based on last invoke time. Lets say, invoking http very first time, stTime = 04-01-2023 00:00 endTime = 04-01-2023 01:00 In the next schedule, it should be, stTime = 04-01-2023 01:00 endTime = 04-01-2023 02:00 I tried to set attribute in the generate flow with initial value and incrementing using updateAttribute after the invokehttp is done. This value gets overwritten when the next schedule is starting by GenerateFlow.
... View more
Labels:
- Labels:
-
Apache NiFi