title: Atlas MongoDB getting timeout occured after 30000ms when hosted ubuntu 16.04 LTS, using .Net mongodb driver
body: <p>From local system .NET standard 2.0 with mongo driver 2.7.3 connecting to Atlas mongodb and listing change stream working.</p>
  
  <p>When i deploy the same system on to ubuntu 16.04 LTS it is throwing below error. </p>
  
  <p>Connection string:</p>
  
  <pre><code>mongodb://xxxxxx:xxxxx@mycluster-shard-00-00- 
  xxxx.mongodb.net:27017,mycluster-shard-00-01- 
  xxxx.mongodb.net:27017,mycluster-shard-00-02-xxxx.mongodb.net:27017/test?ssl=true&amp; 
  replicaSet=Cluster-shard-0&amp;retryWrites=true
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>             A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }.
              Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/mycluster-shard-00-00-xxxx.mongodb.net:27017" }", EndPoint: "U
              nspecified/mycluster-shard-00-00-xxxx.mongodb.net:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---&gt; System.IO.IOException: Th
              e authentication or decryption has failed. ---&gt; System.IO.IOException: The authentication or decryption has failed. ---&gt; Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.#012  at Mono.Security.Protocol.Tls.RecordProtocol.E
              ndReceiveRecord (System.IAsyncResult asyncResult) [0x00037] in &lt;081f2539f5f74de086ddfa5e875c2fff&gt;:0 #012  at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (System.IAsyncResult ar, System.Boolean ignoreEmpty) [0x00000] in &lt;081f2539f5f74de086
              ddfa5e875c2fff&gt;:0 #012  at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (System.IAsyncResult result) [0x00071] in &lt;081f2539f5f74de086ddfa5e875c2fff&gt;:0 #012   --- End of inner exception stack trace ---#012  at Mono.Security.Protocol.Tls.SslClient
              Stream.EndNegotiateHandshake (System.IAsyncResult result) [0x00032] in &lt;081f2539f5f74de086ddfa5e875c2fff&gt;:0 #012  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in &lt;081f2539f5f74de086ddfa5e875c2
              fff&gt;:0 #012   --- End of inner exception stack trace ---#012  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult asyncResult) [0x0004b] in &lt;081f2539f5f74de086ddfa5e875c2fff&gt;:0 #012  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticate
              AsClient (System.IAsyncResult asyncResult) [0x0000e] in &lt;8ad536febd8d4466a395baa742076330&gt;:0 #012  at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endActio
              n, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x00019] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012--- End of stack trace from previous location where exception was thrown ---#012  at System.Runtime.ExceptionService
              s.ExceptionDispatchInfo.Throw () [0x0000c] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runti
              me.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [
              0x00008] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at MongoDB.Driver.Core.Connections.SslStreamFactory+&lt;Cre
              ateStreamAsync&gt;d__4.MoveNext () [0x00182] in &lt;50e51985348f46898d8a3c7759e943e8&gt;:0 #012--- End of stack trace from previous location where exception was thrown ---#012  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in &lt;f5397d5e4dd1
              46a1b2f33671be050366&gt;:0 #012  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebugger
              Notification (System.Threading.Tasks.Task task) [0x00028] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at Syst
              em.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at MongoDB.Driver.Core.Connections.BinaryConnection+&lt;OpenHelperAsync&gt;d__48.MoveNext () [0x000b6] in &lt;50e
              51985348f46898d8a3c7759e943e8&gt;:0 #012   --- End of inner exception stack trace ---#012  at MongoDB.Driver.Core.Connections.BinaryConnection+&lt;OpenHelperAsync&gt;d__48.MoveNext () [0x001b4] in &lt;50e51985348f46898d8a3c7759e943e8&gt;:0 #012--- End of stack trace from previou
              s location where exception was thrown ---#012  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.T
              ask task) [0x0003e] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runtime
              .CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in &lt;f5397d5e4dd146a1b2f33671be050366&gt;:0 #012  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+Config
  </code></pre>
  
  <p>Stack trace:</p>
  
  <pre><code>            at MongoDB.Driver.Core.Clusters.Cluster.ThrowTimeoutException (MongoDB.Driver.Core.Clusters.ServerSelectors.IServerSelector selector, MongoDB.Driver.Core.Clusters.ClusterDescription description) [0x00013] in &lt;50e51985348f46898d8a3
              c7759e943e8&gt;:0 #012  at MongoDB.Driver.Core.Clusters.Cluster+WaitForDescriptionChangedHelper.HandleCompletedTask (System.Threading.Tasks.Task completedTask) [0x00009] in &lt;50e51985348f46898d8a3c7759e943e8&gt;:0 #012  at MongoDB.Driver.Core.Clusters.Cluster.WaitForD
              escriptionChanged (MongoDB.Driver.Core.Clusters.ServerSelectors.IServerSelector selector, MongoDB.Driver.Core.Clusters.ClusterDescription description, System.Threading.Tasks.Task descriptionChangedTask, System.TimeSpan timeout, System.Threading.Cancellati
              onToken cancellationToken) [0x00021] in &lt;50e51985348f46898d8a3c7759e943e8&gt;:0 #012  at MongoDB.Driver.Core.Clusters.Cluster.SelectServer (MongoDB.Driver.Core.Clusters.ServerSelectors.IServerSelector selector, System.Threading.CancellationToken cancellationTok
              en) [0x00057] in &lt;50e51985348f46898d8a3c7759e943e8&gt;:0 #012  at MongoDB.Driver.MongoClient.AreSessionsSupportedAfterServerSelection (System.Threading.CancellationToken cancellationToken) [0x00006] in &lt;e62075b47b974b1bb87a7dfdf33dbed3&gt;:0 #012  at MongoDB.Driver.M
              ongoClient.AreSessionsSupported (System.Threading.CancellationToken cancellationToken) [0x0001b] in &lt;e62075b47b974b1bb87a7dfdf33dbed3&gt;:0 #012  at MongoDB.Driver.MongoClient.StartImplicitSession (System.Threading.CancellationToken cancellationToken) [0x00000]
              in &lt;e62075b47b974b1bb87a7dfdf33dbed3&gt;:0 #012  at MongoDB.Driver.OperationExecutor.StartImplicitSession (System.Threading.CancellationToken cancellationToken) [0x00000] in &lt;e62075b47b974b1bb87a7dfdf33dbed3&gt;:0 #012  at MongoDB.Driver.MongoCollectionImpl`1[TDocum
              ent].UsingImplicitSession[TResult] (System.Func`2[T,TResult] func, System.Threading.CancellationToken cancellationToken) [0x00000] in &lt;e62075b47b974b1bb87a7dfdf33dbed3&gt;:0 #012  at MongoDB.Driver.MongoCollectionImpl`1[TDocument].Watch[TResult] (MongoDB.Driver
              .PipelineDefinition`2[TInput,TOutput] pipeline, MongoDB.Driver.ChangeStreamOptions options, System.Threading.CancellationToken cancellationToken) [0x0002f] in &lt;e62075b47b974b1bb87a7dfdf33dbed3&gt;:0 #012  at StateDataStore.CloudControlRoomState.Listen () [0x001
              41] in &lt;97005dd8325444bca5185303cdcf2ece&gt;:0
              Warning: Failed to connect to the agentx master agent ([NIL]):
  enter code here
  </code></pre>
  
  <p>any help!</p>