Error when connection with https (self signed certificate)
See original GitHub issueI’ve tried to debug this now for a couple of hours with no success. My elasticsearch-server is behind nginx using a self-signed-certificate. Everything works perfectly fine in any browser and with: curl -k https://user:pass@samehost.com When using this lib with settings below I get errors:
this.client = new elasticsearch.Client({
host: {
host: 'myhost.com',
port: '443',
protocol: 'https',
auth: 'user:password'
},
log: {
level: 'info'
},
keepAlive: true,
apiVerison: "1.3"
});
Elasticsearch ERROR: 2014-10-21T19:42:24Z Error: Request error, retrying – self signed certificate
Elasticsearch WARNING: 2014-10-21T19:42:24Z Unable to revive connection: https://xxx:xxx@xxx/
Elasticsearch WARNING: 2014-10-21T19:42:24Z No living connections
Any ideas?
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Certificate error when connecting to SQL Server - Stack Overflow
I had the same error message ( Failed to connect to xxx:1433 - self signed certificate ). Then I used trustServerCertificate: true ....
Read more >Resolving SSL Self-Signed Certificate Errors
This is caused by git not trusting the certificate provided by your server. Workaround. One possible workaround is to temporary disable SSL ......
Read more >I get "Certificate is not trusted because it is self-signed" error ...
A self-signed certificate was installed on your server instead of the certificate issued by a Certificate Authority. You may check if your certificate...
Read more >Self signed certificate" in Azure App Services - Microsoft Q&A
If the certificate on the remote service is a self-signed certificate or a private CA certificate, then it will not be trusted by...
Read more >Self-Signed SSL Certificate Warning | InMotion Hosting
Self -signed SSL errors ... When you are trying to access a service such as WHM on your server, over the SSL (Secure...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I debugged some more. From src/lib/http.js line 98-107:
If I add reqParams.rejectUnauthorized = false; then all works out. I have now idea though how to pass this through the elasticsearch-js API, or if its even possible. Woulde be nice though, cause it’s a bit ugly to hack the source…
i’m using elasticsearch.jquery.js in Internet Explorer 9 and i have the same problem, the possible solution is enable the cross domain support like this:
or
Tnk!!