I create CA and TLS certificates with OpenSSL but ansible module. Because certificates generated by consul create ca not working with Nomad. Issue with domain name.
WIth OpenSSL, I have this error in log:
2023-02-08T15:50:31.684+0100 [ERROR] client: error registering: error="rpc error: failed to get conn: x509: certificate signed by unknown authority (possibly because of \"x509: invalid signature: parent certificate cannot sign this kind of certificate\" while trying to verify candidate authority certificate \"serial:387998798588550154155810081398460306095881826677\")"
2023-02-08T15:50:31.678+0100 [ERROR] client.rpc: error performing RPC to server: error="rpc error: failed to get conn: rpc error: lead thread didn't get connection" rpc=Node.GetClientAllocs server=192.168.64.65:4647
2023-02-08T15:50:31.684+0100 [ERROR] client.rpc: error performing RPC to server which is not safe to automatically retry: error="rpc error: failed to get conn: rpc error: lead thread didn't get connection" rpc=Node.GetClientAllocs server=192.168.64.65:4647
I don’t understand failed to get conn: x509: certificate signed by unknown authority , It’s my own CA.
Nomad recently added its own tls command, which might be useful seeing as you’ve had success with Consul and Vault in a similar way. The process should closely follow the one used for Consul. I have also raised #16122 to track moving our tutorial over to use this.
But what is difference between CFSSL and OpenSSL . I prefer to use OpenSSL because there is already a ansible module for.
You should be able to use either equivalently, we just chose cfssl for the tutorial as I believe it was consistent with other HashiCorp product tutorials.
I don’t understand failed to get conn: x509: certificate signed by unknown authority , It’s my own CA.
My TLS is not great, but it feels like potentially the CA passed to Nomad is missing the entire chain, or something similar.
I will ask ChatGPT, Because he is nice with me!
Underneath it all, ChatGPT is just a cold hearted machine, don’t be fooled!