Skip to content

SSL/TLS Connection Issue: SSL_ERROR_RX_RECORD_TOO_LONG with Self-Signed Certificate #391

@noor47-pixel

Description

@noor47-pixel

I’m experiencing an issue with configuring TLS for the OpenStack exporter. Here’s a detailed description of the steps I’ve taken and the problem I’m encountering:

Steps Taken:

  1. Generated a Self-Signed Certificate:

    • I created a self-signed certificate and private key using OpenSSL.
  2. Updated Configuration File (web-config-file.yml):

    • I added the generated .crt and .key files to the tls_server_config section of the web-config-file.yml.
    tls_server_config:
      cert_file: /path/to/certificate.pem
      key_file: /path/to/private_key.pem
      #client_auth_type: NoClientCert
     
  3. Configured the Prometheus Exporter:

    • The exporter is set to listen on port 8444 (since port 443 is already in use).

Issue:

When trying to access the exporter at https://ip:8444, I encounter the following error:

SSL_ERROR_RX_RECORD_TOO_LONG

The page cannot be displayed because the authenticity of the received data cannot be verified.

Logs:

The logs indicate that TLS is disabled:

ts=2024-07-30T10:27:29.545Z caller=main.go:64 level=info msg="Build context" build_context="(go=go1.18.10, platform=linux/amd64, user=, date=, tags=unknown)"
ts=2024-07-30T10:27:29.546Z caller=main.go:85 level=info msg="openstack exporter started in legacy mode"
ts=2024-07-30T10:27:29.547Z caller=tls_config.go:274 level=info msg="Listening on" address=[::]:9180
ts=2024-07-30T10:27:29.547Z caller=tls_config.go:277 level=info msg="TLS is disabled." http2=false address=[::]:9180

Additional Information:

  • Port Configuration: I am using port 8444, not 443.
  • TLS Configuration: Despite specifying certificates in the configuration, TLS appears to be disabled based on the log output.

Questions:

  1. Why is TLS disabled even though the configuration file specifies certificates and the client_auth_type?
  2. Could the issue be related to the certificate format or configuration? not shure but i don't know
  3. What steps should I take to resolve the SSL_ERROR_RX_RECORD_TOO_LONG error?
  4. Tls is disabled in log come from cloud.yamls where i have verify to false ?

Expected Behavior:

The exporter should correctly initiate TLS on port 8444 using the provided self-signed certificate and private key.

Attachments:

  • Configuration file snippet
  • Logs showing the TLS status

Thank you for your assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions