<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:56 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-1195] Driver is not re-establishing connection to MongoDb</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1195</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Operation execution is not restored after the service restart. Seems like this is only the issue for ASP.NET apps, hence console app is able to restore connection/operation execution when the service as back online again.&lt;/p&gt;</description>
                <environment>* Windows 7 Ent., .NET FW-4.5.2, ASP.NET Web.Api application&lt;br/&gt;
* MongoDb: v-3.0.x, single server setup</environment>
        <key id="190401">CSHARP-1195</key>
            <summary>Driver is not re-establishing connection to MongoDb</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="iiwaasnet">Sergey Ivasenko</reporter>
                        <labels>
                            <label>rc</label>
                    </labels>
                <created>Wed, 18 Mar 2015 15:36:43 +0000</created>
                <updated>Sat, 2 Apr 2016 00:50:57 +0000</updated>
                            <resolved>Thu, 19 Mar 2015 15:47:58 +0000</resolved>
                                                    <fixVersion>2.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="858178" author="iiwaasnet" created="Thu, 19 Mar 2015 18:51:02 +0000"  >&lt;p&gt;Hi Craig,&lt;/p&gt;

&lt;p&gt;Your commit fixed the issue, connection is restored now.&lt;/p&gt;

&lt;p&gt;Thanks a lot!&lt;br/&gt;
Sergey&lt;/p&gt;</comment>
                            <comment id="857930" author="iiwaasnet" created="Thu, 19 Mar 2015 15:53:44 +0000"  >&lt;p&gt;Yes, we&apos;ll do that and come back with the results.&lt;/p&gt;

&lt;p&gt;Thanks a lot,&lt;br/&gt;
Sergey&lt;/p&gt;</comment>
                            <comment id="857920" author="craiggwilson" created="Thu, 19 Mar 2015 15:47:58 +0000"  >&lt;p&gt;Sergey, thanks so much for the report. I was able to reproduce this problem. After many false leads, we found some missing ConfigureAwaits in the code. After adding these, I can&apos;t reproduce this problem anymore. If you wouldn&apos;t mind pulling master and ensuring the problem is gone, that&apos;d be most helpful.&lt;/p&gt;

&lt;p&gt;Thanks again.&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                            <comment id="857918" author="iiwaasnet" created="Thu, 19 Mar 2015 15:46:56 +0000"  >&lt;p&gt;Thanks a lot, Craig!&lt;/p&gt;</comment>
                            <comment id="857900" author="craiggwilson" created="Thu, 19 Mar 2015 15:34:06 +0000"  >&lt;p&gt;Commit: &lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/1c6fa135c46cf35887809a7021636d93174ab770&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/1c6fa135c46cf35887809a7021636d93174ab770&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="856850" author="iiwaasnet" created="Wed, 18 Mar 2015 15:56:06 +0000"  >&lt;p&gt;Hi Craig,&lt;/p&gt;

&lt;p&gt;Thanks for quick reply!&lt;/p&gt;

&lt;p&gt;1. Driver 2.0.0-rc0 (2.0.0.788)&lt;br/&gt;
2. Test case:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;MongoDb service is running&lt;/li&gt;
	&lt;li&gt;Request data from collection =&amp;gt; result returned&lt;/li&gt;
	&lt;li&gt;Stop MongoDb service&lt;/li&gt;
	&lt;li&gt;Request data from collection =&amp;gt; Web.Api app logs 3 exception:&lt;br/&gt;
       1. System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it... &amp;lt;TRUNCATED&amp;gt;&lt;br/&gt;
       2. ERROR System.Runtime.Serialization.SerializationException: Type &apos;MongoDB.Driver.MongoConnectionException&apos; with data contract name &apos;MongoConnectionException:&lt;a href=&quot;http://schemas.datacontract.org/2004/07/MongoDB.Driver&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://schemas.datacontract.org/2004/07/MongoDB.Driver&lt;/a&gt;&apos; is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.&lt;br/&gt;
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)&lt;br/&gt;
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiTypeAtTopLevel(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType)&lt;br/&gt;
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)&lt;br/&gt;
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)&lt;br/&gt;
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)&lt;br/&gt;
   at System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter writer, Object graph)&lt;br/&gt;
   at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content)&lt;br/&gt;
   at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;
		&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
			&lt;li&gt;End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at System.Web.Http.WebHost.HttpControllerHandler.&amp;lt;WriteBufferedResponseContentAsync&amp;gt;d__1b.MoveNext() GET Url:&lt;a href=&quot;http://xxxxxxxxx&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://xxxxxxxxx&lt;/a&gt;&lt;br/&gt;
     3. Same as (2)&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;Start MongoDb service&lt;/li&gt;
	&lt;li&gt;Request data from collection =&amp;gt; Exception: ERROR System.TimeoutException: Operation timed out after 00:00:10. ---&amp;gt; System.OperationCanceledException: The operation was canceled.&lt;br/&gt;
   at System.Threading.CancellationToken.ThrowOperationCanceledException()&lt;br/&gt;
   at MongoDB.Driver.Core.Clusters.Cluster.&amp;lt;WaitForDescriptionChangedAsync&amp;gt;d__1a.MoveNext()
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;
		&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
			&lt;li&gt;End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.Core.Clusters.Cluster.&amp;lt;SelectServerAsync&amp;gt;d__8.MoveNext()&lt;/li&gt;
			&lt;li&gt;End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.Core.Bindings.ReadPreferenceBinding.&amp;lt;GetReadChannelSourceAsync&amp;gt;d__0.MoveNext()&lt;/li&gt;
			&lt;li&gt;End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.Core.Operations.FindOperation`1.&amp;lt;ExecuteAsync&amp;gt;d__2.MoveNext()&lt;/li&gt;
			&lt;li&gt;End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.OperationExecutor.&amp;lt;ExecuteReadOperationAsync&amp;gt;d__0`1.MoveNext()  &amp;lt;TRUNCATED&amp;gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;If the web is recycled (iisreset), then app can query data again.&lt;br/&gt;
No caching done in app.&lt;/p&gt;</comment>
                            <comment id="856825" author="craiggwilson" created="Wed, 18 Mar 2015 15:39:56 +0000"  >&lt;p&gt;Hi Sergey, thanks for the report. Could you provide some more details:&lt;/p&gt;

&lt;p&gt;1. What version of the driver are you using?&lt;br/&gt;
2. Could you elaborate on the problem? When you say service restart, do you mean restarting the system, or IIS, or...? Perhaps you could provide a reproducible scenario and I&apos;ll attempt to reproduce it. Also, what are you expecting to happen.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Craig&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|hs78lb:</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>