<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:42 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-2245] MongoClient Instantiation Using IPV6 Address Causes &quot;com.mongodb.MongoException: host and port should be specified in host:port format&quot;</title>
                <link>https://jira.mongodb.org/browse/JAVA-2245</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;When running the below code snippet, a MongoException is thrown. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;        final String host = &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;2604:fe00:3:1103:250:56ff:fe98:c831&amp;#93;&lt;/span&gt;&quot;;&lt;/p&gt;

&lt;p&gt;        ServerAddress address = new ServerAddress(host, 27017);&lt;br/&gt;
        System.out.println(address.getHost());&lt;/p&gt;

&lt;p&gt;        MongoClient client = new MongoClient(host);&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This is a valid IPV6 address. &lt;/p&gt;

&lt;p&gt;Any help would be appreciated. I have tried many different ways of instantiating the client, they all fall back to the same process.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Make ServerAddress using host string.&lt;/li&gt;
	&lt;li&gt;Pass to MongoClient.&lt;/li&gt;
	&lt;li&gt;Attempt MongoClient Construction using address.&lt;/li&gt;
	&lt;li&gt;Exception thrown.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The exception is:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;com.mongodb.MongoException: host and port should be specified in host:port format&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at com.mongodb.ServerAddress.&amp;lt;init&amp;gt;(ServerAddress.java:122)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at com.mongodb.connection.ClusterSettings$Builder.hosts(ClusterSettings.java:102)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at com.mongodb.Mongo.createCluster(Mongo.java:670)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at com.mongodb.Mongo.&amp;lt;init&amp;gt;(Mongo.java:281)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at com.mongodb.Mongo.&amp;lt;init&amp;gt;(Mongo.java:277)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at com.mongodb.MongoClient.&amp;lt;init&amp;gt;(MongoClient.java:174)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at com.mongodb.MongoClient.&amp;lt;init&amp;gt;(MongoClient.java:151)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at com.mongodb.MongoClient.&amp;lt;init&amp;gt;(MongoClient.java:121)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment>Mac OS X 10.11.5, Java 7</environment>
        <key id="301067">JAVA-2245</key>
            <summary>MongoClient Instantiation Using IPV6 Address Causes &quot;com.mongodb.MongoException: host and port should be specified in host:port format&quot;</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="9">Done</resolution>
                                        <assignee username="justin.lee">Justin Lee</assignee>
                                    <reporter username="atbe">Ibrahim Ahmed</reporter>
                        <labels>
                            <label>ipv6</label>
                    </labels>
                <created>Thu, 14 Jul 2016 12:58:26 +0000</created>
                <updated>Wed, 19 Oct 2016 14:17:40 +0000</updated>
                            <resolved>Thu, 14 Jul 2016 17:33:36 +0000</resolved>
                                    <version>3.2.2</version>
                                    <fixVersion>3.3.0</fixVersion>
                                    <component>Connection Management</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1325194" author="atbe" created="Fri, 15 Jul 2016 13:39:52 +0000"  >&lt;p&gt;Jeff,&lt;/p&gt;

&lt;p&gt;2016-07-15 09:33:08.714 &lt;span class=&quot;error&quot;&gt;&amp;#91;main&amp;#93;&lt;/span&gt; DEBUGtestrunner.TestRunner - com.mongo.mongodb.util.MongoDBClient$Companion: Created MongoClient with server addresses &amp;lt;[&lt;span class=&quot;error&quot;&gt;&amp;#91;2604:fe00:3:1109:250:56ff:fe87:6500&amp;#93;&lt;/span&gt;:27017]&amp;gt;&lt;/p&gt;

&lt;p&gt;Looks good. Thanks Mongo team.&lt;/p&gt;</comment>
                            <comment id="1325165" author="jeff.yemin" created="Fri, 15 Jul 2016 13:15:05 +0000"  >&lt;p&gt;There is a SNAPSHOT available on &lt;a href=&quot;https://oss.sonatype.org/content/repositories/snapshots/org/mongodb/mongo-java-driver/3.3.0-SNAPSHOT/mongo-java-driver-3.3.0-20160714.184514-35.jar&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Sonatype&lt;/a&gt;  containing this fix.  Care to give it a try, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=atbe&quot; class=&quot;user-hover&quot; rel=&quot;atbe&quot;&gt;atbe&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="1324441" author="atbe" created="Thu, 14 Jul 2016 18:52:58 +0000"  >&lt;p&gt;PS.&lt;br/&gt;
Thank you Justin for programming the solution so quickly and following up with me on irc.&lt;/p&gt;</comment>
                            <comment id="1324272" author="atbe" created="Thu, 14 Jul 2016 17:38:50 +0000"  >&lt;p&gt;Hey Jeff,&lt;/p&gt;

&lt;p&gt;Thanks for fixing it. Looking forward to the next release.&lt;/p&gt;</comment>
                            <comment id="1324223" author="jeff.yemin" created="Thu, 14 Jul 2016 17:03:54 +0000"  >&lt;p&gt;Hi Ibrahim,&lt;/p&gt;

&lt;p&gt;This is a bug, so thanks for bringing it too our attention.  We have a fix in code review and will try to get it in to the next release.&lt;/p&gt;</comment>
                            <comment id="1323884" author="atbe" created="Thu, 14 Jul 2016 13:17:50 +0000"  >&lt;p&gt;More descriptive version of issue: &lt;a href=&quot;http://stackoverflow.com/questions/38375308/mongoclient-instantiation-using-ipv6-address-throws-mongoexception-host-and-po&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://stackoverflow.com/questions/38375308/mongoclient-instantiation-using-ipv6-address-throws-mongoexception-host-and-po&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="293018">JAVA-2220</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|hsnkf3:</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>