<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:57:39 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-2610] Connecting to mongdb cloud, getting timeouts</title>
                <link>https://jira.mongodb.org/browse/JAVA-2610</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Really new to mongodb, using connect string from atlas cloud version (3.4.7) and Java driver version (mongo-java-driver-3.4.3.jar)&lt;/p&gt;

&lt;p&gt;getting this exception&lt;br/&gt;
Exception in thread &quot;main&quot; com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches WritableServerSelector. Client view of cluster state is {type=REPLICA_SET, servers=[{address=duneorbit-shard-00-02-dwjjr.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception=&lt;/p&gt;
{com.mongodb.MongoSocketOpenException: Exception opening socket}
&lt;p&gt;, caused by {java.net.ConnectException: Connection refused: connect}}, {address=duneorbit-shard-00-00-dwjjr.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception=&lt;/p&gt;
{com.mongodb.MongoSocketOpenException: Exception opening socket}
&lt;p&gt;, caused by {java.net.ConnectException: Connection refused: connect}}, {address=duneorbit-shard-00-01-dwjjr.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception=&lt;/p&gt;
{com.mongodb.MongoSocketOpenException: Exception opening socket}
&lt;p&gt;, caused by {java.net.ConnectException: Connection refused: connect}}]&lt;br/&gt;
	at com.mongodb.connection.BaseCluster.createTimeoutException(BaseCluster.java:377)&lt;br/&gt;
	at com.mongodb.connection.BaseCluster.selectServer(BaseCluster.java:104)&lt;br/&gt;
	at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.&amp;lt;init&amp;gt;(ClusterBinding.java:75)&lt;br/&gt;
	at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.&amp;lt;init&amp;gt;(ClusterBinding.java:71)&lt;br/&gt;
	at com.mongodb.binding.ClusterBinding.getWriteConnectionSource(ClusterBinding.java:68)&lt;br/&gt;
	at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:415)&lt;br/&gt;
	at com.mongodb.operation.CreateCollectionOperation.execute(CreateCollectionOperation.java:376)&lt;br/&gt;
	at com.mongodb.operation.CreateCollectionOperation.execute(CreateCollectionOperation.java:53)&lt;br/&gt;
	at com.mongodb.Mongo.execute(Mongo.java:845)&lt;br/&gt;
	at com.mongodb.Mongo$2.execute(Mongo.java:828)&lt;br/&gt;
	at com.mongodb.MongoDatabaseImpl.createCollection(MongoDatabaseImpl.java:198)&lt;br/&gt;
	at com.mongodb.MongoDatabaseImpl.createCollection(MongoDatabaseImpl.java:169)&lt;br/&gt;
	at com.jspeedbox.test.TestCloudConnection.main(TestCloudConnection.java:20)&lt;/p&gt;

&lt;p&gt;Code snippet:&lt;/p&gt;

&lt;p&gt;MongoClientURI uri = new MongoClientURI(&quot;mongodb://duneorbit:************@duneorbit-shard-00-00-dwjjr.mongodb.net:27017,&quot;&lt;br/&gt;
				+ &quot;duneorbit-shard-00-01-dwjjr.mongodb.net:27017,&quot;&lt;br/&gt;
				+ &quot;duneorbit-shard-00-02-dwjjr.mongodb.net:27017/test?ssl=true&amp;amp;replicaSet=Duneorbit-shard-0&amp;amp;authSource=admin&quot;);&lt;/p&gt;

&lt;p&gt;		MongoClient mongoClient = new MongoClient(uri);&lt;br/&gt;
		MongoDatabase database = mongoClient.getDatabase(&quot;test&quot;);&lt;br/&gt;
		database.createCollection(&quot;UserProfiles&quot;);&lt;/p&gt;

&lt;p&gt;IP Whitelist:&lt;br/&gt;
192.168.141.26/32&#61713; Active&lt;/p&gt;

&lt;p&gt;193.120.236.35/32 (includes your current IP address)&#61713; Active&lt;/p&gt;

&lt;p&gt;0.0.0.0/0 (includes your current IP address)&#61713; Active&lt;/p&gt;

</description>
                <environment></environment>
        <key id="430842">JAVA-2610</key>
            <summary>Connecting to mongdb cloud, getting timeouts</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="13203">Gone away</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jmccosker@gmail.com">John McCosker</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Sep 2017 08:43:25 +0000</created>
                <updated>Fri, 27 Oct 2023 19:48:24 +0000</updated>
                            <resolved>Tue, 3 Oct 2017 13:12:29 +0000</resolved>
                                                                    <component>Connection Management</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1687675" author="jeff.yemin" created="Tue, 3 Oct 2017 13:12:22 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jmccosker%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;jmccosker@gmail.com&quot;&gt;jmccosker@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;As we have not heard back from you in some time, we&apos;re resolving this issue for now.  If you have more information in the future, please comment and we will consider reopening it.&lt;/p&gt;


&lt;p&gt;Regards,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="1679450" author="ross@10gen.com" created="Fri, 22 Sep 2017 09:23:46 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jmccosker%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;jmccosker@gmail.com&quot;&gt;jmccosker@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;The java code looks ok, but there is a connection issue: &lt;tt&gt;Exception opening socket&lt;/tt&gt;.  Please double check in Atlas that the cluster is running and not deploying after a configuration update.&lt;/p&gt;

&lt;p&gt;The next thing to check is can connect to the cluster via the shell? If no, it highlights that there is a general connectivity issue. If yes and you still can&apos;t connect via the Java driver - then it points to a Java driver configuration issue.&lt;/p&gt;

&lt;p&gt;Just to let you know for future reference this jira project is for Java driver bugs or feature requests.  The best place for questions regarding Atlas or MongoDB usage or even Java driver specifics is the &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user mailing list&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;stackoverflow&lt;/a&gt; as you will reach a boarder audience there.  If your business requires an answer from MongoDB within a set time frame then we do offer &lt;a href=&quot;https://www.mongodb.com/products/production-support&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;production support&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </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|ht76lz:</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>