<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:58:19 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-2895] Atlas connection string question</title>
                <link>https://jira.mongodb.org/browse/JAVA-2895</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I&apos;ve created Atlas M0 (Free Tier) cluster.&#160;(screen)&lt;/p&gt;

&lt;p&gt;I want to add db with info to this cluster.&#160; When I tried to connect to tier cluster via&#160;driver3.6 or later&#160;and wrote&#160;&lt;tt&gt;mongodb+srv://user:&amp;lt;PASSWORD&amp;gt;@cluster0-ox90k.mongodb.net/test?retryWrites=true&lt;/tt&gt;, I always get an error:&#160;Connection strings must start with &apos;mongodb://&apos;.&lt;/p&gt;

&lt;p&gt;Okay, I deleted the snippet&#160;+srv&#160;and wrote the same way&#160;mongodb://user:&amp;lt;PASSWORD&amp;gt;@cluster0-ox90k.mongodb.net/test?retryWrites=true&#160;and was unable to connect.&lt;/p&gt;

&lt;p&gt;So, I finally solved it via&#160;driver 3.4 or earlier, I wrote&#160;&lt;tt&gt;mongodb://user:&amp;lt;PASSWORD&amp;gt;@cluster0-shard-00-00-ox90k.mongodb.net:27017,cluster0-shard-00-01-ox90k.mongodb.net:27017,cluster0-shard-00-02-ox90k.mongodb.net:27017/test?ssl=true&amp;amp;replicaSet=Cluster0-shard-0&amp;amp;authSource=admin&amp;amp;retryWrites=true&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Why did I solve it only via 3.4 driver? &lt;br/&gt;
Here&apos;s my detail question with solution too - &lt;a href=&quot;https://stackoverflow.com/questions/50916467/how-to-connect-to-atlas-m0-free-tier-cluster-correctly-via-java-driver&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://stackoverflow.com/questions/50916467/how-to-connect-to-atlas-m0-free-tier-cluster-correctly-via-java-driver&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://university.mongodb.com/courses/M001/2018_June/discussion/forum/threads/5b2bf4f7be6a833aaf23e399&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://university.mongodb.com/courses/M001/2018_June/discussion/forum/threads/5b2bf4f7be6a833aaf23e399&lt;/a&gt;&lt;br/&gt;
Same issue was probably here - &lt;a href=&quot;http://discourse.metabase.com/t/connect-to-mongodb/3597&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://discourse.metabase.com/t/connect-to-mongodb/3597&lt;/a&gt;&lt;/p&gt;</description>
                <environment>OS Windows 10&lt;br/&gt;
MongoDB shell version v3.6.5&lt;br/&gt;
MongoDB server version: 3.6.5</environment>
        <key id="564393">JAVA-2895</key>
            <summary>Atlas connection string question</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13202">Works as Designed</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="romax300@ukr.net">Max R</reporter>
                        <labels>
                            <label>cluster</label>
                            <label>driver</label>
                            <label>issue</label>
                            <label>tier</label>
                    </labels>
                <created>Tue, 26 Jun 2018 16:45:39 +0000</created>
                <updated>Fri, 27 Oct 2023 13:21:07 +0000</updated>
                            <resolved>Fri, 29 Jun 2018 11:52:25 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1934656" author="ross@10gen.com" created="Fri, 29 Jun 2018 11:52:01 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=romax300%40ukr.net&quot; class=&quot;user-hover&quot; rel=&quot;romax300@ukr.net&quot;&gt;romax300@ukr.net&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thanks for the ticket.&#160; Connection strings starting with &lt;tt&gt;mongodb+srv://&lt;/tt&gt; are only supported when using the version 3.6+ of the Java driver. DNS resolution lookup was added in the 3.6 version of the Java driver. As such removing the &lt;tt&gt;+srv&lt;/tt&gt; component of the connection string would not work / resolve to your atlas cluster.&lt;/p&gt;

&lt;p&gt;Adding the full connection string with multiple hosts is the correct way to connect to Atlas for users of the older Java drivers. However, we would recommend upgrading the driver to the latest version (3.8) to take advantage of the DNS look up and other new MongoDB features.&lt;/p&gt;

&lt;p&gt;For more information regarding connecting to atlas please see the &lt;a href=&quot;https://docs.atlas.mongodb.com/driver-connection/#java-driver-example&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;driver connection example&lt;/a&gt; and the linked &lt;a href=&quot;https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/#java-driver-compatibility&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB Driver compatibility matrix&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope that helps,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="190354" name="100.png" size="40023" author="romax300@ukr.net" created="Tue, 26 Jun 2018 16:35:35 +0000"/>
                            <attachment id="190355" name="101.png" size="17712" author="romax300@ukr.net" created="Tue, 26 Jun 2018 16:36:10 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hts92n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>