HTTP poller SSL cert issue

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

    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:

    {
       "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.

Anyone with some suggestions?

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