<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:54 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-714] Connection refused by Java driver but allowed by shell</title>
                <link>https://jira.mongodb.org/browse/JAVA-714</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I had been able to connect and work with the database, but all of a sudden I started getting &quot;Connection refused&quot; errors. I can still connect to mongod from the command line. I checked the bug reports and changed host from &quot;localhost&quot; to 127.0.0.1.  But that hasn&apos;t helped.  Here&apos;s the stack-trace:&lt;br/&gt;
Caused by: com.mongodb.MongoException$Network: can&apos;t call something : local/192.168.1.44:27017/test&lt;br/&gt;
	at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:227)&lt;br/&gt;
	at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:305)&lt;br/&gt;
	at com.mongodb.DB.command(DB.java:160)&lt;br/&gt;
	at com.mongodb.DB.command(DB.java:183)&lt;br/&gt;
	at com.mongodb.DB.command(DB.java:144)&lt;br/&gt;
	at com.mongodb.DBCollection.drop(DBCollection.java:765)&lt;br/&gt;
	at com.mongodb.DBApiLayer$MyCollection.drop(DBApiLayer.java:206)&lt;br/&gt;
	at org.springframework.data.mongodb.core.MongoTemplate$7.doInCollection(MongoTemplate.java:430)&lt;br/&gt;
	at org.springframework.data.mongodb.core.MongoTemplate$7.doInCollection(MongoTemplate.java:428)&lt;br/&gt;
	at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:368)&lt;br/&gt;
	... 31 more&lt;br/&gt;
Caused by: java.io.IOException: couldn&apos;t connect to &lt;span class=&quot;error&quot;&gt;&amp;#91;local/192.168.1.44:27017&amp;#93;&lt;/span&gt; bc:java.net.ConnectException: Connection refused&lt;br/&gt;
	at com.mongodb.DBPort._open(DBPort.java:228)&lt;br/&gt;
	at com.mongodb.DBPort.go(DBPort.java:112)&lt;br/&gt;
	at com.mongodb.DBPort.call(DBPort.java:79)&lt;br/&gt;
	at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:218)&lt;/p&gt;

&lt;p&gt;Here&apos;s my Spring configuration for Mongo:&lt;br/&gt;
    &amp;lt;bean id=&quot;mongoTemplate&quot; class=&quot;org.springframework.data.mongodb.core.MongoTemplate&quot;&amp;gt;&lt;br/&gt;
		&amp;lt;constructor-arg name=&quot;mongoDbFactory&quot; ref=&quot;mongoDbFactory&quot; /&amp;gt;&lt;br/&gt;
	&amp;lt;/bean&amp;gt;&lt;/p&gt;

&lt;p&gt;	&amp;lt;mongo:db-factory id=&quot;mongoDbFactory&quot; dbname=&quot;hledb&quot; host=&quot;127.0.0.1&quot; port=&quot;27017&quot;/&amp;gt; &lt;/p&gt;</description>
                <environment>Mac 10.7.5</environment>
        <key id="59247">JAVA-714</key>
            <summary>Connection refused by Java driver but allowed by shell</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="-1">Unassigned</assignee>
                                    <reporter username="mezulu">Prasan Kaikini</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Dec 2012 05:59:23 +0000</created>
                <updated>Sat, 15 Dec 2012 12:27:03 +0000</updated>
                            <resolved>Sat, 15 Dec 2012 12:27:03 +0000</resolved>
                                    <version>2.9.1</version>
                                                    <component>Connection Management</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="215774" author="jeff.yemin" created="Sat, 15 Dec 2012 12:27:03 +0000"  >&lt;p&gt;OK, thanks for the update.  Let me know if you figure out what Tomcat is doing to cause this problem, as perhaps others are encountering it as well.&lt;/p&gt;</comment>
                            <comment id="215589" author="mezulu" created="Sat, 15 Dec 2012 04:20:48 +0000"  >&lt;p&gt;Here&apos;s my /etc/hosts:&lt;br/&gt;
##&lt;br/&gt;
127.0.0.1	localhost&lt;br/&gt;
255.255.255.255	broadcasthost&lt;br/&gt;
::1             localhost &lt;br/&gt;
fe80::1%lo0	localhost&lt;/p&gt;

&lt;p&gt;Thanks for letting me not to use 2.9.1.&lt;/p&gt;

&lt;p&gt;Also, I think it had something to do with my Tomcat.  I wrote a small Java test program to try to access mongo without Tomcat, and it worked.  I restarted Tomcat, but that didn&apos;t help.  I restarted my laptop, but that didn&apos;t help either.  So I reinstalled Tomcat and that fixed it.&lt;/p&gt;</comment>
                            <comment id="215554" author="jeff.yemin" created="Sat, 15 Dec 2012 03:08:22 +0000"  >&lt;p&gt;Anything interesting in /etc/hosts?  Can you post it?&lt;/p&gt;</comment>
                            <comment id="215552" author="jeff.yemin" created="Sat, 15 Dec 2012 03:06:58 +0000"  >&lt;p&gt;Not sure what&apos;s happening here, but wanted to let you know ASAP not to use 2.9.1 as it contains a serious bug.  Please upgrade to 2.9.3 or 2.10.1.&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|hrl2dz:</customfieldvalue>

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