# Retrying http request, will sleep for X seconds

**URL:** https://discuss.elastic.co/t/retrying-http-request-will-sleep-for-x-seconds/380085
**Category:** Logstash
**Created:** [July 13, 2025, 11:52pm UTC](https://discuss.elastic.co/t/retrying-http-request-will-sleep-for-x-seconds/380085 "2025-07-13T23:52:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Venality](https://avatars.discourse-cdn.com/v4/letter/v/a88e4f/32.png) [@Venality](https://discuss.elastic.co/u/Venality)
#### Post date: [July 13, 2025, 11:52pm UTC](https://discuss.elastic.co/t/retrying-http-request-will-sleep-for-x-seconds/380085/1 "2025-07-13T23:52:45Z")

</div>

I configured my logstash.conf file properly in terms of URL and Authorization token however It's still not sending logs and giving me an http request failure like it's not able to communicate. I came to the conclusion that it might've been a certificate issue because when I use

```auto
Invoke-WebRequest -Uri "https://127.0.0.1:8088/services/collector" `
>> -Headers @{"Authorization"="Splunk ac09103b-7f2e-4767-940d-c8bfa0a84e12"} `
>> -Method Post `
>> -Body '{"event": "test event", "sourcetype": "json"}'

```

In powershell it sends the request and I get this back:

```auto
StatusCode : 200
StatusDescription : OK
Content : {"text":"Success","code":0}
RawContent : HTTP/1.1 200 OK
                    X-Content-Type-Options: nosniff
                    Vary: Authorization
                    Connection: Keep-Alive
                    X-Frame-Options: SAMEORIGIN
                    Content-Length: 27
                    Content-Type: application/json; charset=UTF-8
                    Date: Sun...
Forms : {}
Headers : {[X-Content-Type-Options, nosniff], [Vary, Authorization], [Connection, Keep-Alive],
                    [X-Frame-Options, SAMEORIGIN]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : System.__ComObject
RawContentLength : 27

```

BUT only after I used

`[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }`

Because before that I was still getting errors. I don't know how to replicate this in the config file tho since I used `ssl_certificate_verification => false` and it still doesn't work

Here's my config:

```auto
input {
  beats {
    port => 5044
  }
}

output {
  http {
    url => "https://127.0.0.1:8088/services/collector"
    http_method => "post"
    format => "json"
    headers => {
      "Authorization" => "Splunk ac09103b-7f2e-4767-940d-c8bfa0a84e12"
    ssl => true
    ssl_certificate_verification => false
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 14, 2025, 1:46am UTC](https://discuss.elastic.co/t/retrying-http-request-will-sleep-for-x-seconds/380085/2 "2025-07-14T01:46:03Z")

</div>

> [@Venality](#):
>
> `ssl_certificate_verification `

I don't think the http output has every supported that option. logstash should not start up with that configuration.

The elasticsearch output used that option in the past, but both outputs now use ssl\_verification\_mode, which can be full or none.

---

<div class="post-metadata">

### Author: ![Venality](https://avatars.discourse-cdn.com/v4/letter/v/a88e4f/32.png) [@Venality](https://discuss.elastic.co/u/Venality)
#### Post date: [July 14, 2025, 10:37pm UTC](https://discuss.elastic.co/t/retrying-http-request-will-sleep-for-x-seconds/380085/3 "2025-07-14T22:37:43Z")

</div>

Do you know what my issue could be then?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 14, 2025, 11:22pm UTC](https://discuss.elastic.co/t/retrying-http-request-will-sleep-for-x-seconds/380085/4 "2025-07-14T23:22:06Z")

</div>

As I said, if you use `ssl_certificate_verification => false` in your configuration then logstash will fail to startup, and if it is not running then it will not be sending any logs to the destination.

If it is running then look at the logstash logs.

---

<div class="post-metadata">

### Author: ![Venality](https://avatars.discourse-cdn.com/v4/letter/v/a88e4f/32.png) [@Venality](https://discuss.elastic.co/u/Venality)
#### Post date: [July 15, 2025, 12:18am UTC](https://discuss.elastic.co/t/retrying-http-request-will-sleep-for-x-seconds/380085/5 "2025-07-15T00:18:18Z")

</div>

Well the error it was giving me was the failed http request, which is why I said it was ac communication issue which is why I tried to use that line. It didn't crash it though it ran fine besides that error which I was still getting before adding it in so I'm not sure what you're referring to.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 15, 2025, 1:20am UTC](https://discuss.elastic.co/t/retrying-http-request-will-sleep-for-x-seconds/380085/6 "2025-07-15T01:20:34Z")

</div>

My bad, I made an assumption about the configuration you posted without testing it, resulting in me diagnosing the wrong error!

You have

> [@Venality](#):
>
> ```auto
> output {
> http {
> url => "https://127.0.0.1:8088/services/collector"
> http_method => "post"
> format => "json"
> headers => {
> "Authorization" => "Splunk ac09103b-7f2e-4767-940d-c8bfa0a84e12"
> ssl => true
> ssl_certificate_verification => false
> }
> }
> }
> 
> ```

The problem there is that you included

```
ssl => true
ssl_certificate_verification => false

```

as _headers_, not as options on the output. If you reconfigure your pipeline as

```auto
output {
  http {
    url => "https://127.0.0.1:8088/services/collector"
    http_method => "post"
    format => "json"
    headers => {
      "Authorization" => "Splunk ac09103b-7f2e-4767-940d-c8bfa0a84e12"
    }
    ssl => true
    ssl_certificate_verification => false
  }
}

```

You will get

```
[ERROR][logstash.outputs.http] Unknown setting 'ssl_certificate_verification' for http
[ERROR][logstash.outputs.http] Unknown setting 'ssl' for http

```

and

> Failed to execute action {:id=\>:main, :action\_type=\>LogStash::ConvergeResult::FailedAction, :message=\>"Unable to configure plugins: (ConfigurationError) Something is wrong with your configuration.",

If you change it to

```auto
output {
  http {
    url => "https://127.0.0.1:8088/services/collector"
    http_method => "post"
    format => "json"
    headers => {
      "Authorization" => "Splunk ac09103b-7f2e-4767-940d-c8bfa0a84e12"
    }
    ssl_enabled => true
    ssl_verification_mode => none

  }
}

```

then it should try to connect with TLS and ignore server certificate errors.
