cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to run a C# Dotnet 6 ver Service when Dynatrace monitoring enabled.

rkalapati
Newcomer

Dynatrace is interfering and c# DOTNET 6 version Service  raising the below error. Can not run the service with Monitoring enabled.

 

DOTNETQ3WT1 UpdateSessionContext: Object reference not set to an instance of an object.

System.NullReferenceException: Object reference not set to an instance of an object.

   at Dynatrace.OneAgent.Sensor.IsEntryPoint()

   at Dynatrace.OneAgent.Introspection.MongoDbIntrospection.Handle(CommandStartedEvent cmd)

   at MongoDB.Driver.Core.Connections.CommandEventHelper.ProcessCommandRequestMessage(CommandRequestMessage originalMessage, Queue`1 messageQueue, ConnectionId connectionId, Nullable`1 serviceId, CommandMessageBinaryEncoder encoder, Stopwatch stopwatch)

   at MongoDB.Driver.Core.Connections.CommandEventHelper.BeforeSending(IEnumerable`1 messages, ConnectionId connectionId, Nullable`1 serviceId, IByteBuffer buffer, MessageEncoderSettings encoderSettings, Stopwatch stopwatch)

   at MongoDB.Driver.Core.Connections.BinaryConnection.SendMessagesHelper.SendingMessages(IByteBuffer buffer)

   at MongoDB.Driver.Core.Connections.BinaryConnection.SendMessagesAsync(IEnumerable`1 messages, MessageEncoderSettings messageEncoderSettings, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.PooledConnection.SendMessagesAsync(IEnumerable`1 messages, MessageEncoderSettings messageEncoderSettings, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.ExecuteAsync(IConnection connection, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Servers.Server.ServerChannel.ExecuteProtocolAsync[TResult](IWireProtocol`1 protocol, ICoreSession session, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.RetryableWriteOperationExecutor.ExecuteAsync[TResult](IRetryableWriteOperation`1 operation, RetryableWriteContext context, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.BulkUnmixedWriteOperationBase`1.ExecuteBatchAsync(RetryableWriteContext context, Batch batch, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.BulkUnmixedWriteOperationBase`1.ExecuteBatchesAsync(RetryableWriteContext context, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.BulkMixedWriteOperation.ExecuteBatchAsync(RetryableWriteContext context, Batch batch, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.BulkMixedWriteOperation.ExecuteAsync(IWriteBinding binding, CancellationToken cancellationToken)

   at MongoDB.Driver.OperationExecutor.ExecuteWriteOperationAsync[TResult](IWriteBinding binding, IWriteOperation`1 operation, CancellationToken cancellationToken)

   at MongoDB.Driver.MongoCollectionImpl`1.ExecuteWriteOperationAsync[TResult](IClientSessionHandle session, IWriteOperation`1 operation, CancellationToken cancellationToken)

   at MongoDB.Driver.MongoCollectionImpl`1.BulkWriteAsync(IClientSessionHandle session, IEnumerable`1 requests, BulkWriteOptions options, CancellationToken cancellationToken)

   at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSessionAsync[TResult](Func`2 funcAsync, CancellationToken cancellationToken)

   at MongoDB.Driver.MongoCollectionBase`1.ReplaceOneAsync(FilterDefinition`1 filter, TDocument replacement, ReplaceOptions options, Func`3 bulkWriteAsync)

   at NJM.DotNetLibrary.Mongo.MongoDb.ReplaceOneAsync[T](String name, FilterDefinition`1 filter, T record, ReplaceOptions options)

   at PL.Prospect.API.Infrastructure.Repository.UpdateSessionContext(Session data)

1 REPLY 1

andre_vdveen
DynaMight Champion
DynaMight Champion

Hi @rkalapati, can you disable the OneAgent feature for .NET MongoDB under Settings > Preferences > OneAgent features and check if it resolves the issue with your application?

Featured Posts