Skip to content

Using ssllabs to verify ssl shows error logs on sozu #1149

Closed

Description

@gtas843

When running ssl test from ssllabs, i got this error logs, i dont know if it was my conf problem or i have setup wrong https cert, but i receive A rating from the test, and that means all good. I dont know what this error logs had to do:

ERROR WRK-00 RUSTLS

2024-11-04T06:18:56.608175Z 1730701136608175255 74051 ERROR WRK-01 RUSTLS [01JBTX74Q086X9XF52Q8X9012K - -] Session(sni="a.domain.com", source="source_ip", frontend=10, readiness=I("R-EH")&R("RW--")=M("R---"))

Could not perform handshake: PeerIncompatible(NoKxGroupsInCommon

Could not perform handshake: InappropriateMessage { expect_types: [Handshake], got_type: ChangeCipherSpec

ERROR WRK-01 cannot look up certificate: no SNI from session

Could not perform handshake: PeerIncompatible(NoCipherSuitesInCommon)

Could not perform handshake: General("no server certificate chain resolved")

Could not perform handshake: PeerIncompatible(SignatureAlgorithmsExtensionRequired)

Could not perform handshake: NoApplicationProtocol

Im using cerbot to generate ssl cert certbot certonly --standalone -d a.domain.com

And copied all required certs for https.

My sozu https conf:

[[listeners]]
protocol = "http"
address = "0.0.0.0:80"

[[listeners]]
protocol = "https"
address = "0.0.0.0:443"

tls_versions = ["TLS_V12", "TLS_V13"]
cipher_list = [
"TLS13_AES_256_GCM_SHA384",
"TLS13_AES_128_GCM_SHA256",
"TLS13_CHACHA20_POLY1305_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
]

[clusters]

[clusters.Server1]
protocol = "http"
https_redirect = true

frontends = [
{ address ="0.0.0.0:80", hostname = "a.domain.com" },
{ address = "0.0.0.0:443", hostname = "a.domain.com", certificate = "/etc/letsencrypt/live/a.domain.com/cert.pem", key = "/etc/letsencrypt/live/a.domain.com/privkey.pem", certificate_chain = "/etc/letsencrypt/live/a.domain.com/chain.pem" },
]

backends = [
{ address = "127.0.0.1:6128" }
]

Im trying to upload files to my backend server using curl curl -F "[email protected]" "https://a.domain.com/upload , but mostly got error logs about Could not perform handshake and can't upload the files. When using other reverse proxys like nginx, envoy, haproxy, everything good and had no problems. Im in the process to migrate all my ends to sozu, but this https error kept holding me.

Activity

  1. Wonshtrum commented on Nov 4, 2024

    @Wonshtrum
    Member

    Hi! Thanks for your interest in Sozu. The errors generated during the SSL Labs testing seem legitimate. Maybe tagging them "error" is misleading as they are not errors from Sozu, but unexpected behavior from the client. I don't know exactly all the tests conducted by SSL Labs but it wouldn't surprise me if they injected error cases to see how the site handles them.
    Could you give us the full line of the error you get with your curl? as well as the result of curl -vvv?

  2. gtas843 commented on Nov 7, 2024

    @gtas843
    Author

    Here is the dummy demo for my api endpoint, only POST request, you can try send upload request using:
    https://fclip.cfd/upload?key=AFT6QZGsx6FJIe9A8xFxIDj6zLb716

    I use curl -v -F "file=@C:\Users\madto\Downloads\test.txt" "https://fclip.cfd/upload?key=AFT6QZGsx6FJIe9A8xFxIDj6zLb716"
    Screenshot 2024-11-07 121504

    And it stuck on ssl renegotiated unless i ctrl+c then it will shows on the sozu log.

    ./sozu start -c sozu.toml
    Screenshot 2024-11-07 123209

    curl -vvv https://fclip.cfd
    Screenshot 2024-11-07 123414

    config

    saved_state = "./state.json"
    log_level = "info"
    log_target = "stdout"
    command_buffer_size = 16384
    handle_process_affinity = true
    connect_timeout = 30
    request_timeout = 30
    worker_automatic_restart = true
    activate_listeners = true
    
    [[listeners]]
    protocol = "http"
    address = "0.0.0.0:80"
    
    [[listeners]]
    protocol = "https"
    address = "0.0.0.0:443"
    
    [clusters]
    
    [clusters.afc]
    protocol = "http"
    
    frontends = [
      { address ="0.0.0.0:80", hostname = "fclip.cfd" },
      { address = "0.0.0.0:443", hostname = "fclip.cfd", certificate = "/etc/letsencrypt/live/fclip.cfd/cert.pem", key = "/etc/letsencrypt/live/fclip.cfd/privkey.pem", certificate_chain = "/etc/letsencrypt/live/fclip.cfd/chain.pem" },
    ]
    
    backends  = [
      { address = "0.0.0.0:51222" }
    ]
  3. reopened this on Nov 7, 2024
  4. Wonshtrum commented on Nov 7, 2024

    @Wonshtrum
    Member

    Hi, in your second message, it seems the SSL handshake works, contrary to your first message, in which you said you had an error Could not perform handshake. Did you fix it somehow?
    It seems your server correctly answers with 404 and 403 meaning communication can be established through HTTPS.
    Testing your curl I have the same behavior: it hangs indefinitely. I don't think it is stuck in SSL renegotiation (at least I can't see anything on the curl side that would indicate it). Everything matches the behavior of a slow-to-answer backend. In local, if I set up a backend that never answers I have the same curl logs. What is surprising to me is that it doesn't seem to time out even after 10 minutes. The default time out for the backend is 60s and it doesn't seem you modified it in your config.
    Can you confirm your backend doesn't see the request coming?
    I you don't see the request, can you try setting the log_level to debug, then observe the logs for the POST request that doesn't work? A "healthy" request should look like this:

    2024-11-07T11:45:43.622799Z 1730979943622799280 2000559 DEBUG WRK-00    sozu_lib::https HTTP::upgrade
    2024-11-07T11:45:43.622843Z 1730979943622843654 2000559 DEBUG WRK-00    sozu_lib::https Successful TLS Handshake with, received: Some("fclip.cfd") Some("http/1.1")
    2024-11-07T11:45:43.622944Z 1730979943622944193 2000559 DEBUG WRK-00    sozu_lib::protocol::kawa_h1     KAWA-H1      [01JC373N5VY23GG2248W39V04Q - -]        Session(public=0.0.0.0:8443, session=127.0.0.1:37708, frontend=6, readiness=I("R-EH")&R("RW--")=M("R---"), backend=<none>, readiness=I("----")&R("----")=M("----"))   >>> Read 83 bytes
    2024-11-07T11:45:43.623164Z 1730979943623164688 2000559 DEBUG WRK-00    sozu_lib::backends      Connecting MyCluster -> (127.0.0.1:1026, 0, 1)
    2024-11-07T11:45:43.623405Z 1730979943623405741 2000559 DEBUG WRK-00    sozu_lib::protocol::kawa_h1     KAWA-H1      [01JC373N5VY23GG2248W39V04Q MyCluster the-backend-to-my-app]    Session(public=0.0.0.0:8443, session=127.0.0.1:37708, frontend=6, readiness=I("R-EH")&R("-W--")=M("----"), backend=7, readiness=I("RWEH")&R("-W--")=M("-W--"))     >>> Wrote 253 bytes
    

    The general flow should be:

    • HTTP::upgrade
    • Successful TLS Handshake (with your SNI and ALPN protocol)
    • KAWA-H1 Read the number of bytes of your requests
    • Connection to a cluster (afc in your case) and a specific backend ip (0.0.0.0:51222 in your case)
    • KAWA-H1 Wrote the number of bytes of your requests (plus the headers Sozu appends)
    • if you see other Read/Wrote after this it should be your backend answering

    I'm curious if Sozu successfully connects to your backend and if it writes all the bytes to it.

  5. FlorentinDUBOIS commented on Apr 30, 2026

    @FlorentinDUBOIS
    Collaborator

    Most of the errors you pasted are informational diagnostics from SSL Labs deliberately probing edge cases — handshakes that intentionally fail to map your TLS posture. The A rating from SSL Labs is the load-bearing signal that your config is correct; the error lines are just Sōzu logging the rejected handshakes. Decoded:

    • NoKxGroupsInCommon, NoCipherSuitesInCommon, SignatureAlgorithmsExtensionRequired — SSL Labs probing with restricted lists to verify your server doesn't accept weak handshakes.
    • InappropriateMessage { got_type: ChangeCipherSpec } — a client (or SSL Labs probe) trying TLS 1.0 / 1.1 against a TLS 1.2 / 1.3-only listener.
    • NoApplicationProtocol — ALPN mismatch (probe advertises a protocol your listener does not).
    • cannot look up certificate: no SNI from session — probe deliberately omits SNI to test that you don't serve a default certificate.

    PR #1191 ships several related improvements that may reduce the noise:

    • Cipher list harmonisation (closes harmonize DEFAULT_CIPHER_LIST and DEFAULT_RUSTLS_CIPHER_LIST #1023): DEFAULT_CIPHER_LIST and DEFAULT_RUSTLS_CIPHER_LIST are now a single source filtered through the active rustls provider, so an unknown cipher name fails at config-load time instead of producing runtime NoCipherSuitesInCommon.
    • TLS 1.0 / 1.1 deprecation warnings (RFC 8996) at config-load time. Disabling them in your listener versions = [...] will silence the InappropriateMessage(ChangeCipherSpec) log spam.
    • Per-listener cipher_list / groups_list filtered through default_provider().cipher_suites and kx_group_by_name, so misconfigured lists error loudly at config validation rather than at runtime handshake.
    • Post-quantum X25519MLKEM768 as first-preference KX group when built with --features crypto-aws-lc-rs or crypto-openssl. Some NoKxGroupsInCommon errors come from clients advertising only legacy groups; X25519+ML-KEM-768 is supersetting modern clients.
    • ALPN default ["h2", "http/1.1"] preserved on the HTTPS listener; if you need only one, set it explicitly to silence NoApplicationProtocol.

    Re-test against a build of PR #1191 once merged and report which of the above errors remain — they should drop substantially.

  6. FlorentinDUBOIS commented on May 4, 2026

    @FlorentinDUBOIS
    Collaborator

    Status: per the analysis above, the SSL Labs error lines are diagnostic noise from intentional probe failures (restricted cipher / kx-group / sigalg lists) — your A rating from SSL Labs is the load-bearing signal that the TLS posture is correct. The actionable part split out by @Wonshtrum is the slow/hung curl behavior, which looked like a backend response delay rather than a TLS issue.

    If you can still reproduce the curl hang, could you share curl -v output against the backend directly (bypassing sozu) and against sozu, on the same upload? That will tell us whether sozu is forwarding the body and waiting on the backend, or holding it. Otherwise this can be closed.

  7. FlorentinDUBOIS commented on May 21, 2026

    @FlorentinDUBOIS
    Collaborator

    Closing — the error messages quoted here are expected behaviour when SSL Labs probes a TLS endpoint, not bugs:

    • Could not perform handshake: PeerIncompatible(NoKxGroupsInCommon) / NoCipherSuitesInCommon / SignatureAlgorithmsExtensionRequired — SSL Labs deliberately probes with restricted/legacy parameter sets to check what the server accepts; rustls correctly refuses.
    • Could not perform handshake: InappropriateMessage { expect_types: [Handshake], got_type: ChangeCipherSpec } — SSL Labs probe sending an out-of-order CCS to test for downgrade vulnerabilities.
    • cannot look up certificate: no SNI from session — SSL Labs probes without SNI to test what the server returns; sōzu refuses (correct, prevents domain fronting).
    • NoApplicationProtocol — probe with an ALPN list that doesn't intersect with the configured alpn_protocols.
    • General("no server certificate chain resolved") — usually a separate cert-loading config issue worth checking against the [[listeners]] block, but unrelated to the probe noise.

    These log lines are emitted because rustls rejected an incompatible probe — exactly what should happen. Your A rating from SSL Labs is consistent with this: the server is correctly refusing weak/malformed clients.

    If you want to silence the noise, raising log_level above error for the RUSTLS target is the operator-facing knob. Configuration tuning advice lives in doc/configure.md (TLS section) and doc/observability.md (handshake telemetry).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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