Hi, when I am trying curl over https the error is returned:
curl: (60) SSL certificate problem: unable to get local issuer certificate
The https is works fine.
Follows the command
curl -u user:senha -H ‘Accept: application/json’ -X GET ‘https://mygraylogserver.example.com:9000/api/cluster?pretty=true’
Graylog 4.3.15+17ed3ac on graylog (Debian 11.0.18 on Linux 4.19.0-24-amd64)
I enable reverse proxy https and the problem continues
How I use curl to get response in https?
In the Graylog REST API curl is used with http protocol
What are you trying to do, because your url path is for open/elasticsearch api but you are using port 9000 which is the graylog port, port 9200 is normally the elastic/opensearch port.
Hello, I want to receive the response in JSON using the command through curl. If I use the --insecure parameter with curl it works normally and I get the response in JSON.
curl --insecure -u user:password -H ‘Accept: application/json’ -X GET ‘https://mygraylogserver.example.com :9000/api/cluster?pretty=true’.
I’m beginner to graylog and I didn’t find any documentation about doing the api query with https enabled without using --insecure parameter
Hi @Joel_Duffield, can you help me, please?
Are you using a self signed cert for your graylog? Is this curl command running from a remote machine? On the face of it it just looks like the machine that is running curl doesn’t trust the certificate.
Yes, the self signed cert is provide by godaddy (print1 attachament).
Yes too, the curl command is from remote machine.
The https is working normally in the browser…
Curl shows me the follows error “curl: (60) SSL certificate problem: unable to get local issuer certificate”
If self certifcate is works in the browser, why in the curl doesnt works?
In the reference Graylog REST API, curl command example is http…
Is there one reference thats show curl running with https?
Why it’s not trusting the cert in curl I don’t, but that does sound like the issue. You may want to try some of the troubleshooting steps from this vmware doc on the topic to figure what is missing for it not to be trusted. VMware Knowledge Base
Hi @Joel_Duffield the problem was resolved with the vmware reference…
If the insecure certificate is a self-signed, known-trusted certificate, load the certificate to your local trusted certificate location for your OS.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.