Skip to content

Can't connect to a server behind LB with TLS termination #1566

@DVrsek-Tricentis

Description

@DVrsek-Tricentis

Observed behavior

Hi,
I have a NATS cluster inside AWS which is available from the internet through the Network Load Balancer which does a TLS termination.

The problem I am facing is that I am able to connect to the server using .NET SDK, but I am not able to connect using NATS CLI tool. The error I am getting is secure connection not available.

I have tried it on Linux as well as Windows OS. Has anybody encountered this?
Just making it clear that the application using SDK is able to connect without a problem.

nats server check connection -s nats://nats-server:4222 --tlsca=cert.pem --tlsfirst
Results in CRITICAL Connection Crit:connection failed: nats: secure connection not available

I have tried this command with or without --tlsfirst

Connection using openssl works.
echo -e 'CONNECT {"user":"username","pass":"password","verbose":true}\r\nPING\r\n' | openssl s_client -tls1_2 -connect nats-server:4222 -quiet
Results in the INFO server message.

Any help will be appreciated. Thank you.

Expected behavior

Expected behavior is that the NATS CLI is able to connect to the NATS cluster

Server and client version

Server
"version":"2.12.1","proto":1,"git_commit":"fab5f99","go":"go1.25.3"

Client
v0.3.0

Host environment

No response

Steps to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSuspected defect such as a bug or regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions