<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:58:08 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>[SERVER-1813] replSet does not work when bind=&quot;internal_ip&quot;</title>
                <link>https://jira.mongodb.org/browse/SERVER-1813</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;server started with&lt;/p&gt;

&lt;p&gt;bind=internal_ip&lt;br/&gt;
replSet=set1&lt;/p&gt;

&lt;p&gt;&amp;gt; rs.initiate()&lt;br/&gt;
{&lt;br/&gt;
        &quot;startupStatus&quot; : 4,&lt;br/&gt;
        &quot;info&quot; : &quot;set1&quot;,&lt;br/&gt;
        &quot;errmsg&quot; : &quot;all members and seeds must be reachable to initiate set&quot;,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;works when &apos;bind&apos; is not specified but then it&apos;s impossible to rs.add(&apos;internal_ip&apos;)&lt;/p&gt;</description>
                <environment>centos</environment>
        <key id="13129">SERVER-1813</key>
            <summary>replSet does not work when bind=&quot;internal_ip&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="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="gilles">Gilles Devaux</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Sep 2010 16:54:57 +0000</created>
                <updated>Tue, 12 Jul 2016 00:17:31 +0000</updated>
                            <resolved>Mon, 27 Sep 2010 23:00:39 +0000</resolved>
                                    <version>1.6.1</version>
                                    <fixVersion>1.7.1</fixVersion>
                                                        <votes>2</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="21038" author="jeff_y" created="Sat, 4 Dec 2010 01:07:46 +0000"  >&lt;p&gt;We would like to see this change backported to 1.6.x.&lt;/p&gt;</comment>
                            <comment id="18895" author="eliot" created="Tue, 5 Oct 2010 12:21:34 +0000"  >&lt;p&gt;Its only in 1.7 now.&lt;br/&gt;
We might be able to backport.&lt;br/&gt;
Can you verify 1.7 works in your environment?&lt;/p&gt;</comment>
                            <comment id="18894" author="ask" created="Tue, 5 Oct 2010 09:57:01 +0000"  >&lt;p&gt;Is this fix in the 1.6.x snapshots or only in 1.7.x?  It bit us, too...&lt;/p&gt;</comment>
                            <comment id="18614" author="redbeard0531" created="Mon, 27 Sep 2010 23:00:39 +0000"  >&lt;p&gt;I&apos;ve merged in Gilles&apos;s changes and made the modifications requested by dwight. Please reopen if you still have this issue in the latest codebase.&lt;/p&gt;</comment>
                            <comment id="18613" author="auto" created="Mon, 27 Sep 2010 22:58:30 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;RedBeard0531&apos;, &apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;email&apos;: &apos;redbeard0531@gmail.com&apos;}
&lt;p&gt;Message: Move bind_ip handling from me() to Me(). &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1813&quot; title=&quot;replSet does not work when bind=&amp;quot;internal_ip&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1813&quot;&gt;&lt;del&gt;SERVER-1813&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/8f6b5ab3d2fade6a6f6b37af48f55b5a204a6401&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/8f6b5ab3d2fade6a6f6b37af48f55b5a204a6401&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="18612" author="auto" created="Mon, 27 Sep 2010 22:58:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;gilles&apos;, &apos;name&apos;: &apos;gilles&apos;, &apos;email&apos;: &apos;gilles@peerpong.com&apos;}
&lt;p&gt;Message: Don&apos;t need to copy bind_ip &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1813&quot; title=&quot;replSet does not work when bind=&amp;quot;internal_ip&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1813&quot;&gt;&lt;del&gt;SERVER-1813&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/aab1fcff76c2374692f8c56bfefea3e6203a6eb4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/aab1fcff76c2374692f8c56bfefea3e6203a6eb4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="18611" author="auto" created="Mon, 27 Sep 2010 22:58:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;&apos;, &apos;name&apos;: &apos;root&apos;, &apos;email&apos;: &apos;root@mongotest1.peerpong.net&apos;}
&lt;p&gt;Message: Make hostname.me() smarter&lt;br/&gt;
Use hostname.me() when creating a repl config from scratch&lt;/p&gt;

&lt;p&gt;bug #&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1813&quot; title=&quot;replSet does not work when bind=&amp;quot;internal_ip&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1813&quot;&gt;&lt;del&gt;SERVER-1813&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-1813&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-1813&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/1cefd8cc5dbd9901b9de21c3e07dcefdca172d3e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/1cefd8cc5dbd9901b9de21c3e07dcefdca172d3e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="18610" author="auto" created="Mon, 27 Sep 2010 22:58:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;&apos;, &apos;name&apos;: &apos;root&apos;, &apos;email&apos;: &apos;root@mongotest1.peerpong.net&apos;}
&lt;p&gt;Message: Make hostname.me() smarter&lt;br/&gt;
Use hostname.me() when creating a repl config from scratch&lt;/p&gt;

&lt;p&gt;bug #&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1813&quot; title=&quot;replSet does not work when bind=&amp;quot;internal_ip&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1813&quot;&gt;&lt;del&gt;SERVER-1813&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-1813&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-1813&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/1cefd8cc5dbd9901b9de21c3e07dcefdca172d3e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/1cefd8cc5dbd9901b9de21c3e07dcefdca172d3e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="18569" author="destari" created="Mon, 27 Sep 2010 18:51:58 +0000"  >&lt;p&gt;Just want to add I have this same issue.  I also prefer #1 for the same reasons as Gilles.&lt;/p&gt;</comment>
                            <comment id="18497" author="gilles" created="Fri, 24 Sep 2010 16:53:22 +0000"  >&lt;p&gt;I just tested an explicit initiate and it still does not work, thought I don&apos;t understand why:&lt;/p&gt;

&lt;p&gt;&amp;gt; config = {_id: &apos;set1&apos;, members: [&lt;br/&gt;
...                           {_id: 0, host: &apos;10.177.163.57:27017&apos;},&lt;br/&gt;
...                           {_id: 1, host: &apos;10.177.163.62:27017&apos;}]&lt;br/&gt;
... }&lt;br/&gt;
{&lt;br/&gt;
        &quot;_id&quot; : &quot;set1&quot;,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 0,
                        &quot;host&quot; : &quot;10.177.163.57:27017&quot;
                }
&lt;p&gt;,&lt;/p&gt;
                {
                        &quot;_id&quot; : 1,
                        &quot;host&quot; : &quot;10.177.163.62:27017&quot;
                }
&lt;p&gt;        ]&lt;br/&gt;
}&lt;br/&gt;
&amp;gt; config&lt;br/&gt;
{&lt;br/&gt;
        &quot;_id&quot; : &quot;set1&quot;,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 0,
                        &quot;host&quot; : &quot;10.177.163.57:27017&quot;
                }
