Nomad confused about domain in TLS certificate

Dear Nomad community,

I am trying to configure TLS in a nomad + consul cluster, I got it working with the default domain and now I want to configure the domain for a different one. I got the certificates using nomad tls cert ...

At the moment consul traffic is not encrypted (I am only working on the Nomad part).

Consul looks ok meaning I can access the web interface and see the nodes healthy.

However I can see this in the nomad logs

Jun 06 21:43:02 nid001314 nomad[1511]:     2023-06-06T21:43:02.867+0200 [ERROR] nomad.raft: failed to make requestVote RPC: target="{Voter 087a3fa1-9dca-6f7e-74d2-715535a40180}" error=EOF term=10353
error="tls: failed to verify certificate: x509: certificate is valid for, localhost, not" term=4505
Jun 06 21:43:02 nid001314 nomad[1511]:     2023-06-06T21:43:02.894+0200 [WARN]  nomad.rpc: failed TLS handshake: remote_addr= error="remote error: tls: bad certificate"

Any idea from where is this coming from?

thank you very much