# HTTP poller SSL cert issue

**URL:** https://discuss.elastic.co/t/http-poller-ssl-cert-issue/236064
**Category:** Logstash
**Created:** [June 7, 2020, 1:33am UTC](https://discuss.elastic.co/t/http-poller-ssl-cert-issue/236064 "2020-06-07T01:33:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jb789](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jb789/32/47451_2.png) [@jb789](https://discuss.elastic.co/u/jb789)
#### Post date: [June 7, 2020, 1:33am UTC](https://discuss.elastic.co/t/http-poller-ssl-cert-issue/236064/1 "2020-06-07T01:33:42Z")

</div>

Could not get http poller to work in pulling a public API data

```auto
    input {
        http_poller {
            urls => {   
                urlname => "https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonRedshift/20200511174831/us-east-1/index.json" 
            }
            request_timeout => 60
            metadata_target => "http_poller_metadata"
            schedule => { cron => "* * * * * UTC"}
            proxy => { host => "xxxxx" port => 8080 scheme => 'https' }
        }
    }

    output {
         stdout {
           codec => rubydebug
         }
    }

```

Error:

```auto
    {
       "tags" => [
            [0] "_http_request_failure"
        ],
                  "@timestamp" => 2020-06-07T01:20:00.964Z,
                  "http_poller_metadata" => {
                  "name" => "urlname",
                  "runtime_seconds" => nil,
                  "request" => {
                  "url" => "https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonRedshift/20200511174831/us-east-1/index.json",
                 "method" => "get"
            },
                 "host" => "xxxx"
        },
                    "@version" => "1",
                    "http_request_failure" => {
                     "name" => "urlname",
                     "error" => "Unrecognized SSL message, plaintext connection?",
                    "backtrace" => nil,
                    "runtime_seconds" => 0.78463,
                    "request" => {
                    "url" => "https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonRedshift/20200511174831/us-east-1/index.json",
                    "method" => "get"
            }
        }
    }

```

I tried to export the SSL key and use the truststore, which results in below error.

```
"name" => "test2",
"runtime_seconds" => 1.1336709999999999,
"error" => "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

```

Can you please suggest what is wrong with these settings? I am able to download the file without any issues using curl when I export the proxy variables.

---

<div class="post-metadata">

### Author: ![jb789](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jb789/32/47451_2.png) [@jb789](https://discuss.elastic.co/u/jb789)
#### Post date: [June 9, 2020, 8:17pm UTC](https://discuss.elastic.co/t/http-poller-ssl-cert-issue/236064/2 "2020-06-09T20:17:42Z")

</div>

Anyone with some suggestions?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 7, 2020, 8:21pm UTC](https://discuss.elastic.co/t/http-poller-ssl-cert-issue/236064/3 "2020-07-07T20:21:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