&lt;p&gt;,&lt;/p&gt;
                {
                        &quot;_id&quot; : 1,
                        &quot;host&quot; : &quot;10.177.163.62:27017&quot;
                }
&lt;p&gt;        ]&lt;br/&gt;
}&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; rs.initiate(config)&lt;br/&gt;
{&lt;br/&gt;
        &quot;startupStatus&quot; : 4,&lt;br/&gt;
        &quot;info&quot; : &quot;set1&quot;,&lt;br/&gt;
        &quot;errmsg&quot; : &quot;all members and seeds must be reachable to initiate set&quot;,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
}&lt;br/&gt;
&amp;gt; rs.conf() &lt;br/&gt;
null&lt;/p&gt;

&lt;p&gt;both IPs are accessible with telnet from both machines&lt;/p&gt;

&lt;p&gt;could it be mongo removes IPs that are &apos;self&apos; during initiate() and add ::Me() ?&lt;/p&gt;

&lt;p&gt;if you don&apos;t mind me saying I also prefer #1. The reason is we don&apos;t use BIND or any internal DNS server (startup, eng doing ops, BIND is a nightmare) -&amp;gt; we are IP based only, we limit possible casualties by having a provisioning system so we can change config very quickly. Since hostname is not always available when IP is specified -&amp;gt; should use IP, when hostname is specified -&amp;gt; hostname is ok&lt;/p&gt;</comment>
                            <comment id="18496" author="eliot" created="Fri, 24 Sep 2010 15:49:41 +0000"  >&lt;p&gt;We should do #1.&lt;br/&gt;
