<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:14 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>[CSHARP-241] Initiating a replica set through the driver fails</title>
                <link>https://jira.mongodb.org/browse/CSHARP-241</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Trying to initiate a replica set through the driver using the following code&lt;/p&gt;

&lt;p&gt;               var settings = new MongoServerSettings();&lt;br/&gt;
                settings.Server = new MongoServerAddress(&quot;localhost&quot;, 27017);&lt;br/&gt;
                settings.SlaveOk = true;&lt;br/&gt;
                var mongoServer = MongoServer.Create(settings);&lt;br/&gt;
                mongoServer.Connect();&lt;br/&gt;
                mongoServer.RunAdminCommand(&quot;replSetInitiate&quot;);&lt;/p&gt;

&lt;p&gt;Failed with exception &quot;Primary server not found.&quot; and stack trace&lt;br/&gt;
   at MongoDB.Driver.MongoServer.GetServerInstance(Boolean slaveOk) in C:\source\mongo-csharp-driver\Driver\Core\MongoServer.cs:line 949&lt;br/&gt;
   at MongoDB.Driver.MongoServer.AcquireConnection(MongoDatabase database, Boolean slaveOk) in C:\source\mongo-csharp-driver\Driver\Core\MongoServer.cs:line 874&lt;br/&gt;
   at MongoDB.Driver.MongoCursorEnumerator`1.AcquireConnection() in C:\source\mongo-csharp-driver\Driver\Core\MongoCursorEnumerator.cs:line 184&lt;br/&gt;
   at MongoDB.Driver.MongoCursorEnumerator`1.GetFirst() in C:\source\mongo-csharp-driver\Driver\Core\MongoCursorEnumerator.cs:line 194&lt;br/&gt;
   at MongoDB.Driver.MongoCursorEnumerator`1.MoveNext() in C:\source\mongo-csharp-driver\Driver\Core\MongoCursorEnumerator.cs:line 126&lt;br/&gt;
   at System.Linq.Enumerable.FirstOrDefault&lt;span class=&quot;error&quot;&gt;&amp;#91;TSource&amp;#93;&lt;/span&gt;(IEnumerable`1 source)&lt;br/&gt;
   at MongoDB.Driver.MongoCollection.FindOneAs&lt;span class=&quot;error&quot;&gt;&amp;#91;TDocument&amp;#93;&lt;/span&gt;(IMongoQuery query) in C:\source\mongo-csharp-driver\Driver\Core\MongoCollection.cs:line 493&lt;br/&gt;
   at MongoDB.Driver.MongoCollection`1.FindOne(IMongoQuery query) in C:\source\mongo-csharp-driver\Driver\Core\MongoCollection.cs:line 1451&lt;br/&gt;
   at MongoDB.Driver.MongoDatabase.RunCommandAs(Type commandResultType, IMongoCommand command) in C:\source\mongo-csharp-driver\Driver\Core\MongoDatabase.cs:line 737&lt;br/&gt;
   at MongoDB.Driver.MongoDatabase.RunCommandAs(Type commandResultType, String commandName) in C:\source\mongo-csharp-driver\Driver\Core\MongoDatabase.cs:line 765&lt;br/&gt;
   at MongoDB.Driver.MongoServer.RunAdminCommandAs(Type commandResultType, String commandName) in C:\source\mongo-csharp-driver\Driver\Core\MongoServer.cs:line 840&lt;br/&gt;
   at MongoDB.Driver.MongoServer.RunAdminCommandAs&lt;span class=&quot;error&quot;&gt;&amp;#91;TCommandResult&amp;#93;&lt;/span&gt;(String commandName) in C:\source\mongo-csharp-driver\Driver\Core\MongoServer.cs:line 814&lt;br/&gt;
   at MongoDB.Driver.MongoServer.RunAdminCommand(String commandName) in C:\source\mongo-csharp-driver\Driver\Core\MongoServer.cs:line 790&lt;br/&gt;
   at ConsoleApplication3.Program.RSStart() in C:\Users\Sridhar\Documents\Visual Studio 2010\Projects\ConsoleApplication3\ConsoleApplication3\Program.cs:line 39&lt;/p&gt;</description>
                <environment>C# Driver 1.1 on Windows 7 against MongoDB 1.1</environment>
        <key id="18074">CSHARP-241</key>
            <summary>Initiating a replica set through the driver fails</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="sridhar">Sridhar Nanjundeswaran</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 Jun 2011 16:23:24 +0000</created>
                <updated>Thu, 2 Apr 2015 18:27:51 +0000</updated>
                            <resolved>Thu, 9 Jun 2011 17:29:05 +0000</resolved>
                                    <version>1.1</version>
                                    <fixVersion>1.1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="36901" author="rstam" created="Thu, 9 Jun 2011 17:35:17 +0000"  >&lt;p&gt;FYI, this wasn&apos;t a replica set specific issue. It was an issue with commands in general when ConnectionMode is Direct and SlaveOk is true.&lt;/p&gt;</comment>
                            <comment id="36898" author="rstam" created="Thu, 9 Jun 2011 17:29:05 +0000"  >&lt;p&gt;CommandCollection SlaveOk only set to false if ConnectionMode is ReplicaSet. GetServerInstance just returns the one and only instance unless ConnectionMode is ReplicaSet.&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|hrh8vb:</customfieldvalue>

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