influxdata/influxdata-docker

error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number

phbissiwu opened this issue · 13 comments

Hello, For some reason I keep getting an OpenSSL error this is the error with curl

What am I doing wrong?

  • Trying 54.164.144.24...
  • TCP_NODELAY set
  • Connected to 54.164.144.24 (54.164.144.24) port 8086 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/cert.pem
    CApath: none
  • TLSv1.2 (OUT), TLS handshake, Client hello (1):
  • error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
  • Closing connection 0
    curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number

After searching for other, similar issues, your configuration may be using an HTTPS URL to connect to a server using HTTP.

After searching for other, similar issues, your configuration may be using an HTTPS URL to connect to a server using HTTP.
So I did not modify the configuration, I deployed the image and used everything as default.

So I did not modify the configuration, I deployed the image and used everything as default.

Can you share your config and how you are launching the container, endpoints, etc., please? Thanks!

I am launching the container using AWS fargate, the container configuration is a task difinition

When I do curl http I get 404 page not found

curl -v http://34.234.234.121:8086/api/vi/ping

  • Trying 34.234.234.121...
  • TCP_NODELAY set
  • Connected to 34.234.234.121 (34.234.234.121) port 8086 (#0)

GET /api/vi/ping HTTP/1.1
Host: 34.234.234.121:8086
User-Agent: curl/7.64.1
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.8.10
< Date: Wed, 20 Jul 2022 12:45:53 GMT
< Content-Length: 19
<
404 page not found

  • Connection #0 to host 34.234.234.121 left intact
  • Closing connection 0

Hi,

Looks like you are trying to hit the /ping API endpoint using InfluxDB v1.8? If so, per the docs that is at /ping:

$ curl -v http://localhost:8086/ping
*   Trying 127.0.0.1:8086...
* Connected to localhost (127.0.0.1) port 8086 (#0)
> GET /ping HTTP/1.1
> Host: localhost:8086
> User-Agent: curl/7.84.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 204 No Content
< Content-Type: application/json
< Request-Id: 69c14450-0830-11ed-8001-244bfe9aa4fa
< X-Influxdb-Build: OSS
< X-Influxdb-Version: 1.8.10
< X-Request-Id: 69c14450-0830-11ed-8001-244bfe9aa4fa
< Date: Wed, 20 Jul 2022 13:32:34 GMT
< 
* Connection #0 to host localhost left intact

Was there documentation that you were looking at that shows it at: /api/vi/ping?

Not really, I saw that in a blog post.

So is this how to set the endpoint correctly to connect to the DB?
http://34.234.234.121:8086

So is this how to set the endpoint correctly to connect to the DB?
http://34.234.234.121:8086/

Correct, that is your IP and your port, and then you can specify the API endpoint. For example, the /write endpoint is used to write to the database. That would look like http://34.234.234.121:8086/write

For some reason in the code, I keep getting

rake aborted!
InfluxDB::QueryError: database not found: db

This is how I set the endpoint

INFLUX_DB_URL=http://34.234.234.121:8086/

Good news is it sounds like you can communicate with InfluxDB.

rake aborted!
InfluxDB::QueryError: database not found: db

What application is this? Maybe they need the endpoint specified differently or required some setup?

Its a ruby rails application

ok it looks to be expecting a database called db? When you created the container, did you set that up?

When I launch InfluxDB 1.8 if I want to create a database at startup, I use the INFLUXDB_DB environment variable to create the database. See the docs here for more.

Hi @powersj Thanks for your help. Indeed the database db was missing, once I followed the docs you shared I was able to create the db and that solved my issue. Thank you once again.