IPs are often better than hostnames anyway since hostnames tend to be meaningless, and in the worst case duplicates .&lt;/p&gt;</comment>
                            <comment id="18495" author="dwight_10gen" created="Fri, 24 Sep 2010 15:44:31 +0000"  >&lt;p&gt;mathias,&lt;/p&gt;

&lt;p&gt;the only place HostAndPort::Me() is used is in the auto-initiation of a set with no explicit config.  in that case we need to infer the machine&apos;s true name.  this is a convenience thing one can always explicitly specify the hostname.  thus we can&apos;t use me(), at least as-is.&lt;/p&gt;

&lt;p&gt;i think there are two possible options:&lt;/p&gt;

&lt;p&gt;(1)  the patch suggested above (although it should go in HostAndPort::Me()) &amp;#8211; that is use the --bindip command line parm.  the one issue with this is the repl set config will then contain an IP address instead of a logical hostname?&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;(2) when bindip is in use, have Me() assert.  additionally, make auto replSetInitiate return a nice error message in that case saying explicit initiation will be required.&lt;/p&gt;

&lt;p&gt;Eliot do you prefer #1 or #2?&lt;/p&gt;</comment>
                            <comment id="18494" author="dwight_10gen" created="Fri, 24 Sep 2010 15:38:11 +0000"  >&lt;p&gt;@Gilles thanks for reporting this.  i believe if you initiate explicitly, instead of using the defaults, it will work.  i.e. : &lt;/p&gt;

&lt;p&gt;&amp;gt; rs.initiate( &lt;/p&gt;
{ _id : setname, members : ... }
&lt;p&gt; )&lt;/p&gt;

&lt;p&gt;instead of &lt;/p&gt;

&lt;p&gt;&amp;gt; rs.initiate()&lt;/p&gt;

&lt;p&gt;will look into further.&lt;/p&gt;</comment>
                            <comment id="18467" author="redbeard0531" created="Thu, 23 Sep 2010 18:38:14 +0000"  >&lt;p&gt;Dwight, can we get rid of HostAndPort::Me() and just use me()? Using the real hostname seems likely to result in issues with --bind_ip&lt;/p&gt;</comment>
                            <comment id="18438" author="gilles" created="Wed, 22 Sep 2010 17:24:37 +0000"  >&lt;p&gt;I have a fix here, tested for my use case (no seed in --replSet, rs.initiate())&lt;br/&gt;
&lt;a href=&quot;http://github.com/gilles/mongo/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/gilles/mongo/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to use it. Two things:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;I don&apos;t know the mongo code enough to see if this change has side effect, please double check&lt;/li&gt;
	&lt;li&gt;My C / C++ is old, forgive me if it sucks&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="18434" author="gilles" created="Wed, 22 Sep 2010 16:23:36 +0000"  >&lt;p&gt;Correct what I said, in case of rs.initiate() it seems the server uses gethostname(), not localhost&lt;/p&gt;

&lt;p&gt;rs_initiate.cpp:190&lt;br/&gt;
members.append(&quot;0&quot;, BSON( &quot;_id&quot; &amp;lt;&amp;lt; 0 &amp;lt;&amp;lt; &quot;host&quot; &amp;lt;&amp;lt; HostAndPort::Me().toString() ));&lt;/p&gt;

&lt;p&gt;-&amp;gt; HostAndPort::Me() uses gethostname() while HostAndPort::me() uses &apos;localhost&apos;&lt;/p&gt;</comment>
                            <comment id="18427" author="gilles" created="Wed, 22 Sep 2010 15:27:46 +0000"  >&lt;p&gt;This does not work, it seems &apos;localhost&apos; is transformed into the equivalent of `hostname -a` -&amp;gt; mongotest1. This name then maps to the public_ip of the machine, the server still does not listen there.&lt;/p&gt;

