Hi Gary,

could you please use something like TCPDump or Wireshark to check how the 
HTTP request looks like, that your client sends to Graylog's GELF HTTP 
input?

Judging from the error message, it seems like the HTTP request body was 
missing.

Cheers,
Jochen

On Thursday, 25 February 2016 00:23:37 UTC+1, [email protected] wrote:
>
> Does anyone know why this Windows Client side HTTP Gelf input would give 
> me the following error in the Graylog log?
>
> java.lang.IllegalStateException: GELF message is too short. Not even the 
> type header would fit.
>
>
>
>  static void Main(string[] args)
>  {
>      string url = "http://99.99.99.99:12201/gelf";;
>      var httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
>       httpWebRequest.ContentType = "text/json";
>       httpWebRequest.Method = "POST";
>       using (var streamWriter = new StreamWriter(httpWebRequest.
> GetRequestStream()))
>
>
>              {
>                  string json = "{\"version\":\"1.1\"," +
>                                "\"host\":\"MyHost\"," +
>                                "\"short_message\":\"A short message that 
> helps you identify what is going on\"," +
>                                "\"facility\":\"test\"," +
>                                 "\"_foo\":\"bar\" }";
>
>
>                  streamWriter.Write(json);
>                  streamWriter.Flush();
>                  streamWriter.Close();
>              }
>       var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
>
>
>
>
>
> Thanks! Gary
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/87ca5fcd-33ac-47b0-9549-07f85ff2aa12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to