The Wayback Machine - https://web.archive.org/web/20200716235940/https://github.com/influxdata/influxdb/issues/17015
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to https://influx-stage.odds-bods.com:8086 #17015

Open
mbrumpton opened this issue Feb 26, 2020 · 22 comments
Open

Failed to connect to https://influx-stage.odds-bods.com:8086 #17015

mbrumpton opened this issue Feb 26, 2020 · 22 comments

Comments

@mbrumpton
Copy link

@mbrumpton mbrumpton commented Feb 26, 2020

Hi,

I followed all the official docs but influx will not start when I enable https.

https-enabled = true

The SSL certificate to use when HTTPS is enabled.

https-certificate = "/etc/ssl/obstar2019.crt"

Use a separate private key location.

https-private-key = "/etc/ssl/oddsbods-private.key"

Failed to connect to https://influx-stage.odds-bods.com:8086: Get https://influx-stage.odds-bods.com:8086/ping: dial tcp 13.79.186.12:8086: connect: connection timed out
Please check your connection settings and ensure 'influxd' is running.

@russorat
Copy link
Contributor

@russorat russorat commented Feb 26, 2020

@mbrumpton thanks for opening this. It's tough to debug ssl issues. I'm assuming you've followed the steps here: https://docs.influxdata.com/influxdb/v1.7/administration/https_setup/#configure-influxdb-to-use-tls

Are you able to connect to influx from the same machine using the cli command? that might help narrow it down to a problem where influx isn't starting up vs something wrong with the environment.

@russorat
Copy link
Contributor

@russorat russorat commented Feb 26, 2020

Could you also add details about the version of influx you are using as well as the OSS?

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Feb 26, 2020

Thanks for the reply, influx is hosted on Linux (ubuntu 18.04) and I upgraded to latest version 1.7.10 to see if that would resolve the issue.

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Feb 28, 2020

Yes I can access influx through the cli but when running influx -ssl -host influx-stage.odds-bods.com I get the following message:

Failed to connect to https://influx-stage.odds-bods.com:8086: Get https://influx-stage.odds-bods.com:8086/ping: http: server gave HTTP response to HTTPS client
Please check your connection settings and ensure 'influxd' is running.

@russorat
Copy link
Contributor

@russorat russorat commented Feb 28, 2020

@mbrumpton Sorry, I don't think I understand.

Yes I can access influx through the cli...

But it sounds like you can't based on the next sentence.

If you just try to curl -v https://influx-stage.odds-bods.com:8086/ping, what do you get?

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 2, 2020

Hi this is response:
curl -v https://influx-stage.odds-bods.com:8086/ping

  • Trying 13.79.186.12...
  • TCP_NODELAY set
  • Connected to influx-stage.odds-bods.com (13.79.186.12) port 8086 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • error:1408F10B:SSL routines:ssl3_get_record:wrong version number
  • stopped the pause stream!
  • Closing connection 0
    curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number
@russorat
Copy link
Contributor

@russorat russorat commented Mar 2, 2020

@mbrumpton thanks for the additional information. Based on that error:
ssl3_get_record:wrong version number and a little googling, it seems like the configuration of the proxy server is incorrect. This points to a problem where the proxy server has to first connect via http and then upgrade the connection to https: https://stackoverflow.com/a/50842202/4701287

Does that make sense? Can you take a look and confirm that your proxy settings are correct?

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 2, 2020

This is strange as we are not using a proxy server,
This is the output of curl -V
curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 3, 2020

updated proxy settings still not working

obadmin@obinfluxdbstage-vm:/etc/influxdb$ echo $http_proxy
https://influx-stage.odds-bods.com

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 3, 2020

influx -ssl -host influx-stage.odds-bods.com:8086
Failed to connect to https://[influx-stage.odds-bods.com:8086]:8086: Get https://[influx-stage.odds-bods.com:8086]:8086/ping: proxyconnect tcp: dial tcp: lookup https: Temporary failure in name resolution

@russorat
Copy link
Contributor

@russorat russorat commented Mar 3, 2020

@mbrumpton thanks for the updates. i think we might be getting closer here. That last failure (lookup https: Temporary failure in name resolution) seems to be pretty common with some googling and they all point to a /etc/resolv.conf file. check out https://cyberpersons.com/2020/01/25/solved-temporary-failure-in-name-resolution/ or https://bobcares.com/blog/temporary-failure-in-name-resolution-centos/

Does this help at all?

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 3, 2020

Cheers, so close: $influx -host influx-stage.odds-bods.com:8086
Connected to http://[influx-stage.odds-bods.com:8086]:8086 version 1.7.10

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 3, 2020

influx won't start when I enable https influx -ssl -host influx-stage.odds-bods.com:8086
Failed to connect to https://[influx-stage.odds-bods.com:8086]:8086: Get https://[influx-stage.odds-bods.com:8086]:8086/ping: proxyconnect tcp: dial tcp 13.79.186.12:8086: connect: connection refuse

@russorat
Copy link
Contributor

@russorat russorat commented Mar 4, 2020

can you try influx -ssl -host influx-stage.odds-bods.com -port 8086?

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 4, 2020

still the same, have I got the /etc/environment variables correct?
http_proxy="https://influx-stage.odds-bods.com:8086/"
https_proxy="https://influx-stage.odds-bods.com:8086/"

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 10, 2020

I have created a fresh installation of influx with a different domain crt and still get the SLL wron version number error

curl -v https://influx.brumpton.co.uk:8086/ping, * Trying 40.68.230.5...

  • TCP_NODELAY set
  • Connected to influx.brumpton.co.uk (40.68.230.5) port 8086 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • error:1408F10B:SSL routines:ssl3_get_record:wrong version number
  • stopped the pause stream!
  • Closing connection 0
    curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number
    holly@in-influx:/etc/influxdb$ curl -v http://influx.brumpton.co.uk:8086/ping,
  • Trying 40.68.230.5...
  • TCP_NODELAY set
  • Connected to influx.brumpton.co.uk (40.68.230.5) port 8086 (#0)

GET /ping, HTTP/1.1
Host: influx.brumpton.co.uk:8086
User-Agent: curl/7.58.0
Accept: /

< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< X-Influxdb-Build: OSS
< X-Influxdb-Version: 1.7.10
< Date: Tue, 10 Mar 2020 11:06:42 GMT
< Content-Length: 19
<
404 page not found

  • Connection #0 to host influx.brumpton.co.uk left intact
    holly@in-influx:/etc/influxdb$
@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 10, 2020

Could the problem be caused by the way I extracting the crt and key from openssl?

@russorat
Copy link
Contributor

@russorat russorat commented Mar 10, 2020

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 11, 2020

same problem, influx cli works until I add: https-enabled = true

@mbrumpton
Copy link
Author

@mbrumpton mbrumpton commented Mar 24, 2020

Followed this article for creating a self signed cert and it worked!

https://www.systemmen.com/database/influxdb/how-to-set-up-https-for-influxdb-server-462.html

@russorat
Copy link
Contributor

@russorat russorat commented Mar 24, 2020

@mbrumpton wow that's great news! I'll check with the docs team to see what we might update in our docs to make this easier.

@russorat
Copy link
Contributor

@russorat russorat commented Mar 24, 2020

@mbrumpton were you missing the -unsafeSsl option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.