&lt;p&gt;&amp;gt; rs.initiate()&lt;br/&gt;
{&lt;br/&gt;
        &quot;info2&quot; : &quot;no configuration explicitly specified &amp;#8211; making one&quot;,&lt;br/&gt;
        &quot;errmsg&quot; : &quot;couldn&apos;t initiate : need members up to initiate, not ok : mongotest1:27017&quot;,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;This is exactly: &lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-1775&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-1775&lt;/a&gt; except that I think the title of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1775&quot; title=&quot;ReplicaSets require listening on localhost&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1775&quot;&gt;&lt;del&gt;SERVER-1775&lt;/del&gt;&lt;/a&gt; is wrong, ReplicaSets require listening on all interfaces.&lt;/p&gt;</comment>
                            <comment id="18415" author="redbeard0531" created="Wed, 22 Sep 2010 03:15:40 +0000"  >&lt;p&gt;Could you try --bind_ip &quot;localhost,internal_ip&quot; so that you are listening on both?&lt;/p&gt;

&lt;p&gt;This may be related to &lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-1775&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-1775&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="18391" author="gilles" created="Tue, 21 Sep 2010 16:59:25 +0000"  >&lt;p&gt;When using seeds&lt;/p&gt;

&lt;p&gt;#common&lt;br/&gt;
bind_ip = 10.177.163.57&lt;br/&gt;
port = 27017&lt;br/&gt;
nssize = 16&lt;br/&gt;
verbose = true&lt;/p&gt;

&lt;p&gt;#master / slave / pair / replSet (empty of none defined)&lt;br/&gt;
replSet = set1/10.177.163.57:27017,10.177.163.62:27017&lt;/p&gt;

&lt;p&gt;&amp;gt; rs.initiate()&lt;br/&gt;
{&lt;br/&gt;
        &quot;startupStatus&quot; : 4,&lt;br/&gt;
        &quot;info&quot; : &quot;set1/10.177.163.57:27017,10.177.163.62:27017&quot;,&lt;br/&gt;
        &quot;errmsg&quot; : &quot;all members and seeds must be reachable to initiate set&quot;,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;probably because:&lt;br/&gt;
Tue Sep 21 16:56:41 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; replSet ignoring seed 10.177.163.57:27017 (=self)&lt;/p&gt;

&lt;p&gt;=&amp;gt; replSet is still looking for &apos;localhost&apos;&lt;/p&gt;</comment>
                            <comment id="18390" author="gilles" created="Tue, 21 Sep 2010 16:47:58 +0000"  >&lt;p&gt;Can you be more explicit when you say &quot;internal ip&quot; &lt;br/&gt;
Is that localhost? lan? &lt;/p&gt;

&lt;p&gt;What happens when you don&apos;t use bind and do rs.add( &quot;internal ip&quot; )&lt;/p&gt;

&lt;p&gt;the machines have three network interfaces: lo / eth0 / eth1&lt;/p&gt;

&lt;p&gt;eth0 is assigned with a public_ip, accessible from the external world&lt;br/&gt;
eth1 is assigned with a private_ip, accessible from the internal network only&lt;/p&gt;

&lt;p&gt;I have 2 machines, mongotest1 and mongotest2&lt;/p&gt;

&lt;p&gt;case 1:&lt;br/&gt;
------------&lt;br/&gt;
mongod.cf:&lt;br/&gt;
#common&lt;br/&gt;
bind_ip = 10.177.163.57&lt;br/&gt;
port = 27017&lt;br/&gt;
#master / slave / pair / replSet (empty of none defined)&lt;br/&gt;
replSet = set1&lt;/p&gt;

&lt;p&gt;&amp;gt; rs.initiate() &lt;br/&gt;
{ &lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&quot;startupStatus&quot; : 4, &lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&quot;info&quot; : &quot;set1&quot;, &lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&quot;errmsg&quot; : &quot;all members and seeds must be reachable to initiate set&quot;, &lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&quot;ok&quot; : 0 &lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;case 2:&lt;br/&gt;
------------&lt;br/&gt;
mongod.cf:&lt;br/&gt;
#common&lt;br/&gt;
#bind_ip = 10.177.163.57&lt;br/&gt;
port = 27017&lt;br/&gt;
#master / slave / pair / replSet (empty of none defined)&lt;br/&gt;
replSet = set1&lt;/p&gt;

&lt;p&gt;&amp;gt; rs.initiate() &lt;br/&gt;
{ &lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&quot;startupStatus&quot; : 4, &lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&quot;info&quot; : &quot;set1&quot;, &lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&quot;errmsg&quot; : &quot;all members and seeds must be reachable to initiate set&quot;, &lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&quot;ok&quot; : 0 &lt;br/&gt;
}&lt;br/&gt;
&amp;gt; rs.initiate()&lt;br/&gt;
{&lt;br/&gt;
        &quot;info2&quot; : &quot;no configuration explicitly specified &amp;#8211; making one&quot;,&lt;br/&gt;
        &quot;info&quot; : &quot;Config now saved locally.  Should come online in about a minute.&quot;,&lt;br/&gt;
        &quot;ok&quot; : 1&lt;br/&gt;
}&lt;br/&gt;
&amp;gt; rs.conf()&lt;br/&gt;
{&lt;br/&gt;
        &quot;_id&quot; : &quot;set1&quot;,&lt;br/&gt;
        &quot;version&quot; : 1,&lt;br/&gt;
        &quot;members&quot; : [&lt;/p&gt;
                {
                        &quot;_id&quot; : 0,
                        &quot;host&quot; : &quot;mongotest1:27017&quot;
                }
&lt;p&gt;        ]&lt;br/&gt;
}&lt;br/&gt;
&amp;gt;&lt;/p&gt;

&lt;p&gt;From here I can do:&lt;br/&gt;
rs.add(private_ip_mongotest2)&lt;br/&gt;
-&amp;gt; works&lt;/p&gt;

&lt;p&gt;mongotest1&lt;br/&gt;
&amp;gt; rs.conf()&lt;br/&gt;
{&lt;br/&gt;
        &quot;_id&quot; : &quot;set1&quot;,&lt;br/&gt;
        &quot;version&quot; : 2,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 0,
                        &quot;host&quot; : &quot;mongotest1:27017&quot;
                }
&lt;p&gt;,&lt;/p&gt;
                {
                        &quot;_id&quot; : 1,
                        &quot;host&quot; : &quot;10.177.163.62&quot;
                }
&lt;p&gt;        ]&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;mongotest2:&lt;br/&gt;
&amp;gt; rs.conf()&lt;br/&gt;
{&lt;br/&gt;
        &quot;_id&quot; : &quot;set1&quot;,&lt;br/&gt;
        &quot;version&quot; : 2,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 0,
                        &quot;host&quot; : &quot;mongotest1:27017&quot;
                }
&lt;p&gt;,&lt;/p&gt;
                {
                        &quot;_id&quot; : 1,
                        &quot;host&quot; : &quot;10.177.163.62&quot;
                }
&lt;p&gt;        ]&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;then the first member of the set is the public_id.&lt;br/&gt;
 When the configuration will broadcasted, mongotest2 will try to use the dns name bound to the public_ip to communicate with mongotest1.&lt;/p&gt;

&lt;p&gt;I&apos;m reluctant to expose mongo to the external world for security reasons.&lt;/p&gt;

&lt;p&gt;It seems that the replSet can&apos;t find &apos;self&apos; when the server is bound to a private ip&lt;/p&gt;

&lt;p&gt;I think I got it:&lt;br/&gt;
replSet adds configs.push_back( ReplSetConfig(HostAndPort::me()) ); automatically (rs.cpp:439)&lt;br/&gt;
HostAndPort::me() is hardcoded &apos;localhost&apos;, cmdLine.port&lt;br/&gt;
=&amp;gt; hostandport.h:46&lt;/p&gt;

&lt;p&gt;The server is not bound to localhost when bind_ip is in the configuration&lt;/p&gt;

&lt;p&gt;I will run some more tests adding seeds in the replSet config line&lt;/p&gt;</comment>
                            <comment id="18363" author="eliot" created="Tue, 21 Sep 2010 02:30:58 +0000"  >&lt;p&gt;Can you be more explicit when you say &quot;internal ip&quot;&lt;br/&gt;
Is that localhost?  lan?&lt;/p&gt;

&lt;p&gt;What happens when you don&apos;t use bind and do rs.add( &quot;internal ip&quot; )&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 21 Sep 2010 02:30:58 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 11 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 11 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ask</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>dwight@mongodb.com</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>destari</customfieldvalue>
            <customfieldvalue>gilles</customfieldvalue>
            <customfieldvalue>jeff_y</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpeuf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrijhj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21809</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsj9in:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>