Failed TLS handshake

Hi, my nomad server stop working by a timeout, I restarted the server, now I have the following error when I execute any command:

root@nomad-server-1:~# nomad server members
Error querying servers: Unexpected response code: 400 (Client sent an HTTP request to an HTTPS server.

And using the client I get:

Error querying servers: Get "https://[IP]:[PORT]/v1/agent/members": remote error: tls: bad certificate

How can I solve this?

Hi @davidjaras,

The first error is because the client is using a non-tls request when contacting the Nomad API which is using TLS. The second is because the TLS certificate arguments being sent to the Nomad API are incorrect.

The Nomad TLS Learn guide has some great information about configuring and using TLS with Nomad. It is unfortunately hard to diagnose any additional problems without a lot more information about the TLS setup.

jrasell and the Nomad team

Thanks a lot for your response @jrasell

The problem was that cli.pem certificate was expired, I renewed it and all come back to normality.