Can you check your Elasticsearch logs? There is an issue with self signed certs where they're not being provided to and taken in to account by the endpoint properly like they are for beats. Its talked about some in this post: Elastic Agent not sending Data
Have you added your self-signed certificates to the trusted roots in windows?
I'm looking to see if I can find anything that would cause the localhost to pop up like that.