Cmd/enroll_cmd.go:776 Fleet Server - Error - x509: certificate is valid for (old hostname), not (current hostname)

Hi, I have the same issue like couple more people here, unfortinately they did not get any help, so I try myself:)
Enrolling agent fails with message certificate is valid for (old hostname), not (current hostname). But I have checked certificate and it is ok- the new hostname is there. What certificate does it complain about? Does it pick up the right one?

I think I got it. It's the http cert generated by ./bin/elasticsearch-certutil http

Is your question resolved?