[
https://issues.apache.org/jira/browse/NIFI-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17185306#comment-17185306
]
Joey Frazee commented on NIFI-7768:
-----------------------------------
Pretty sure this is just a matter of what version of the Mongo driver is being
used and the error is being thrown there:
java.lang.IllegalArgumentException: The connection string is invalid.
Connection strings must start with 'mongodb://'
at com.mongodb.ConnectionString.<init>(ConnectionString.java:203)
at com.mongodb.MongoClientURI.<init>(MongoClientURI.java:176)
at com.mongodb.MongoClientURI.<init>(MongoClientURI.java:158)
The default driver version in NiFi is still 3.2.2, which is 4 years old and
pre-dates the SRV record support [1]. There are build profiles for using 3.6.x
(-P3.6) or 3.8.x (-P3.8) and using those the processor initialization gets past
this point. I don't have access to a setup using this though so I can't do a
real test.
Bumping the driver version we're using should probably resolve the issue.
1.
https://www.mongodb.com/blog/post/mongodb-3-6-here-to-SRV-you-with-easier-replica-set-connections?jmp=fcb&utm_source=4244&utm_medium=FBPAGE&utm_term=4&linkId=50841309
> enhance the MongoDB processor URL acceptance protocol to accept mongodb+srv://
> ------------------------------------------------------------------------------
>
> Key: NIFI-7768
> URL: https://issues.apache.org/jira/browse/NIFI-7768
> Project: Apache NiFi
> Issue Type: New Feature
> Components: Core Framework
> Environment: Any machine or platform would have similar pattern
> Reporter: Ravi Teja
> Priority: Critical
>
> when trying to connect to a MongoDB atlas instance, we see a message that
> says `mongo db URL should start with mobgodb://`. But our atlas connection
> string starts with `mongodb+srv`. Please enhance the processor/controller
> service to accept `mongodb+srv://` also.
>
> More info here: https://docs.mongodb.com/manual/reference/connection-string/
--
This message was sent by Atlassian Jira
(v8.3.4#803005)