You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running a .NET 4.5 console app that I am trying to ship up the logs to my HTTP collector in my Sumo Logic account. Below is my XML configuration in App.config.
But in my Program.cs I am getting an exception as soon as the logger goes to ship up a log message.
Here is the sample code:
classProgram{privatestaticreadonlyILoglog= LogManager.GetLogger("RecordResults");staticvoidMain(string[]args){CustomClassclassApi=new CustomClass(log);while(true){
log.Info("Begin record results pass...");try{
classApi.StartWorker();}catch(Exceptione){
log.Error(e);}
log.Info("Finished record results pass...");}}}
Here is the exception:
log4net:ERROR [SumoLogicAppender] ErrorCode: GenericFailure. Failed in DoAppend
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at SumoLogic.Logging.Common.Sender.SumoLogicMessageSender.TrySend(String body, String name)
at SumoLogic.Logging.Log4Net.SumoLogicAppender.Append(LoggingEvent loggingEvent)
at log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent loggingEvent)
I am on the latest version of the Nuget package and log4net. I am using the collection endpoint for my configured collector. I'm at a bit of a loss on what the issue is here.
The text was updated successfully, but these errors were encountered:
@kylegalbraith did you make progress on this? I'm also experiencing this issue, exactly as described above. I'm a noob to sumologic, so I assume my endpoint url is invalid.
I am running a .NET 4.5 console app that I am trying to ship up the logs to my HTTP collector in my Sumo Logic account. Below is my XML configuration in App.config.
But in my
Program.cs
I am getting an exception as soon as the logger goes to ship up a log message.Here is the sample code:
Here is the exception:
I am on the latest version of the Nuget package and log4net. I am using the collection endpoint for my configured collector. I'm at a bit of a loss on what the issue is here.
The text was updated successfully, but these errors were encountered: