AlanBarber / NLog.Targets.Splunk

A NLog target for Splunk Http Event Collector (HEC) Sender
Apache License 2.0
9 stars 24 forks source link

System.Net.Sockets.SocketException #33

Closed dev-thinks closed 5 years ago

dev-thinks commented 5 years ago

This is the first time am trying with Splunk-Nlog.

Getting below exception when trying to send log messages to Splunk cloud. any clue that what am missing here.

I am trying to run example ConsoleApp in this repo, against my Splunk trial cloud and getting this -

Error SplunkHttpEventCollector(Name=SplunkLog): Failed to send LogEvents Exception: Splunk.Logging.HttpEventCollectorException: Failed to send request: InternalServerError ---> 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 receive. ---> 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

nlog.config

`<?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" throwConfigExceptions="true" internalLogLevel="Debug" internalLogFile="nlog-internal.log">

`

Thank you.

dev-thinks commented 5 years ago

Sorry for the trouble. Looks like I missed to have https

It is logging into Splunk cloud even though am seeing cert error in nlog error log.